{"id":67,"date":"2023-10-13T15:24:34","date_gmt":"2023-10-13T07:24:34","guid":{"rendered":"https:\/\/www.1ai.net\/?p=67"},"modified":"2024-04-03T10:40:18","modified_gmt":"2024-04-03T02:40:18","slug":"stable-diffusion%e5%b0%8f%e7%9f%a5%e8%af%86%ef%bc%9a%e4%bb%80%e4%b9%88%e6%98%aflora%e6%a8%a1%e5%9e%8b%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.1ai.net\/en\/67.html","title":{"rendered":"Stable Diffusion Tips: What is the LoRA model?"},"content":{"rendered":"<p>When you first come into contact with stable diffusion, you will hear a lot of professional terms, including<a href=\"https:\/\/www.1ai.net\/en\/tag\/lora\" title=\"_Other Organiser\" target=\"_blank\" >LoRA<\/a>The model will definitely be mentioned, so what is the LoRA model? What does it do?<\/p>\n<p>The full name of the LoRA model is: Low-Rank Adaptation of Large Language Models. It can be understood as a plug-in in Stable-Diffusion. It is a model that can be trained with only a small amount of data. When generating images, the LoRA model will be used in conjunction with the large model to adjust the output image results.<\/p>\n<p>Let&#039;s take an example that is easier to understand: the big model is like a person without makeup, and the LoRA model is like a person who has undergone makeup, plastic surgery or cosplay, but the inner part is still the foundation of the big model. Of course, the LoRA model is not limited to characters, scenes, animations, and styles all have corresponding LoRAs.<\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<p>Let&#039;s take a look at the effect of the LoRA model with actual examples. The large model and LoRA model used this time are as follows. You can visit and download them for your own experience:<\/p>\n<p><strong>Large model: CamelliaMIx_2.5D_V2<\/strong><\/p>\n<p><strong>LoRA model: Yae Miko | Realistic Genshin LORA<\/strong><\/p>\n<p><strong>LoRA Model: Adventurers<\/strong><\/p>\n<p><strong>LoRA model: Elegant hanfu ruqun style<\/strong><\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<p><strong>1. Large model: CamelliaMIx_2.5D_V2 + LoRA model: Yae Miko | Realistic Genshin LORA comparison<\/strong><\/p>\n<p>Prompt: (masterpiece:1.2, best quality), (real picture, intricate details), 1girl, solo, upper body, casual, Small eyes, short hair, minimal makeup, natural fabrics, close-up face, smile, home, white cropped shirt<\/p>\n<p><strong>1-1. The effect of using only the large model (see the figure below)<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7107\" title=\"89226A12-8D5A-6468-BF58-48A13EAF5F3E\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/89226A12-8D5A-6468-BF58-48A13EAF5F3E.png\" alt=\"89226A12-8D5A-6468-BF58-48A13EAF5F3E\" width=\"1536\" height=\"1536\" \/><\/p>\n<p><strong>1-2. Effect of using large model + LoRA model (see the figure below)<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7108\" title=\"7D76F656-9CB7-4381-EEF4-6CB06A50245A\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/7D76F656-9CB7-4381-EEF4-6CB06A50245A.png\" alt=\"7D76F656-9CB7-4381-EEF4-6CB06A50245A\" width=\"1536\" height=\"1536\" \/><\/p>\n<p>Summary: When the LoRA model is used and the prompt is not adjusted, the output effect changes significantly, making the final result more inclined to the LoRA style.<\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<p><strong>2. Large model: CamelliaMIx_2.5D_V2 + LoRA model: Adventurers comparison<\/strong><\/p>\n<p>There are three groups of comparison items in this graph: 1. Adding LoRA without new prompt words; 2. Adding new prompt words without LoRA; 3. Adding LoRA with new prompt words;<\/p>\n<p>A new concept (Trigger Words) is introduced here. The function of Trigger Words is to activate specific content in the LoRA model and let LoRA know that we want to use this thing. Trigger Words are written into the model when the LoRA model is made.<\/p>\n<p><strong>The Trigger Words for LoRA model Adventurers are as follows:<\/strong>Trigger Words: ARMOR, KNIGHT, ROGUE, PALADIN, WARRIOR, BERSERKER, RANGER, CLERIC, MUSKETEER, VALKYRIE, PIRATE<\/p>\n<p><strong>2-1. Use the large model + LoRA model + prompt word without modification (see the figure below)<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7106\" title=\"19FC4293-87A1-0FFA-9ABD-15DD0D77D4E1\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/19FC4293-87A1-0FFA-9ABD-15DD0D77D4E1.png\" alt=\"19FC4293-87A1-0FFA-9ABD-15DD0D77D4E1\" width=\"1536\" height=\"1536\" \/><\/p>\n<p><strong>2-2. Using large models + prompt words has additional effects (see the figure below)<\/strong><\/p>\n<p>New prompts: ARMOR, KNIGHT, ROGUE, PALADIN, WARRIOR, BERSERKER, RANGER, CLERIC, MUSKETEER, VALKYRIE, PIRATE<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7105\" title=\"E1C938F0-CE63-669E-3E8F-A741CEE9C622\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/E1C938F0-CE63-669E-3E8F-A741CEE9C622.png\" alt=\"E1C938F0-CE63-669E-3E8F-A741CEE9C622\" width=\"1536\" height=\"1536\" \/><\/p>\n<p><strong>2-3. Using the large model + LoRA model + prompt words has additional effects (see the figure below)<\/strong><\/p>\n<p>New prompts: ARMOR, KNIGHT, ROGUE, PALADIN, WARRIOR, BERSERKER, RANGER, CLERIC, MUSKETEER, VALKYRIE, PIRATE<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7109\" title=\"830D541A-0A5D-968F-EAB1-8A8C669F98B2\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/830D541A-0A5D-968F-EAB1-8A8C669F98B2.png\" alt=\"830D541A-0A5D-968F-EAB1-8A8C669F98B2\" width=\"1536\" height=\"1536\" \/><\/p>\n<p>Summary: When there is no LoRA model, adding new prompt words can show some of the effects of prompt words, but the texture of armor and other items is poor. After adding the LoRA model, the texture of armor and other items is obviously improved. This is the beautification effect of LoRA.<\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<p><strong>3. Large model: CamelliaMIx_2.5D_V2 + LoRA model: Elegant hanfu ruqun style comparison<\/strong><\/p>\n<p>The comparison items of this graph are still: 1. Adding LoRA without new prompt words; 2. No LoRA with new prompt words; 3. Adding LoRA with new prompt words;<\/p>\n<p>The trigger words of the LoRA model Elegant hanfu ruqun style are as follows:ru_qun<\/p>\n<p><strong>3-1. Using the large model + LoRA model + prompt words has no additional effect (see the figure below)<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7111\" title=\"A0D827B2-5A54-498F-7CBB-7F5321D58C31\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/A0D827B2-5A54-498F-7CBB-7F5321D58C31.png\" alt=\"A0D827B2-5A54-498F-7CBB-7F5321D58C31\" width=\"1536\" height=\"1536\" \/><\/p>\n<p><strong>3-2. Use large models +\u00a0<\/strong>Prompt words have new effects<strong>(See the picture below)<\/strong><\/p>\n<p>New prompt words: (hanfu:0.9), (ru_qun:1.1)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7112\" title=\"EF9F780F-F6E8-5228-56FF-7298BD0AF8B0\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/EF9F780F-F6E8-5228-56FF-7298BD0AF8B0.png\" alt=\"EF9F780F-F6E8-5228-56FF-7298BD0AF8B0\" width=\"1536\" height=\"1536\" \/><\/p>\n<p><strong>3-3. Using the large model + LoRA model + prompt words has additional effects (see the figure below)<\/strong><\/p>\n<p>New prompt words: (hanfu:0.9), (ru_qun:1.1)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7110\" title=\"00C44453-4127-29F6-99B8-2B7F3C1253EA\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/00C44453-4127-29F6-99B8-2B7F3C1253EA.png\" alt=\"00C44453-4127-29F6-99B8-2B7F3C1253EA\" width=\"1536\" height=\"1536\" \/><\/p>\n<p>Summary: As shown in Case 2, the style of the output image cannot be completely changed by the prompt words alone. When combined with the LoRA model, the output image style will be greatly changed.<\/p>","protected":false},"excerpt":{"rendered":"<p>When people first come into contact with stable diffusion, they will hear a lot of jargon, among which LoRA model is bound to be mentioned, so what is LoRA model? What is LoRA model and what does it do? The full name of LoRA model is Low-Rank Adaptation of Large Language Models, which can be understood as a plug-in in Stable-Diffusion, and only requires a small amount of data to train a model. When generating images, LoRA model will be used in conjunction with the large model to realize the adjustment of the output image results. Let's take a more understandable example: the big model is a pixel-faced person, and the LoRA model is like a person who has undergone make-up, plastic surgery, or cosplay.<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[149,144],"tags":[185,197,198],"collection":[262],"class_list":{"0":"post-67","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-jiaocheng","7":"category-baike","8":"tag-lora","9":"tag-stable-diffusion","11":"collection-stablediffusion"},"acf":[],"_links":{"self":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/comments?post=67"}],"version-history":[{"count":0,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/tags?post=67"},{"taxonomy":"collection","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/collection?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}