Application of the low-rank adaptation method on the example of fine-tuning a latent diffusion model

Authors

DOI:

https://doi.org/10.32347/2410-2547.2025.114.299-310

Keywords:

Low-Rank Adaptation, Fine-tuning, Latent Diffusion Models, Generative Models, Neural Networks, AdamW Optimizer, Image Generation, Architecture styles, Machine Learning, Training Data, Validation Data

Abstract

This article explores the Low-Rank Adaptation (LoRA) method, a fast fine-tuning technique for large-parameter neural networks, and its potential application in various fields, with a focus on architecture, construction, and structural mechanics. The study applies LoRA to fine-tune a Latent Diffusion Model (LDM) for generating images of buildings in various architectural styles, serving as an illustrative example of LoRA’s effectiveness for adapting large models to specialized tasks.  

Large-scale neural networks, such as Latent Diffusion Models (LDMs) and Large Language Models (LLMs), have shown significant potential in various fields, but their training from scratch is computationally expensive and time-consuming. Fine-tuning offers a more efficient approach by adapting pre-trained models to specific tasks and data. LoRA further enhances efficiency by adding a small number of parameters to the model instead of adjusting all weights. LoRA uses low-rank matrix representations to reduce the number of trainable parameters during fine-tuning. By introducing smaller matrices for each layer and training them on new data, LoRA significantly speeds up the fine-tuning process and reduces computational costs.  

The study demonstrates the application of LoRA for fine-tuning the LDM Stable Diffusion 1.5 to generate images of buildings in various architectural styles using the OneTrainer tool. The results show that fine-tuning Stable Diffusion 1.5 using LoRA effectively generates high-quality images of buildings in specified architectural styles, highlighting LoRA’s potential for adapting large models to specialized tasks. The use of a validation dataset is emphasized for preventing overfitting and determining the optimal stopping point for training, ensuring the model's generalizability.

This research contributes to the broader exploration of LoRA’s applicability for fine-tuning large neural networks in various domains. While the study focuses on LDMs for architectural applications, the underlying principles and demonstrated effectiveness of LoRA extend to other types of large models, such as LLMs, for addressing specialized tasks in different fields.

Author Biographies

Hryhorii Ivanchenko, Kyiv National University of Construction and Architecture

Doctor of Technical Sciences, Professor of the Department of Structural Mechanics

Galyna Getun, Kyiv National University of Construction and Architecture

Candidate of Technical Sciences, Associate Professor, Professor of the Department of Architectural Structures

Ihor Skliarov, Kyiv National University of Construction and Architecture

Candidate of Technical Sciences, Associate Professor, Associate Professor of the Department of Metal and Wooden Structures

Andrii Solomin, National Technical University of Ukraine “Igor Sykorsky Kyiv Politechnic Institute“

Candidate of Technical Sciences, Associate Professor, Associate Professor of the Department of Biosafety and Human Health

Serhii Getun, Kyiv National University of Construction and Architecture

Postgraduate student of the Department of Structural Mechanics

References

Getun, H.V., Ivanchenko, H.M., Skliarov, I.O., Solomin, A.V., &Hetun, S.Y. Zastosuvannya neyromerezh v arkhitekturi budivel' I optymizatsiya dlya ts'oho modelei prykhovanoi dyfuzii (Application of neural networks in building architecture and optimization of latent diffusion models for this purpose). Kyiv: Current problems of architecture and urban planning, 2025, Vol. 71, P. 494-509, DOI:10/32347/2077-3455.2025.71.494-509 (Ukraine)

Wenjie Liao, Xinzheng Lu, Yifan Fei, Yi Gu, Yuli Huang. Generative AI design for building structures. Automation in Construction. 2024, Vol. 157, 105187. ISSN 0926-5805. DOI: 10.1016/j.autcon.2023.105187. Netherlands, Amsterdam: Elsevier B.V. (Netherlands)

Hao Leng, Yuqing Gao, Ying Zhou.ArchiDiffusion: A novel diffusion model connecting architectural layout generation from sketches to Shear Wall Design. Journal of Building Engineering. 2024, Vol.98,111373.ISSN 2352-7102. DOI: 10.1016/j.jobe.2024.111373.Netherlands: Elsevier B.V. (Netherlands)

