import{s as wl,o as Tl,n as Re}from"../chunks/scheduler.182ea377.js";import{S as Jl,i as $l,g as m,s as i,r as c,A as Ul,h as d,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 Wl,a as bl}from"../chunks/HfOption.fc88c804.js";function vl(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=m("p"),a.innerHTML=T},l(o){a=d(o,"P",{"data-svelte-h":!0}),f(a)!=="svelte-unc393"&&(a.innerHTML=T)},m(o,h){s(o,a,h)},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=m("p"),a.innerHTML=T},l(o){a=d(o,"P",{"data-svelte-h":!0}),f(a)!=="svelte-bp0omm"&&(a.innerHTML=T)},m(o,h){s(o,a,h)},p:Re,d(o){o&&l(a)}}}function Bl(U){let a,T='For both <a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights">load_lora_weights()</a> and <a href="/docs/diffusers/main/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=m("p"),a.innerHTML=T},l(o){a=d(o,"P",{"data-svelte-h":!0}),f(a)!=="svelte-p7ccrd"&&(a.innerHTML=T)},m(o,h){s(o,a,h)},p:Re,d(o){o&&l(a)}}}function Gl(U){let a,T="Some limitations of using Kohya LoRAs with 🤗 Diffusers include:",o,h,u='<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/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.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=m("p"),a.textContent=T,o=i(),h=m("ul"),h.innerHTML=u},l(r){a=d(r,"P",{"data-svelte-h":!0}),f(a)!=="svelte-1aa8at7"&&(a.textContent=T),o=n(r),h=d(r,"UL",{"data-svelte-h":!0}),f(h)!=="svelte-4o1ix1"&&(h.innerHTML=u)},m(r,$){s(r,a,$),s(r,o,$),s(r,h,$)},p:Re,d(r){r&&(l(a),l(o),l(h))}}}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,h,u,r,$='Load the LoRA checkpoint with the <a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.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,W,v,I;return h=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}}),v=new Le({props:{warning:!0,$$slots:{default:[Gl]},$$scope:{ctx:U}}}),{c(){a=m("p"),a.innerHTML=T,o=i(),c(h.$$.fragment),u=i(),r=m("p"),r.innerHTML=$,_=i(),c(j.$$.fragment),q=i(),B=m("p"),B.textContent=x,z=i(),c(G.$$.fragment),W=i(),c(v.$$.fragment)},l(p){a=d(p,"P",{"data-svelte-h":!0}),f(a)!=="svelte-1xg7vsu"&&(a.innerHTML=T),o=n(p),y(h.$$.fragment,p),u=n(p),r=d(p,"P",{"data-svelte-h":!0}),f(r)!=="svelte-1lrbh5j"&&(r.innerHTML=$),_=n(p),y(j.$$.fragment,p),q=n(p),B=d(p,"P",{"data-svelte-h":!0}),f(B)!=="svelte-1un5bjt"&&(B.textContent=x),z=n(p),y(G.$$.fragment,p),W=n(p),y(v.$$.fragment,p)},m(p,J){s(p,a,J),s(p,o,J),g(h,p,J),s(p,u,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,W,J),g(v,p,J),I=!0},p(p,J){const ke={};J&2&&(ke.$$scope={dirty:J,ctx:p}),v.$set(ke)},i(p){I||(M(h.$$.fragment,p),M(j.$$.fragment,p),M(G.$$.fragment,p),M(v.$$.fragment,p),I=!0)},o(p){b(h.$$.fragment,p),b(j.$$.fragment,p),b(G.$$.fragment,p),b(v.$$.fragment,p),I=!1},d(p){p&&(l(a),l(o),l(u),l(r),l(_),l(q),l(B),l(z),l(W)),w(h,p),w(j,p),w(G,p),w(v,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,h,u;return h=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=m("p"),a.innerHTML=T,o=i(),c(h.$$.fragment)},l(r){a=d(r,"P",{"data-svelte-h":!0}),f(a)!=="svelte-qdt5l0"&&(a.innerHTML=T),o=n(r),y(h.$$.fragment,r)},m(r,$){s(r,a,$),s(r,o,$),g(h,r,$),u=!0},p:Re,i(r){u||(M(h.$$.fragment,r),u=!0)},o(r){b(h.$$.fragment,r),u=!1},d(r){r&&(l(a),l(o)),w(h,r)}}}function Cl(U){let a,T,o,h;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(u){y(a.$$.fragment,u),T=n(u),y(o.$$.fragment,u)},m(u,r){g(a,u,r),s(u,T,r),g(o,u,r),h=!0},p(u,r){const $={};r&2&&($.$$scope={dirty:r,ctx:u}),a.$set($);const _={};r&2&&(_.$$scope={dirty:r,ctx:u}),o.$set(_)},i(u){h||(M(a.$$.fragment,u),M(o.$$.fragment,u),h=!0)},o(u){b(a.$$.fragment,u),b(o.$$.fragment,u),h=!1},d(u){u&&l(T),w(a,u),w(o,u)}}}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=m("p"),a.innerHTML=T},l(o){a=d(o,"P",{"data-svelte-h":!0}),f(a)!=="svelte-13d91fo"&&(a.innerHTML=T)},m(o,h){s(o,a,h)},p:Re,d(o){o&&l(a)}}}function kl(U){let a,T,o,h,u,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,W,v,I,p,J,ke='<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/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.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/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.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,k,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,X,it,re,Et="LoRAs also need to be used with another model:",nt,me,ot,de,Dt='Then use the <a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.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"/>',mt,he,Ot='The <a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.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:',dt,ue,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/main/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:',ht,ye,ut,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/main/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,Wt,je,pl='Then load the IP-Adapter weights and add it to the pipeline with the <a href="/docs/diffusers/main/en/api/loaders/ip_adapter#diffusers.loaders.IPAdapterMixin.load_ip_adapter">load_ip_adapter()</a> method.',vt,We,_t,ve,rl="Once loaded, you can use the pipeline with an image and text prompt to guide the image generation process.",Bt,_e,Gt,F,ml='    <img src="https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/ip-bear.png"/>',It,Be,xt,Ge,dl='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/main/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,kt,Xe,Xt;return u=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"}]}}),W=new Le({props:{$$slots:{default:[vl]},$$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"}}),X=new Le({props:{$$slots:{default:[_l]},$$scope:{ctx:U}}}),me=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 Wl({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}}),We=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=m("meta"),T=i(),o=m("p"),h=i(),c(u.$$.fragment),r=i(),c($.$$.fragment),_=i(),j=m("p"),j.innerHTML=q,B=i(),x=m("p"),x.textContent=z,G=i(),c(W.$$.fragment),v=i(),c(I.$$.fragment),p=i(),J=m("p"),J.innerHTML=ke,He=i(),N=m("p"),N.innerHTML=Lt,Ve=i(),c(A.$$.fragment),Qe=i(),C=m("div"),C.innerHTML=Ht,Ye=i(),c(P.$$.fragment),Fe=i(),E=m("p"),E.innerHTML=Vt,Se=i(),D=m("p"),D.textContent=Qt,qe=i(),c(K.$$.fragment),ze=i(),O=m("p"),O.innerHTML=Yt,Ne=i(),c(ee.$$.fragment),Ae=i(),R=m("div"),R.innerHTML=Ft,Pe=i(),te=m("p"),te.innerHTML=St,Ee=i(),le=m("ul"),le.innerHTML=qt,De=i(),se=m("p"),se.innerHTML=zt,Ke=i(),c(ae.$$.fragment),Oe=i(),ie=m("p"),ie.innerHTML=Nt,et=i(),c(ne.$$.fragment),tt=i(),k=m("div"),k.innerHTML=At,lt=i(),c(oe.$$.fragment),st=i(),pe=m("p"),pe.innerHTML=Pt,at=i(),c(X.$$.fragment),it=i(),re=m("p"),re.textContent=Et,nt=i(),c(me.$$.fragment),ot=i(),de=m("p"),de.innerHTML=Dt,pt=i(),c(fe.$$.fragment),rt=i(),L=m("div"),L.innerHTML=Kt,mt=i(),he=m("p"),he.innerHTML=Ot,dt=i(),ue=m("ul"),ue.innerHTML=el,ft=i(),ce=m("p"),ce.innerHTML=tl,ht=i(),c(ye.$$.fragment),ut=i(),H=m("div"),H.innerHTML=ll,ct=i(),c(V.$$.fragment),yt=i(),ge=m("p"),ge.innerHTML=sl,gt=i(),c(Me.$$.fragment),Mt=i(),c(be.$$.fragment),bt=i(),we=m("p"),we.innerHTML=al,wt=i(),c(Q.$$.fragment),Tt=i(),c(Te.$$.fragment),Jt=i(),Je=m("p"),Je.innerHTML=il,$t=i(),$e=m("p"),$e.innerHTML=nl,Ut=i(),c(Y.$$.fragment),Zt=i(),Ue=m("p"),Ue.textContent=ol,jt=i(),c(Ze.$$.fragment),Wt=i(),je=m("p"),je.innerHTML=pl,vt=i(),c(We.$$.fragment),_t=i(),ve=m("p"),ve.textContent=rl,Bt=i(),c(_e.$$.fragment),Gt=i(),F=m("div"),F.innerHTML=ml,It=i(),c(Be.$$.fragment),xt=i(),Ge=m("p"),Ge.innerHTML=dl,Ct=i(),Ie=m("p"),Ie.innerHTML=fl,Rt=i(),c(xe.$$.fragment),kt=i(),Xe=m("p"),this.h()},l(e){const t=Ul("svelte-u9bgzb",document.head);a=d(t,"META",{name:!0,content:!0}),t.forEach(l),T=n(e),o=d(e,"P",{}),Ml(o).forEach(l),h=n(e),y(u.$$.fragment,e),r=n(e),y($.$$.fragment,e),_=n(e),j=d(e,"P",{"data-svelte-h":!0}),f(j)!=="svelte-ax3rwx"&&(j.innerHTML=q),B=n(e),x=d(e,"P",{"data-svelte-h":!0}),f(x)!=="svelte-h4deay"&&(x.textContent=z),G=n(e),y(W.$$.fragment,e),v=n(e),y(I.$$.fragment,e),p=n(e),J=d(e,"P",{"data-svelte-h":!0}),f(J)!=="svelte-yncm6r"&&(J.innerHTML=ke),He=n(e),N=d(e,"P",{"data-svelte-h":!0}),f(N)!=="svelte-1ngpipq"&&(N.innerHTML=Lt),Ve=n(e),y(A.$$.fragment,e),Qe=n(e),C=d(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=d(e,"P",{"data-svelte-h":!0}),f(E)!=="svelte-z0bjzf"&&(E.innerHTML=Vt),Se=n(e),D=d(e,"P",{"data-svelte-h":!0}),f(D)!=="svelte-1bhtcph"&&(D.textContent=Qt),qe=n(e),y(K.$$.fragment,e),ze=n(e),O=d(e,"P",{"data-svelte-h":!0}),f(O)!=="svelte-g7ztwz"&&(O.innerHTML=Yt),Ne=n(e),y(ee.$$.fragment,e),Ae=n(e),R=d(e,"DIV",{class:!0,"data-svelte-h":!0}),f(R)!=="svelte-vwb4li"&&(R.innerHTML=Ft),Pe=n(e),te=d(e,"P",{"data-svelte-h":!0}),f(te)!=="svelte-m0vvoe"&&(te.innerHTML=St),Ee=n(e),le=d(e,"UL",{"data-svelte-h":!0}),f(le)!=="svelte-1v8nqu6"&&(le.innerHTML=qt),De=n(e),se=d(e,"P",{"data-svelte-h":!0}),f(se)!=="svelte-1eujnzn"&&(se.innerHTML=zt),Ke=n(e),y(ae.$$.fragment,e),Oe=n(e),ie=d(e,"P",{"data-svelte-h":!0}),f(ie)!=="svelte-5s5bn9"&&(ie.innerHTML=Nt),et=n(e),y(ne.$$.fragment,e),tt=n(e),k=d(e,"DIV",{class:!0,"data-svelte-h":!0}),f(k)!=="svelte-j6euo"&&(k.innerHTML=At),lt=n(e),y(oe.$$.fragment,e),st=n(e),pe=d(e,"P",{"data-svelte-h":!0}),f(pe)!=="svelte-10sp1c2"&&(pe.innerHTML=Pt),at=n(e),y(X.$$.fragment,e),it=n(e),re=d(e,"P",{"data-svelte-h":!0}),f(re)!=="svelte-l2hd9l"&&(re.textContent=Et),nt=n(e),y(me.$$.fragment,e),ot=n(e),de=d(e,"P",{"data-svelte-h":!0}),f(de)!=="svelte-1kx3jfu"&&(de.innerHTML=Dt),pt=n(e),y(fe.$$.fragment,e),rt=n(e),L=d(e,"DIV",{class:!0,"data-svelte-h":!0}),f(L)!=="svelte-848z5s"&&(L.innerHTML=Kt),mt=n(e),he=d(e,"P",{"data-svelte-h":!0}),f(he)!=="svelte-12ujhjp"&&(he.innerHTML=Ot),dt=n(e),ue=d(e,"UL",{"data-svelte-h":!0}),f(ue)!=="svelte-ddcy8o"&&(ue.innerHTML=el),ft=n(e),ce=d(e,"P",{"data-svelte-h":!0}),f(ce)!=="svelte-im0lkb"&&(ce.innerHTML=tl),ht=n(e),y(ye.$$.fragment,e),ut=n(e),H=d(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=d(e,"P",{"data-svelte-h":!0}),f(ge)!=="svelte-wf4vgp"&&(ge.innerHTML=sl),gt=n(e),y(Me.$$.fragment,e),Mt=n(e),y(be.$$.fragment,e),bt=n(e),we=d(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=d(e,"P",{"data-svelte-h":!0}),f(Je)!=="svelte-1pu4ft1"&&(Je.innerHTML=il),$t=n(e),$e=d(e,"P",{"data-svelte-h":!0}),f($e)!=="svelte-18j3qom"&&($e.innerHTML=nl),Ut=n(e),y(Y.$$.fragment,e),Zt=n(e),Ue=d(e,"P",{"data-svelte-h":!0}),f(Ue)!=="svelte-w9hhyu"&&(Ue.textContent=ol),jt=n(e),y(Ze.$$.fragment,e),Wt=n(e),je=d(e,"P",{"data-svelte-h":!0}),f(je)!=="svelte-lmam2w"&&(je.innerHTML=pl),vt=n(e),y(We.$$.fragment,e),_t=n(e),ve=d(e,"P",{"data-svelte-h":!0}),f(ve)!=="svelte-7abk5j"&&(ve.textContent=rl),Bt=n(e),y(_e.$$.fragment,e),Gt=n(e),F=d(e,"DIV",{class:!0,"data-svelte-h":!0}),f(F)!=="svelte-1vum0wo"&&(F.innerHTML=ml),It=n(e),y(Be.$$.fragment,e),xt=n(e),Ge=d(e,"P",{"data-svelte-h":!0}),f(Ge)!=="svelte-85ru9q"&&(Ge.innerHTML=dl),Ct=n(e),Ie=d(e,"P",{"data-svelte-h":!0}),f(Ie)!=="svelte-zfljo5"&&(Ie.innerHTML=fl),Rt=n(e),y(xe.$$.fragment,e),kt=n(e),Xe=d(e,"P",{}),Ml(Xe).forEach(l),this.h()},h(){S(a,"name","hf:doc:metadata"),S(a,"content",Xl),S(C,"class","flex justify-center"),S(R,"class","flex justify-center"),S(k,"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,h,t),g(u,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(W,e,t),s(e,v,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,k,t),s(e,lt,t),g(oe,e,t),s(e,st,t),s(e,pe,t),s(e,at,t),g(X,e,t),s(e,it,t),s(e,re,t),s(e,nt,t),g(me,e,t),s(e,ot,t),s(e,de,t),s(e,pt,t),g(fe,e,t),s(e,rt,t),s(e,L,t),s(e,mt,t),s(e,he,t),s(e,dt,t),s(e,ue,t),s(e,ft,t),s(e,ce,t),s(e,ht,t),g(ye,e,t),s(e,ut,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,Wt,t),s(e,je,t),s(e,vt,t),g(We,e,t),s(e,_t,t),s(e,ve,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,kt,t),s(e,Xe,t),Xt=!0},p(e,[t]){const hl={};t&2&&(hl.$$scope={dirty:t,ctx:e}),W.$set(hl);const ul={};t&2&&(ul.$$scope={dirty:t,ctx:e}),X.$set(ul);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){Xt||(M(u.$$.fragment,e),M($.$$.fragment,e),M(W.$$.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(X.$$.fragment,e),M(me.$$.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(We.$$.fragment,e),M(_e.$$.fragment,e),M(Be.$$.fragment,e),M(xe.$$.fragment,e),Xt=!0)},o(e){b(u.$$.fragment,e),b($.$$.fragment,e),b(W.$$.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(X.$$.fragment,e),b(me.$$.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(We.$$.fragment,e),b(_e.$$.fragment,e),b(Be.$$.fragment,e),b(xe.$$.fragment,e),Xt=!1},d(e){e&&(l(T),l(o),l(h),l(r),l(_),l(j),l(B),l(x),l(G),l(v),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(k),l(lt),l(st),l(pe),l(at),l(it),l(re),l(nt),l(ot),l(de),l(pt),l(rt),l(L),l(mt),l(he),l(dt),l(ue),l(ft),l(ce),l(ht),l(ut),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(Wt),l(je),l(vt),l(_t),l(ve),l(Bt),l(Gt),l(F),l(It),l(xt),l(Ge),l(Ct),l(Ie),l(Rt),l(kt),l(Xe)),l(a),w(u,e),w($,e),w(W,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(X,e),w(me,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(We,e),w(_e,e),w(Be,e),w(xe,e)}}}const Xl='{"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,kl,wl,{})}}export{zl as component};
