import{s as wl,o as Tl,n as Re}from"../chunks/scheduler.182ea377.js";import{S as Jl,i as $l,g as d,s as i,r as c,A as Ul,h as m,f as l,c as n,j as Ml,u as y,x as f,k as S,y as Zl,a as s,v as g,d as M,t as b,w}from"../chunks/index.abf12888.js";import{T as Le}from"../chunks/Tip.230e2334.js";import{C as Z}from"../chunks/CodeBlock.57fe6e13.js";import{D as jl}from"../chunks/DocNotebookDropdown.5fa27ace.js";import{H as Ce}from"../chunks/Heading.16916d63.js";import{H as vl,a as bl}from"../chunks/HfOption.fc88c804.js";function Wl(U){let a,T='Feel free to browse the <a href="https://huggingface.co/spaces/sd-concepts-library/stable-diffusion-conceptualizer" rel="nofollow">Stable Diffusion Conceptualizer</a>, <a href="https://huggingface.co/spaces/multimodalart/LoraTheExplorer" rel="nofollow">LoRA the Explorer</a>, and the <a href="https://huggingface.co/spaces/huggingface-projects/diffusers-gallery" rel="nofollow">Diffusers Models Gallery</a> for checkpoints and embeddings to use.';return{c(){a=d("p"),a.innerHTML=T},l(o){a=m(o,"P",{"data-svelte-h":!0}),f(a)!=="svelte-unc393"&&(a.innerHTML=T)},m(o,u){s(o,a,u)},p:Re,d(o){o&&l(a)}}}function _l(U){let a,T='LoRA is a very general training technique that can be used with other training methods. For example, it is common to train a model with DreamBooth and LoRA. It is also increasingly common to load and merge multiple LoRAs to create new and unique images. You can learn more about it in the in-depth <a href="merge_loras">Merge LoRAs</a> guide since merging is outside the scope of this loading guide.';return{c(){a=d("p"),a.innerHTML=T},l(o){a=m(o,"P",{"data-svelte-h":!0}),f(a)!=="svelte-bp0omm"&&(a.innerHTML=T)},m(o,u){s(o,a,u)},p:Re,d(o){o&&l(a)}}}function Bl(U){let a,T='For both <a href="/docs/diffusers/v0.27.2/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline.load_lora_weights">load_lora_weights()</a> and <a href="/docs/diffusers/v0.27.2/en/api/loaders/unet#diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs">load_attn_procs()</a>, you can pass the <code>cross_attention_kwargs={&quot;scale&quot;: 0.5}</code> parameter to adjust how much of the LoRA weights to use. A value of <code>0</code> is the same as only using the base model weights, and a value of <code>1</code> is equivalent to using the fully finetuned LoRA.';return{c(){a=d("p"),a.innerHTML=T},l(o){a=m(o,"P",{"data-svelte-h":!0}),f(a)!=="svelte-17nsz8d"&&(a.innerHTML=T)},m(o,u){s(o,a,u)},p:Re,d(o){o&&l(a)}}}function Gl(U){let a,T="Some limitations of using Kohya LoRAs with 🤗 Diffusers include:",o,u,h='<li>Images may not look like those generated by UIs - like ComfyUI - for multiple reasons, which are explained <a href="https://github.com/huggingface/diffusers/pull/4287/#issuecomment-1655110736" rel="nofollow">here</a>.</li> <li><a href="https://github.com/KohakuBlueleaf/LyCORIS" rel="nofollow">LyCORIS checkpoints</a> aren’t fully supported. The <a href="/docs/diffusers/v0.27.2/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline.load_lora_weights">load_lora_weights()</a> method loads LyCORIS checkpoints with LoRA and LoCon modules, but Hada and LoKR are not supported.</li>';return{c(){a=d("p"),a.textContent=T,o=i(),u=d("ul"),u.innerHTML=h},l(r){a=m(r,"P",{"data-svelte-h":!0}),f(a)!=="svelte-1aa8at7"&&(a.textContent=T),o=n(r),u=m(r,"UL",{"data-svelte-h":!0}),f(u)!=="svelte-z9grjj"&&(u.innerHTML=h)},m(r,$){s(r,a,$),s(r,o,$),s(r,u,$)},p:Re,d(r){r&&(l(a),l(o),l(u))}}}function Il(U){let a,T='To load a Kohya LoRA, let’s download the <a href="https://civitai.com/models/150986/blueprintify-sd-xl-10" rel="nofollow">Blueprintify SD XL 1.0</a> checkpoint from <a href="https://civitai.com/" rel="nofollow">Civitai</a> as an example:',o,u,h,r,$='Load the LoRA checkpoint with the <a href="/docs/diffusers/v0.27.2/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline.load_lora_weights">load_lora_weights()</a> method, and specify the filename in the <code>weight_name</code> parameter:',_,j,q,B,x="Generate an image:",z,G,v,W,I;return u=new Z({props:{code:"IXdnZXQlMjBodHRwcyUzQSUyRiUyRmNpdml0YWkuY29tJTJGYXBpJTJGZG93bmxvYWQlMkZtb2RlbHMlMkYxNjg3NzYlMjAtTyUyMGJsdWVwcmludGlmeS1zZC14bC0xMC5zYWZldGVuc29ycw==",highlighted:"!wget https://civitai.com/api/download/models/168776 -O blueprintify-sd-xl-10.safetensors",wrap:!1}}),j=new Z({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUyMnBhdGglMkZ0byUyRndlaWdodHMlMjIlMkMlMjB3ZWlnaHRfbmFtZSUzRCUyMmJsdWVwcmludGlmeS1zZC14bC0xMC5zYWZldGVuc29ycyUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch

pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline.load_lora_weights(<span class="hljs-string">&quot;path/to/weights&quot;</span>, weight_name=<span class="hljs-string">&quot;blueprintify-sd-xl-10.safetensors&quot;</span>)`,wrap:!1}}),G=new Z({props:{code:"JTIzJTIwdXNlJTIwYmwzdXByaW50JTIwaW4lMjB0aGUlMjBwcm9tcHQlMjB0byUyMHRyaWdnZXIlMjB0aGUlMjBMb1JBJTBBcHJvbXB0JTIwJTNEJTIwJTIyYmwzdXByaW50JTJDJTIwYSUyMGhpZ2hseSUyMGRldGFpbGVkJTIwYmx1ZXByaW50JTIwb2YlMjB0aGUlMjBlaWZmZWwlMjB0b3dlciUyQyUyMGV4cGxhaW5pbmclMjBob3clMjB0byUyMGJ1aWxkJTIwYWxsJTIwcGFydHMlMkMlMjBtYW55JTIwdHh0JTJDJTIwYmx1ZXByaW50JTIwZ3JpZCUyMGJhY2tkcm9wJTIyJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQpLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`<span class="hljs-comment"># use bl3uprint in the prompt to trigger the LoRA</span>
prompt = <span class="hljs-string">&quot;bl3uprint, a highly detailed blueprint of the eiffel tower, explaining how to build all parts, many txt, blueprint grid backdrop&quot;</span>
image = pipeline(prompt).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),W=new Le({props:{warning:!0,$$slots:{default:[Gl]},$$scope:{ctx:U}}}),{c(){a=d("p"),a.innerHTML=T,o=i(),c(u.$$.fragment),h=i(),r=d("p"),r.innerHTML=$,_=i(),c(j.$$.fragment),q=i(),B=d("p"),B.textContent=x,z=i(),c(G.$$.fragment),v=i(),c(W.$$.fragment)},l(p){a=m(p,"P",{"data-svelte-h":!0}),f(a)!=="svelte-1xg7vsu"&&(a.innerHTML=T),o=n(p),y(u.$$.fragment,p),h=n(p),r=m(p,"P",{"data-svelte-h":!0}),f(r)!=="svelte-qm4skx"&&(r.innerHTML=$),_=n(p),y(j.$$.fragment,p),q=n(p),B=m(p,"P",{"data-svelte-h":!0}),f(B)!=="svelte-1un5bjt"&&(B.textContent=x),z=n(p),y(G.$$.fragment,p),v=n(p),y(W.$$.fragment,p)},m(p,J){s(p,a,J),s(p,o,J),g(u,p,J),s(p,h,J),s(p,r,J),s(p,_,J),g(j,p,J),s(p,q,J),s(p,B,J),s(p,z,J),g(G,p,J),s(p,v,J),g(W,p,J),I=!0},p(p,J){const Xe={};J&2&&(Xe.$$scope={dirty:J,ctx:p}),W.$set(Xe)},i(p){I||(M(u.$$.fragment,p),M(j.$$.fragment,p),M(G.$$.fragment,p),M(W.$$.fragment,p),I=!0)},o(p){b(u.$$.fragment,p),b(j.$$.fragment,p),b(G.$$.fragment,p),b(W.$$.fragment,p),I=!1},d(p){p&&(l(a),l(o),l(h),l(r),l(_),l(q),l(B),l(z),l(v)),w(u,p),w(j,p),w(G,p),w(W,p)}}}function xl(U){let a,T='Loading a checkpoint from TheLastBen is very similar. For example, to load the <a href="https://huggingface.co/TheLastBen/William_Eggleston_Style_SDXL" rel="nofollow">TheLastBen/William_Eggleston_Style_SDXL</a> checkpoint:',o,u,h;return u=new Z({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUyMlRoZUxhc3RCZW4lMkZXaWxsaWFtX0VnZ2xlc3Rvbl9TdHlsZV9TRFhMJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJ3ZWdnLnNhZmV0ZW5zb3JzJTIyKSUwQSUwQSUyMyUyMHVzZSUyMGJ5JTIwd2lsbGlhbSUyMGVnZ2xlc3RvbiUyMGluJTIwdGhlJTIwcHJvbXB0JTIwdG8lMjB0cmlnZ2VyJTIwdGhlJTIwTG9SQSUwQXByb21wdCUyMCUzRCUyMCUyMmElMjBob3VzZSUyMGJ5JTIwd2lsbGlhbSUyMGVnZ2xlc3RvbiUyQyUyMHN1bnJheXMlMkMlMjBiZWF1dGlmdWwlMkMlMjBzdW5saWdodCUyQyUyMHN1bnJheXMlMkMlMjBiZWF1dGlmdWwlMjIlMEFpbWFnZSUyMCUzRCUyMHBpcGVsaW5lKHByb21wdCUzRHByb21wdCkuaW1hZ2VzJTVCMCU1RCUwQWltYWdl",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch

pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline.load_lora_weights(<span class="hljs-string">&quot;TheLastBen/William_Eggleston_Style_SDXL&quot;</span>, weight_name=<span class="hljs-string">&quot;wegg.safetensors&quot;</span>)

<span class="hljs-comment"># use by william eggleston in the prompt to trigger the LoRA</span>
prompt = <span class="hljs-string">&quot;a house by william eggleston, sunrays, beautiful, sunlight, sunrays, beautiful&quot;</span>
image = pipeline(prompt=prompt).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),{c(){a=d("p"),a.innerHTML=T,o=i(),c(u.$$.fragment)},l(r){a=m(r,"P",{"data-svelte-h":!0}),f(a)!=="svelte-qdt5l0"&&(a.innerHTML=T),o=n(r),y(u.$$.fragment,r)},m(r,$){s(r,a,$),s(r,o,$),g(u,r,$),h=!0},p:Re,i(r){h||(M(u.$$.fragment,r),h=!0)},o(r){b(u.$$.fragment,r),h=!1},d(r){r&&(l(a),l(o)),w(u,r)}}}function Cl(U){let a,T,o,u;return a=new bl({props:{id:"other-trainers",option:"Kohya",$$slots:{default:[Il]},$$scope:{ctx:U}}}),o=new bl({props:{id:"other-trainers",option:"TheLastBen",$$slots:{default:[xl]},$$scope:{ctx:U}}}),{c(){c(a.$$.fragment),T=i(),c(o.$$.fragment)},l(h){y(a.$$.fragment,h),T=n(h),y(o.$$.fragment,h)},m(h,r){g(a,h,r),s(h,T,r),g(o,h,r),u=!0},p(h,r){const $={};r&2&&($.$$scope={dirty:r,ctx:h}),a.$set($);const _={};r&2&&(_.$$scope={dirty:r,ctx:h}),o.$set(_)},i(h){u||(M(a.$$.fragment,h),M(o.$$.fragment,h),u=!0)},o(h){b(a.$$.fragment,h),b(o.$$.fragment,h),u=!1},d(h){h&&l(T),w(a,h),w(o,h)}}}function Rl(U){let a,T=`Diffusers currently only supports IP-Adapter for some of the most popular pipelines. Feel free to open a feature request if you have a cool use case and want to integrate IP-Adapter with an unsupported pipeline!
Official IP-Adapter checkpoints are available from <a href="https://huggingface.co/h94/IP-Adapter" rel="nofollow">h94/IP-Adapter</a>.`;return{c(){a=d("p"),a.innerHTML=T},l(o){a=m(o,"P",{"data-svelte-h":!0}),f(a)!=="svelte-13d91fo"&&(a.innerHTML=T)},m(o,u){s(o,a,u)},p:Re,d(o){o&&l(a)}}}function Xl(U){let a,T,o,u,h,r,$,_,j,q='There are several <a href="../training/overview">training</a> techniques for personalizing diffusion models to generate images of a specific subject or images in certain styles. Each of these training methods produces a different type of adapter. Some of the adapters generate an entirely new model, while other adapters only modify a smaller set of embeddings or weights. This means the loading process for each adapter is also different.',B,x,z="This guide will show you how to load DreamBooth, textual inversion, and LoRA weights.",G,v,W,I,p,J,Xe='<a href="https://dreambooth.github.io/" rel="nofollow">DreamBooth</a> finetunes an <em>entire diffusion model</em> on just several images of a subject to generate images of that subject in new styles and settings. This method works by using a special word in the prompt that the model learns to associate with the subject image. Of all the training methods, DreamBooth produces the largest file size (usually a few GBs) because it is a full checkpoint model.',He,N,Lt='Let’s load the <a href="https://huggingface.co/sd-dreambooth-library/herge-style" rel="nofollow">herge_style</a> checkpoint, which is trained on just 10 images drawn by Hergé, to generate images in that style. For it to work, you need to include the special word <code>herge_style</code> in your prompt to trigger the checkpoint:',Ve,A,Qe,C,Ht='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_dreambooth.png"/>',Ye,P,Fe,E,Vt='<a href="https://textual-inversion.github.io/" rel="nofollow">Textual inversion</a> is very similar to DreamBooth and it can also personalize a diffusion model to generate certain concepts (styles, objects) from just a few images. This method works by training and finding new embeddings that represent the images you provide with a special word in the prompt. As a result, the diffusion model weights stay the same and the training process produces a relatively tiny (a few KBs) file.',Se,D,Qt="Because textual inversion creates embeddings, it cannot be used on its own like DreamBooth and requires another model.",qe,K,ze,O,Yt='Now you can load the textual inversion embeddings with the <a href="/docs/diffusers/v0.27.2/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline.load_textual_inversion">load_textual_inversion()</a> method and generate some images. Let’s load the <a href="https://huggingface.co/sd-concepts-library/gta5-artwork" rel="nofollow">sd-concepts-library/gta5-artwork</a> embeddings and you’ll need to include the special word <code>&lt;gta5-artwork&gt;</code> in your prompt to trigger it:',Ne,ee,Ae,R,Ft='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_txt_embed.png"/>',Pe,te,St='Textual inversion can also be trained on undesirable things to create <em>negative embeddings</em> to discourage a model from generating images with those undesirable things like blurry images or extra fingers on a hand. This can be an easy way to quickly improve your prompt. You’ll also load the embeddings with <a href="/docs/diffusers/v0.27.2/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline.load_textual_inversion">load_textual_inversion()</a>, but this time, you’ll need two more parameters:',Ee,le,qt="<li><code>weight_name</code>: specifies the weight file to load if the file was saved in the 🤗 Diffusers format with a specific name or if the file is stored in the A1111 format</li> <li><code>token</code>: specifies the special word to use in the prompt to trigger the embeddings</li>",De,se,zt='Let’s load the <a href="https://huggingface.co/sayakpaul/EasyNegative-test" rel="nofollow">sayakpaul/EasyNegative-test</a> embeddings:',Ke,ae,Oe,ie,Nt="Now you can use the <code>token</code> to generate an image with the negative embeddings:",et,ne,tt,X,At='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_neg_embed.png"/>',lt,oe,st,pe,Pt='<a href="https://huggingface.co/papers/2106.09685" rel="nofollow">Low-Rank Adaptation (LoRA)</a> is a popular training technique because it is fast and generates smaller file sizes (a couple hundred MBs). Like the other methods in this guide, LoRA can train a model to learn new styles from just a few images. It works by inserting new weights into the diffusion model and then only the new weights are trained instead of the entire model. This makes LoRAs faster to train and easier to store.',at,k,it,re,Et="LoRAs also need to be used with another model:",nt,de,ot,me,Dt='Then use the <a href="/docs/diffusers/v0.27.2/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline.load_lora_weights">load_lora_weights()</a> method to load the <a href="https://huggingface.co/ostris/super-cereal-sdxl-lora" rel="nofollow">ostris/super-cereal-sdxl-lora</a> weights and specify the weights filename from the repository:',pt,fe,rt,L,Kt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_lora.png"/>',dt,ue,Ot='The <a href="/docs/diffusers/v0.27.2/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline.load_lora_weights">load_lora_weights()</a> method loads LoRA weights into both the UNet and text encoder. It is the preferred way for loading LoRAs because it can handle cases where:',mt,he,el="<li>the LoRA weights don’t have separate identifiers for the UNet and text encoder</li> <li>the LoRA weights have separate identifiers for the UNet and text encoder</li>",ft,ce,tl='But if you only need to load LoRA weights into the UNet, then you can use the <a href="/docs/diffusers/v0.27.2/en/api/loaders/unet#diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs">load_attn_procs()</a> method. Let’s load the <a href="https://huggingface.co/jbilcke-hf/sdxl-cinematic-1" rel="nofollow">jbilcke-hf/sdxl-cinematic-1</a> LoRA:',ut,ye,ht,H,ll='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_attn_proc.png"/>',ct,V,yt,ge,sl='To unload the LoRA weights, use the <a href="/docs/diffusers/v0.27.2/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.unload_lora_weights">unload_lora_weights()</a> method to discard the LoRA weights and restore the model to its original weights:',gt,Me,Mt,be,bt,we,al='Other popular LoRA trainers from the community include those by <a href="https://github.com/kohya-ss/sd-scripts/" rel="nofollow">Kohya</a> and <a href="https://github.com/TheLastBen/fast-stable-diffusion" rel="nofollow">TheLastBen</a>. These trainers create different LoRA checkpoints than those trained by 🤗 Diffusers, but they can still be loaded in the same way.',wt,Q,Tt,Te,Jt,Je,il='<a href="https://ip-adapter.github.io/" rel="nofollow">IP-Adapter</a> is a lightweight adapter that enables image prompting for any diffusion model. This adapter works by decoupling the cross-attention layers of the image and text features. All the other model components are frozen and only the embedded image features in the UNet are trained. As a result, IP-Adapter files are typically only ~100MBs.',$t,$e,nl='You can learn more about how to use IP-Adapter for different tasks and specific use cases in the <a href="../using-diffusers/ip_adapter">IP-Adapter</a> guide.',Ut,Y,Zt,Ue,ol="To start, load a Stable Diffusion checkpoint.",jt,Ze,vt,je,pl='Then load the IP-Adapter weights and add it to the pipeline with the <a href="/docs/diffusers/v0.27.2/en/api/loaders/ip_adapter#diffusers.loaders.IPAdapterMixin.load_ip_adapter">load_ip_adapter()</a> method.',Wt,ve,_t,We,rl="Once loaded, you can use the pipeline with an image and text prompt to guide the image generation process.",Bt,_e,Gt,F,dl='    <img src="https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/ip-bear.png"/>',It,Be,xt,Ge,ml='IP-Adapter relies on an image encoder to generate image features. If the IP-Adapter repository contains an <code>image_encoder</code> subfolder, the image encoder is automatically loaded and registered to the pipeline. Otherwise, you’ll need to explicitly load the image encoder with a <a href="https://huggingface.co/docs/transformers/v4.39.0/en/model_doc/clip#transformers.CLIPVisionModelWithProjection" rel="nofollow">CLIPVisionModelWithProjection</a> model and pass it to the pipeline.',Ct,Ie,fl="This is the case for <em>IP-Adapter Plus</em> checkpoints which use the ViT-H image encoder.",Rt,xe,Xt,ke,kt;return h=new Ce({props:{title:"Load adapters",local:"load-adapters",headingTag:"h1"}}),$=new jl({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/loading_adapters.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/pytorch/loading_adapters.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/tensorflow/loading_adapters.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/loading_adapters.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/pytorch/loading_adapters.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/tensorflow/loading_adapters.ipynb"}]}}),v=new Le({props:{$$slots:{default:[Wl]},$$scope:{ctx:U}}}),I=new Ce({props:{title:"DreamBooth",local:"dreambooth",headingTag:"h2"}}),A=new Z({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIyc2QtZHJlYW1ib290aC1saWJyYXJ5JTJGaGVyZ2Utc3R5bGUlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIpJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMGN1dGUlMjBoZXJnZV9zdHlsZSUyMGJyb3duJTIwYmVhciUyMGVhdGluZyUyMGElMjBzbGljZSUyMG9mJTIwcGl6emElMkMlMjBzdHVubmluZyUyMGNvbG9yJTIwc2NoZW1lJTJDJTIwbWFzdGVycGllY2UlMkMlMjBpbGx1c3RyYXRpb24lMjIlMEFpbWFnZSUyMCUzRCUyMHBpcGVsaW5lKHByb21wdCkuaW1hZ2VzJTVCMCU1RCUwQWltYWdl",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch

pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;sd-dreambooth-library/herge-style&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
prompt = <span class="hljs-string">&quot;A cute herge_style brown bear eating a slice of pizza, stunning color scheme, masterpiece, illustration&quot;</span>
image = pipeline(prompt).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),P=new Ce({props:{title:"Textual inversion",local:"textual-inversion",headingTag:"h2"}}),K=new Z({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch

pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),ee=new Z({props:{code:"cGlwZWxpbmUubG9hZF90ZXh0dWFsX2ludmVyc2lvbiglMjJzZC1jb25jZXB0cy1saWJyYXJ5JTJGZ3RhNS1hcnR3b3JrJTIyKSUwQXByb21wdCUyMCUzRCUyMCUyMkElMjBjdXRlJTIwYnJvd24lMjBiZWFyJTIwZWF0aW5nJTIwYSUyMHNsaWNlJTIwb2YlMjBwaXp6YSUyQyUyMHN0dW5uaW5nJTIwY29sb3IlMjBzY2hlbWUlMkMlMjBtYXN0ZXJwaWVjZSUyQyUyMGlsbHVzdHJhdGlvbiUyQyUyMCUzQ2d0YTUtYXJ0d29yayUzRSUyMHN0eWxlJTIyJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQpLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`pipeline.load_textual_inversion(<span class="hljs-string">&quot;sd-concepts-library/gta5-artwork&quot;</span>)
prompt = <span class="hljs-string">&quot;A cute brown bear eating a slice of pizza, stunning color scheme, masterpiece, illustration, &lt;gta5-artwork&gt; style&quot;</span>
image = pipeline(prompt).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),ae=new Z({props:{code:"cGlwZWxpbmUubG9hZF90ZXh0dWFsX2ludmVyc2lvbiglMEElMjAlMjAlMjAlMjAlMjJzYXlha3BhdWwlMkZFYXN5TmVnYXRpdmUtdGVzdCUyMiUyQyUyMHdlaWdodF9uYW1lJTNEJTIyRWFzeU5lZ2F0aXZlLnNhZmV0ZW5zb3JzJTIyJTJDJTIwdG9rZW4lM0QlMjJFYXN5TmVnYXRpdmUlMjIlMEEp",highlighted:`pipeline.load_textual_inversion(
    <span class="hljs-string">&quot;sayakpaul/EasyNegative-test&quot;</span>, weight_name=<span class="hljs-string">&quot;EasyNegative.safetensors&quot;</span>, token=<span class="hljs-string">&quot;EasyNegative&quot;</span>
)`,wrap:!1}}),ne=new Z({props:{code:"cHJvbXB0JTIwJTNEJTIwJTIyQSUyMGN1dGUlMjBicm93biUyMGJlYXIlMjBlYXRpbmclMjBhJTIwc2xpY2UlMjBvZiUyMHBpenphJTJDJTIwc3R1bm5pbmclMjBjb2xvciUyMHNjaGVtZSUyQyUyMG1hc3RlcnBpZWNlJTJDJTIwaWxsdXN0cmF0aW9uJTJDJTIwRWFzeU5lZ2F0aXZlJTIyJTBBbmVnYXRpdmVfcHJvbXB0JTIwJTNEJTIwJTIyRWFzeU5lZ2F0aXZlJTIyJTBBJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlMkMlMjBuZWdhdGl2ZV9wcm9tcHQlM0RuZWdhdGl2ZV9wcm9tcHQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENTApLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`prompt = <span class="hljs-string">&quot;A cute brown bear eating a slice of pizza, stunning color scheme, masterpiece, illustration, EasyNegative&quot;</span>
negative_prompt = <span class="hljs-string">&quot;EasyNegative&quot;</span>

image = pipeline(prompt, negative_prompt=negative_prompt, num_inference_steps=<span class="hljs-number">50</span>).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),oe=new Ce({props:{title:"LoRA",local:"lora",headingTag:"h2"}}),k=new Le({props:{$$slots:{default:[_l]},$$scope:{ctx:U}}}),de=new Z({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch

pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),fe=new Z({props:{code:"cGlwZWxpbmUubG9hZF9sb3JhX3dlaWdodHMoJTIyb3N0cmlzJTJGc3VwZXItY2VyZWFsLXNkeGwtbG9yYSUyMiUyQyUyMHdlaWdodF9uYW1lJTNEJTIyY2VyZWFsX2JveF9zZHhsX3YxLnNhZmV0ZW5zb3JzJTIyKSUwQXByb21wdCUyMCUzRCUyMCUyMmJlYXJzJTJDJTIwcGl6emElMjBiaXRlcyUyMiUwQWltYWdlJTIwJTNEJTIwcGlwZWxpbmUocHJvbXB0KS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2U=",highlighted:`pipeline.load_lora_weights(<span class="hljs-string">&quot;ostris/super-cereal-sdxl-lora&quot;</span>, weight_name=<span class="hljs-string">&quot;cereal_box_sdxl_v1.safetensors&quot;</span>)
prompt = <span class="hljs-string">&quot;bears, pizza bites&quot;</span>
image = pipeline(prompt).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),ye=new Z({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLnVuZXQubG9hZF9hdHRuX3Byb2NzKCUyMmpiaWxja2UtaGYlMkZzZHhsLWNpbmVtYXRpYy0xJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJweXRvcmNoX2xvcmFfd2VpZ2h0cy5zYWZldGVuc29ycyUyMiklMEElMEElMjMlMjB1c2UlMjBjbm10JTIwaW4lMjB0aGUlMjBwcm9tcHQlMjB0byUyMHRyaWdnZXIlMjB0aGUlMjBMb1JBJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMGN1dGUlMjBjbm10JTIwZWF0aW5nJTIwYSUyMHNsaWNlJTIwb2YlMjBwaXp6YSUyQyUyMHN0dW5uaW5nJTIwY29sb3IlMjBzY2hlbWUlMkMlMjBtYXN0ZXJwaWVjZSUyQyUyMGlsbHVzdHJhdGlvbiUyMiUwQWltYWdlJTIwJTNEJTIwcGlwZWxpbmUocHJvbXB0KS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2U=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch

pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline.unet.load_attn_procs(<span class="hljs-string">&quot;jbilcke-hf/sdxl-cinematic-1&quot;</span>, weight_name=<span class="hljs-string">&quot;pytorch_lora_weights.safetensors&quot;</span>)

<span class="hljs-comment"># use cnmt in the prompt to trigger the LoRA</span>
prompt = <span class="hljs-string">&quot;A cute cnmt eating a slice of pizza, stunning color scheme, masterpiece, illustration&quot;</span>
image = pipeline(prompt).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),V=new Le({props:{$$slots:{default:[Bl]},$$scope:{ctx:U}}}),Me=new Z({props:{code:"cGlwZWxpbmUudW5sb2FkX2xvcmFfd2VpZ2h0cygp",highlighted:"pipeline.unload_lora_weights()",wrap:!1}}),be=new Ce({props:{title:"Kohya and TheLastBen",local:"kohya-and-thelastben",headingTag:"h3"}}),Q=new vl({props:{id:"other-trainers",options:["Kohya","TheLastBen"],$$slots:{default:[Cl]},$$scope:{ctx:U}}}),Te=new Ce({props:{title:"IP-Adapter",local:"ip-adapter",headingTag:"h2"}}),Y=new Le({props:{warning:!1,$$slots:{default:[Rl]},$$scope:{ctx:U}}}),Ze=new Z({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBsb2FkX2ltYWdlJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBBdXRvUGlwZWxpbmVGb3JUZXh0MkltYWdlLmZyb21fcHJldHJhaW5lZCglMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNikudG8oJTIyY3VkYSUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),ve=new Z({props:{code:"cGlwZWxpbmUubG9hZF9pcF9hZGFwdGVyKCUyMmg5NCUyRklQLUFkYXB0ZXIlMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJtb2RlbHMlMjIlMkMlMjB3ZWlnaHRfbmFtZSUzRCUyMmlwLWFkYXB0ZXJfc2QxNS5iaW4lMjIp",highlighted:'pipeline.load_ip_adapter(<span class="hljs-string">&quot;h94/IP-Adapter&quot;</span>, subfolder=<span class="hljs-string">&quot;models&quot;</span>, weight_name=<span class="hljs-string">&quot;ip-adapter_sd15.bin&quot;</span>)',wrap:!1}}),_e=new Z({props:{code:"aW1hZ2UlMjAlM0QlMjBsb2FkX2ltYWdlKCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRmh1Z2dpbmdmYWNlJTJGZG9jdW1lbnRhdGlvbi1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRmRpZmZ1c2VycyUyRmxvYWRfbmVnX2VtYmVkLnBuZyUyMiklMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5HZW5lcmF0b3IoZGV2aWNlJTNEJTIyY3B1JTIyKS5tYW51YWxfc2VlZCgzMyklMEFpbWFnZXMlMjAlM0QlMjBwaXBlbGluZSglMEElQzIlQTAlMjAlQzIlQTAlMjBwcm9tcHQlM0QnYmVzdCUyMHF1YWxpdHklMkMlMjBoaWdoJTIwcXVhbGl0eSUyQyUyMHdlYXJpbmclMjBzdW5nbGFzc2VzJyUyQyUwQSVDMiVBMCUyMCVDMiVBMCUyMGlwX2FkYXB0ZXJfaW1hZ2UlM0RpbWFnZSUyQyUwQSVDMiVBMCUyMCVDMiVBMCUyMG5lZ2F0aXZlX3Byb21wdCUzRCUyMm1vbm9jaHJvbWUlMkMlMjBsb3dyZXMlMkMlMjBiYWQlMjBhbmF0b215JTJDJTIwd29yc3QlMjBxdWFsaXR5JTJDJTIwbG93JTIwcXVhbGl0eSUyMiUyQyUwQSVDMiVBMCUyMCVDMiVBMCUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q1MCUyQyUwQSVDMiVBMCUyMCVDMiVBMCUyMGdlbmVyYXRvciUzRGdlbmVyYXRvciUyQyUwQSkuaW1hZ2VzJTVCMCU1RCUwQWltYWdlcw==",highlighted:`image = load_image(<span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_neg_embed.png&quot;</span>)
generator = torch.Generator(device=<span class="hljs-string">&quot;cpu&quot;</span>).manual_seed(<span class="hljs-number">33</span>)
images = pipeline(
    prompt=<span class="hljs-string">&#x27;best quality, high quality, wearing sunglasses&#x27;</span>,
    ip_adapter_image=image,
    negative_prompt=<span class="hljs-string">&quot;monochrome, lowres, bad anatomy, worst quality, low quality&quot;</span>,
    num_inference_steps=<span class="hljs-number">50</span>,
    generator=generator,
).images[<span class="hljs-number">0</span>]
images`,wrap:!1}}),Be=new Ce({props:{title:"IP-Adapter Plus",local:"ip-adapter-plus",headingTag:"h3"}}),xe=new Z({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBWaXNpb25Nb2RlbFdpdGhQcm9qZWN0aW9uJTBBJTBBaW1hZ2VfZW5jb2RlciUyMCUzRCUyMENMSVBWaXNpb25Nb2RlbFdpdGhQcm9qZWN0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJoOTQlMkZJUC1BZGFwdGVyJTIyJTJDJTBBJTIwJTIwJTIwJTIwc3ViZm9sZGVyJTNEJTIybW9kZWxzJTJGaW1hZ2VfZW5jb2RlciUyMiUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSklMEElMEFwaXBlbGluZSUyMCUzRCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnN0YWJpbGl0eWFpJTJGc3RhYmxlLWRpZmZ1c2lvbi14bC1iYXNlLTEuMCUyMiUyQyUwQSUyMCUyMCUyMCUyMGltYWdlX2VuY29kZXIlM0RpbWFnZV9lbmNvZGVyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQSUwQXBpcGVsaW5lLmxvYWRfaXBfYWRhcHRlciglMjJoOTQlMkZJUC1BZGFwdGVyJTIyJTJDJTIwc3ViZm9sZGVyJTNEJTIyc2R4bF9tb2RlbHMlMjIlMkMlMjB3ZWlnaHRfbmFtZSUzRCUyMmlwLWFkYXB0ZXItcGx1c19zZHhsX3ZpdC1oLnNhZmV0ZW5zb3JzJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPVisionModelWithProjection

image_encoder = CLIPVisionModelWithProjection.from_pretrained(
    <span class="hljs-string">&quot;h94/IP-Adapter&quot;</span>,
    subfolder=<span class="hljs-string">&quot;models/image_encoder&quot;</span>,
    torch_dtype=torch.float16
)

pipeline = AutoPipelineForText2Image.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>,
    image_encoder=image_encoder,
    torch_dtype=torch.float16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)

pipeline.load_ip_adapter(<span class="hljs-string">&quot;h94/IP-Adapter&quot;</span>, subfolder=<span class="hljs-string">&quot;sdxl_models&quot;</span>, weight_name=<span class="hljs-string">&quot;ip-adapter-plus_sdxl_vit-h.safetensors&quot;</span>)`,wrap:!1}}),{c(){a=d("meta"),T=i(),o=d("p"),u=i(),c(h.$$.fragment),r=i(),c($.$$.fragment),_=i(),j=d("p"),j.innerHTML=q,B=i(),x=d("p"),x.textContent=z,G=i(),c(v.$$.fragment),W=i(),c(I.$$.fragment),p=i(),J=d("p"),J.innerHTML=Xe,He=i(),N=d("p"),N.innerHTML=Lt,Ve=i(),c(A.$$.fragment),Qe=i(),C=d("div"),C.innerHTML=Ht,Ye=i(),c(P.$$.fragment),Fe=i(),E=d("p"),E.innerHTML=Vt,Se=i(),D=d("p"),D.textContent=Qt,qe=i(),c(K.$$.fragment),ze=i(),O=d("p"),O.innerHTML=Yt,Ne=i(),c(ee.$$.fragment),Ae=i(),R=d("div"),R.innerHTML=Ft,Pe=i(),te=d("p"),te.innerHTML=St,Ee=i(),le=d("ul"),le.innerHTML=qt,De=i(),se=d("p"),se.innerHTML=zt,Ke=i(),c(ae.$$.fragment),Oe=i(),ie=d("p"),ie.innerHTML=Nt,et=i(),c(ne.$$.fragment),tt=i(),X=d("div"),X.innerHTML=At,lt=i(),c(oe.$$.fragment),st=i(),pe=d("p"),pe.innerHTML=Pt,at=i(),c(k.$$.fragment),it=i(),re=d("p"),re.textContent=Et,nt=i(),c(de.$$.fragment),ot=i(),me=d("p"),me.innerHTML=Dt,pt=i(),c(fe.$$.fragment),rt=i(),L=d("div"),L.innerHTML=Kt,dt=i(),ue=d("p"),ue.innerHTML=Ot,mt=i(),he=d("ul"),he.innerHTML=el,ft=i(),ce=d("p"),ce.innerHTML=tl,ut=i(),c(ye.$$.fragment),ht=i(),H=d("div"),H.innerHTML=ll,ct=i(),c(V.$$.fragment),yt=i(),ge=d("p"),ge.innerHTML=sl,gt=i(),c(Me.$$.fragment),Mt=i(),c(be.$$.fragment),bt=i(),we=d("p"),we.innerHTML=al,wt=i(),c(Q.$$.fragment),Tt=i(),c(Te.$$.fragment),Jt=i(),Je=d("p"),Je.innerHTML=il,$t=i(),$e=d("p"),$e.innerHTML=nl,Ut=i(),c(Y.$$.fragment),Zt=i(),Ue=d("p"),Ue.textContent=ol,jt=i(),c(Ze.$$.fragment),vt=i(),je=d("p"),je.innerHTML=pl,Wt=i(),c(ve.$$.fragment),_t=i(),We=d("p"),We.textContent=rl,Bt=i(),c(_e.$$.fragment),Gt=i(),F=d("div"),F.innerHTML=dl,It=i(),c(Be.$$.fragment),xt=i(),Ge=d("p"),Ge.innerHTML=ml,Ct=i(),Ie=d("p"),Ie.innerHTML=fl,Rt=i(),c(xe.$$.fragment),Xt=i(),ke=d("p"),this.h()},l(e){const t=Ul("svelte-u9bgzb",document.head);a=m(t,"META",{name:!0,content:!0}),t.forEach(l),T=n(e),o=m(e,"P",{}),Ml(o).forEach(l),u=n(e),y(h.$$.fragment,e),r=n(e),y($.$$.fragment,e),_=n(e),j=m(e,"P",{"data-svelte-h":!0}),f(j)!=="svelte-ax3rwx"&&(j.innerHTML=q),B=n(e),x=m(e,"P",{"data-svelte-h":!0}),f(x)!=="svelte-h4deay"&&(x.textContent=z),G=n(e),y(v.$$.fragment,e),W=n(e),y(I.$$.fragment,e),p=n(e),J=m(e,"P",{"data-svelte-h":!0}),f(J)!=="svelte-yncm6r"&&(J.innerHTML=Xe),He=n(e),N=m(e,"P",{"data-svelte-h":!0}),f(N)!=="svelte-1ngpipq"&&(N.innerHTML=Lt),Ve=n(e),y(A.$$.fragment,e),Qe=n(e),C=m(e,"DIV",{class:!0,"data-svelte-h":!0}),f(C)!=="svelte-1qqjocv"&&(C.innerHTML=Ht),Ye=n(e),y(P.$$.fragment,e),Fe=n(e),E=m(e,"P",{"data-svelte-h":!0}),f(E)!=="svelte-z0bjzf"&&(E.innerHTML=Vt),Se=n(e),D=m(e,"P",{"data-svelte-h":!0}),f(D)!=="svelte-1bhtcph"&&(D.textContent=Qt),qe=n(e),y(K.$$.fragment,e),ze=n(e),O=m(e,"P",{"data-svelte-h":!0}),f(O)!=="svelte-qf77lf"&&(O.innerHTML=Yt),Ne=n(e),y(ee.$$.fragment,e),Ae=n(e),R=m(e,"DIV",{class:!0,"data-svelte-h":!0}),f(R)!=="svelte-vwb4li"&&(R.innerHTML=Ft),Pe=n(e),te=m(e,"P",{"data-svelte-h":!0}),f(te)!=="svelte-1fxgf4g"&&(te.innerHTML=St),Ee=n(e),le=m(e,"UL",{"data-svelte-h":!0}),f(le)!=="svelte-1v8nqu6"&&(le.innerHTML=qt),De=n(e),se=m(e,"P",{"data-svelte-h":!0}),f(se)!=="svelte-1eujnzn"&&(se.innerHTML=zt),Ke=n(e),y(ae.$$.fragment,e),Oe=n(e),ie=m(e,"P",{"data-svelte-h":!0}),f(ie)!=="svelte-5s5bn9"&&(ie.innerHTML=Nt),et=n(e),y(ne.$$.fragment,e),tt=n(e),X=m(e,"DIV",{class:!0,"data-svelte-h":!0}),f(X)!=="svelte-j6euo"&&(X.innerHTML=At),lt=n(e),y(oe.$$.fragment,e),st=n(e),pe=m(e,"P",{"data-svelte-h":!0}),f(pe)!=="svelte-10sp1c2"&&(pe.innerHTML=Pt),at=n(e),y(k.$$.fragment,e),it=n(e),re=m(e,"P",{"data-svelte-h":!0}),f(re)!=="svelte-l2hd9l"&&(re.textContent=Et),nt=n(e),y(de.$$.fragment,e),ot=n(e),me=m(e,"P",{"data-svelte-h":!0}),f(me)!=="svelte-1ggxinw"&&(me.innerHTML=Dt),pt=n(e),y(fe.$$.fragment,e),rt=n(e),L=m(e,"DIV",{class:!0,"data-svelte-h":!0}),f(L)!=="svelte-848z5s"&&(L.innerHTML=Kt),dt=n(e),ue=m(e,"P",{"data-svelte-h":!0}),f(ue)!=="svelte-10weqfh"&&(ue.innerHTML=Ot),mt=n(e),he=m(e,"UL",{"data-svelte-h":!0}),f(he)!=="svelte-ddcy8o"&&(he.innerHTML=el),ft=n(e),ce=m(e,"P",{"data-svelte-h":!0}),f(ce)!=="svelte-1m60aov"&&(ce.innerHTML=tl),ut=n(e),y(ye.$$.fragment,e),ht=n(e),H=m(e,"DIV",{class:!0,"data-svelte-h":!0}),f(H)!=="svelte-1etahws"&&(H.innerHTML=ll),ct=n(e),y(V.$$.fragment,e),yt=n(e),ge=m(e,"P",{"data-svelte-h":!0}),f(ge)!=="svelte-1c3njb1"&&(ge.innerHTML=sl),gt=n(e),y(Me.$$.fragment,e),Mt=n(e),y(be.$$.fragment,e),bt=n(e),we=m(e,"P",{"data-svelte-h":!0}),f(we)!=="svelte-6zj1or"&&(we.innerHTML=al),wt=n(e),y(Q.$$.fragment,e),Tt=n(e),y(Te.$$.fragment,e),Jt=n(e),Je=m(e,"P",{"data-svelte-h":!0}),f(Je)!=="svelte-1pu4ft1"&&(Je.innerHTML=il),$t=n(e),$e=m(e,"P",{"data-svelte-h":!0}),f($e)!=="svelte-18j3qom"&&($e.innerHTML=nl),Ut=n(e),y(Y.$$.fragment,e),Zt=n(e),Ue=m(e,"P",{"data-svelte-h":!0}),f(Ue)!=="svelte-w9hhyu"&&(Ue.textContent=ol),jt=n(e),y(Ze.$$.fragment,e),vt=n(e),je=m(e,"P",{"data-svelte-h":!0}),f(je)!=="svelte-177bzi"&&(je.innerHTML=pl),Wt=n(e),y(ve.$$.fragment,e),_t=n(e),We=m(e,"P",{"data-svelte-h":!0}),f(We)!=="svelte-7abk5j"&&(We.textContent=rl),Bt=n(e),y(_e.$$.fragment,e),Gt=n(e),F=m(e,"DIV",{class:!0,"data-svelte-h":!0}),f(F)!=="svelte-1vum0wo"&&(F.innerHTML=dl),It=n(e),y(Be.$$.fragment,e),xt=n(e),Ge=m(e,"P",{"data-svelte-h":!0}),f(Ge)!=="svelte-1wli7p9"&&(Ge.innerHTML=ml),Ct=n(e),Ie=m(e,"P",{"data-svelte-h":!0}),f(Ie)!=="svelte-zfljo5"&&(Ie.innerHTML=fl),Rt=n(e),y(xe.$$.fragment,e),Xt=n(e),ke=m(e,"P",{}),Ml(ke).forEach(l),this.h()},h(){S(a,"name","hf:doc:metadata"),S(a,"content",kl),S(C,"class","flex justify-center"),S(R,"class","flex justify-center"),S(X,"class","flex justify-center"),S(L,"class","flex justify-center"),S(H,"class","flex justify-center"),S(F,"class","flex justify-center")},m(e,t){Zl(document.head,a),s(e,T,t),s(e,o,t),s(e,u,t),g(h,e,t),s(e,r,t),g($,e,t),s(e,_,t),s(e,j,t),s(e,B,t),s(e,x,t),s(e,G,t),g(v,e,t),s(e,W,t),g(I,e,t),s(e,p,t),s(e,J,t),s(e,He,t),s(e,N,t),s(e,Ve,t),g(A,e,t),s(e,Qe,t),s(e,C,t),s(e,Ye,t),g(P,e,t),s(e,Fe,t),s(e,E,t),s(e,Se,t),s(e,D,t),s(e,qe,t),g(K,e,t),s(e,ze,t),s(e,O,t),s(e,Ne,t),g(ee,e,t),s(e,Ae,t),s(e,R,t),s(e,Pe,t),s(e,te,t),s(e,Ee,t),s(e,le,t),s(e,De,t),s(e,se,t),s(e,Ke,t),g(ae,e,t),s(e,Oe,t),s(e,ie,t),s(e,et,t),g(ne,e,t),s(e,tt,t),s(e,X,t),s(e,lt,t),g(oe,e,t),s(e,st,t),s(e,pe,t),s(e,at,t),g(k,e,t),s(e,it,t),s(e,re,t),s(e,nt,t),g(de,e,t),s(e,ot,t),s(e,me,t),s(e,pt,t),g(fe,e,t),s(e,rt,t),s(e,L,t),s(e,dt,t),s(e,ue,t),s(e,mt,t),s(e,he,t),s(e,ft,t),s(e,ce,t),s(e,ut,t),g(ye,e,t),s(e,ht,t),s(e,H,t),s(e,ct,t),g(V,e,t),s(e,yt,t),s(e,ge,t),s(e,gt,t),g(Me,e,t),s(e,Mt,t),g(be,e,t),s(e,bt,t),s(e,we,t),s(e,wt,t),g(Q,e,t),s(e,Tt,t),g(Te,e,t),s(e,Jt,t),s(e,Je,t),s(e,$t,t),s(e,$e,t),s(e,Ut,t),g(Y,e,t),s(e,Zt,t),s(e,Ue,t),s(e,jt,t),g(Ze,e,t),s(e,vt,t),s(e,je,t),s(e,Wt,t),g(ve,e,t),s(e,_t,t),s(e,We,t),s(e,Bt,t),g(_e,e,t),s(e,Gt,t),s(e,F,t),s(e,It,t),g(Be,e,t),s(e,xt,t),s(e,Ge,t),s(e,Ct,t),s(e,Ie,t),s(e,Rt,t),g(xe,e,t),s(e,Xt,t),s(e,ke,t),kt=!0},p(e,[t]){const ul={};t&2&&(ul.$$scope={dirty:t,ctx:e}),v.$set(ul);const hl={};t&2&&(hl.$$scope={dirty:t,ctx:e}),k.$set(hl);const cl={};t&2&&(cl.$$scope={dirty:t,ctx:e}),V.$set(cl);const yl={};t&2&&(yl.$$scope={dirty:t,ctx:e}),Q.$set(yl);const gl={};t&2&&(gl.$$scope={dirty:t,ctx:e}),Y.$set(gl)},i(e){kt||(M(h.$$.fragment,e),M($.$$.fragment,e),M(v.$$.fragment,e),M(I.$$.fragment,e),M(A.$$.fragment,e),M(P.$$.fragment,e),M(K.$$.fragment,e),M(ee.$$.fragment,e),M(ae.$$.fragment,e),M(ne.$$.fragment,e),M(oe.$$.fragment,e),M(k.$$.fragment,e),M(de.$$.fragment,e),M(fe.$$.fragment,e),M(ye.$$.fragment,e),M(V.$$.fragment,e),M(Me.$$.fragment,e),M(be.$$.fragment,e),M(Q.$$.fragment,e),M(Te.$$.fragment,e),M(Y.$$.fragment,e),M(Ze.$$.fragment,e),M(ve.$$.fragment,e),M(_e.$$.fragment,e),M(Be.$$.fragment,e),M(xe.$$.fragment,e),kt=!0)},o(e){b(h.$$.fragment,e),b($.$$.fragment,e),b(v.$$.fragment,e),b(I.$$.fragment,e),b(A.$$.fragment,e),b(P.$$.fragment,e),b(K.$$.fragment,e),b(ee.$$.fragment,e),b(ae.$$.fragment,e),b(ne.$$.fragment,e),b(oe.$$.fragment,e),b(k.$$.fragment,e),b(de.$$.fragment,e),b(fe.$$.fragment,e),b(ye.$$.fragment,e),b(V.$$.fragment,e),b(Me.$$.fragment,e),b(be.$$.fragment,e),b(Q.$$.fragment,e),b(Te.$$.fragment,e),b(Y.$$.fragment,e),b(Ze.$$.fragment,e),b(ve.$$.fragment,e),b(_e.$$.fragment,e),b(Be.$$.fragment,e),b(xe.$$.fragment,e),kt=!1},d(e){e&&(l(T),l(o),l(u),l(r),l(_),l(j),l(B),l(x),l(G),l(W),l(p),l(J),l(He),l(N),l(Ve),l(Qe),l(C),l(Ye),l(Fe),l(E),l(Se),l(D),l(qe),l(ze),l(O),l(Ne),l(Ae),l(R),l(Pe),l(te),l(Ee),l(le),l(De),l(se),l(Ke),l(Oe),l(ie),l(et),l(tt),l(X),l(lt),l(st),l(pe),l(at),l(it),l(re),l(nt),l(ot),l(me),l(pt),l(rt),l(L),l(dt),l(ue),l(mt),l(he),l(ft),l(ce),l(ut),l(ht),l(H),l(ct),l(yt),l(ge),l(gt),l(Mt),l(bt),l(we),l(wt),l(Tt),l(Jt),l(Je),l($t),l($e),l(Ut),l(Zt),l(Ue),l(jt),l(vt),l(je),l(Wt),l(_t),l(We),l(Bt),l(Gt),l(F),l(It),l(xt),l(Ge),l(Ct),l(Ie),l(Rt),l(Xt),l(ke)),l(a),w(h,e),w($,e),w(v,e),w(I,e),w(A,e),w(P,e),w(K,e),w(ee,e),w(ae,e),w(ne,e),w(oe,e),w(k,e),w(de,e),w(fe,e),w(ye,e),w(V,e),w(Me,e),w(be,e),w(Q,e),w(Te,e),w(Y,e),w(Ze,e),w(ve,e),w(_e,e),w(Be,e),w(xe,e)}}}const kl='{"title":"Load adapters","local":"load-adapters","sections":[{"title":"DreamBooth","local":"dreambooth","sections":[],"depth":2},{"title":"Textual inversion","local":"textual-inversion","sections":[],"depth":2},{"title":"LoRA","local":"lora","sections":[{"title":"Kohya and TheLastBen","local":"kohya-and-thelastben","sections":[],"depth":3}],"depth":2},{"title":"IP-Adapter","local":"ip-adapter","sections":[{"title":"IP-Adapter Plus","local":"ip-adapter-plus","sections":[],"depth":3}],"depth":2}],"depth":1}';function Ll(U){return Tl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class zl extends Jl{constructor(a){super(),$l(this,a,Ll,Xl,wl,{})}}export{zl as component};