Zhuang Tan, Sizhong Qin, Kongguo Hu, Wenjie Liao, Yuan Gao, Xinzheng Lu. Intelligent generation and optimization method for the retrofit design of RC frame structures using buckling-restrained braces. Earthquake Engineering and Structural Dynamics. 2024, 14 November. DOI: 10.1002 / eqe. 4268. United Kingdom: John Wiley and Sons Ltd. (United Kingdom)

Botvinovska S., Getun G., Zolotova A., Korbut I., Nikolaenko T., Parnenko V., Rodin R. General procedure for determining the geometric parameters of tools in the technological systems involving machining by cutting. Eastern-European Journal of Enterprise Technologies. Vol. 1 No. 1 (109) (2021): Engineering technological systems. Published: 2021-02-19. year 6-12. UDC 621.9 DOI: 0.15587/1729-4061.2021.224897 (Ukraine)

Ivanchenko G.M., Getun G.V., Bezklubenko I.S., Solomin A.V., Getun S.Y. Mathematical model of the stress-strain state of multilayered structures with different elastic properties // Strength of Materials and Theory of Structures: Scientific-&-Technical collected articles – Kyiv: KNUBA, 2024. – Issue 113. – P. 131-138. http://opir.knuba.edu.ua/ http:/omtc.knuba.edu.ua/ DOI: 10.32347/2410-2547.2024.113.131-138 (Ukraine)

Getun G.V., Butsenko Y.P., Labzhynsky V.A., Balina O.I., Bezklubenko I.S., SolominA.V. Prognozuvannya sytuatsiy ta optymizatsiya pryinyattya rishen' na osnovi skinchennykh lantsihiv Markova v raionakh z promislovym zabrudnennyam (Situation forecasting and decision-making optimizations based on using markov finite chains for areas with industrial polutions). // Strength of Materials and Theory of Structures: Scientific-&-Technical collected articles – Kyiv: KNUBA, K: 2020. Issue 104. - P. 164-174. ISSN 2410-2547. DOI: 10.32347/2410-2547.2020.104.164-174 (Ukraine)

Ying Zhou, Hao Leng, Shiqiao Meng, Hao Wu, Zheng Zhang. StructDiffusion: End-to-end intelligent shear wall structure layout generation and analysis using diffusion model. Engineering Structures, Volume 309, 2024, 118068. ISSN 0141-0296. DOI: 10.1016/j.engstruct.2024.118068. United Kingdom: Elsevier B.V. (United Kingdom)

R. Rombach, A. Blattmann, D. Lorenz, P. Esserand B. Ommer. High-Resolution Image Synthesis with Latent Diffusion Models. IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), NewOrleans, LA, USA, 2022, pp. 10674-10685, DOI: 10.1109/CVPR52688.2022.01042 (UnitedStatesofAmerica).

Ho, Jonathan, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 2020, 33: 6840-6851.. https://doi.org/10.48550/arXiv.2006.11239

Song, Yang, and Stefano Ermon. Improved techniques for training score-based generative models. Advances in neural information processing systems, 2020, 33: 12438-12448. https://doi.org/10.48550/arXiv.2006.09011

Weng, Lilian. What are diffusion models? Lil’Log. 2021, Jul.https://lilianweng.github.io/posts/2021-07-11-diffusion-models/.

Ronneberger, Olaf, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. Medical image computing and computer-assisted intervention–MICCAI 2015: 18th international conference, Munich, Germany, October 5–9, 2015, proceedings, part III 18. Springer International Publishing, 2015. https://doi.org/10.48550/arXiv.1505.04597.

One Trainer. https://github.com/Nerogar/OneTrainer

Hu, E. J., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., ... & Chen, W.LoRA: Low-rank adaptation of Large Language Models. arXiv preprint arXiv:2106.09685, 2021.https://doi.org/10.48550/arXiv.2106.09685.

Downloads

Published

2025-04-25

Issue

Section

Статті