import{s as Pl,o as Dl,n as ze}from"../chunks/scheduler.8c3d61f6.js";import{S as Kl,i as Ol,g as p,s as a,r as c,A as es,h as d,f as l,c as n,j as zl,u as M,x as m,k as q,y as ts,a as s,v as y,d as g,t as b,w,m as ls,n as ss}from"../chunks/index.589a98e8.js";import{T as Se}from"../chunks/Tip.42aa8582.js";import{C as $}from"../chunks/CodeBlock.36627b28.js";import{D as as}from"../chunks/DocNotebookDropdown.108e4998.js";import{H as L,E as ns}from"../chunks/EditOnGithub.e5a8d9cb.js";import{H as is,a as El}from"../chunks/HfOption.9804ab8b.js";function os(T){let i,j='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(){i=p("p"),i.innerHTML=j},l(o){i=d(o,"P",{"data-svelte-h":!0}),m(i)!=="svelte-unc393"&&(i.innerHTML=j)},m(o,h){s(o,i,h)},p:ze,d(o){o&&l(i)}}}function rs(T){let i,j='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(){i=p("p"),i.innerHTML=j},l(o){i=d(o,"P",{"data-svelte-h":!0}),m(i)!=="svelte-bp0omm"&&(i.innerHTML=j)},m(o,h){s(o,i,h)},p:ze,d(o){o&&l(i)}}}function ps(T){let i,j="Currently, <code>set_adapters()</code> only supports scaling attention weights. If a LoRA has other parts (e.g., resnets or down-/upsamplers), they will keep a scale of 1.0.";return{c(){i=p("p"),i.innerHTML=j},l(o){i=d(o,"P",{"data-svelte-h":!0}),m(i)!=="svelte-1aq2a67"&&(i.innerHTML=j)},m(o,h){s(o,i,h)},p:ze,d(o){o&&l(i)}}}function ds(T){let i,j="Some limitations of using Kohya LoRAs with 🤗 Diffusers include:",o,h,f='<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/pr_8408/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.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(){i=p("p"),i.textContent=j,o=a(),h=p("ul"),h.innerHTML=f},l(u){i=d(u,"P",{"data-svelte-h":!0}),m(i)!=="svelte-1aa8at7"&&(i.textContent=j),o=n(u),h=d(u,"UL",{"data-svelte-h":!0}),m(h)!=="svelte-1oy58o"&&(h.innerHTML=f)},m(u,J){s(u,i,J),s(u,o,J),s(u,h,J)},p:ze,d(u){u&&(l(i),l(o),l(h))}}}function ms(T){let i,j='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,f,u,J='Load the LoRA checkpoint with the <a href="/docs/diffusers/pr_8408/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.load_lora_weights">load_lora_weights()</a> method, and specify the filename in the <code>weight_name</code> parameter:',I,Z,S,B,C="Generate an image:",z,_,W,G,v;return h=new $({props:{code:"IXdnZXQlMjBodHRwcyUzQSUyRiUyRmNpdml0YWkuY29tJTJGYXBpJTJGZG93bmxvYWQlMkZtb2RlbHMlMkYxNjg3NzYlMjAtTyUyMGJsdWVwcmludGlmeS1zZC14bC0xMC5zYWZldGVuc29ycw==",highlighted:"!wget https://civitai.com/api/download/models/168776 -O blueprintify-sd-xl-10.safetensors",wrap:!1}}),Z=new $({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}}),_=new $({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}}),G=new Se({props:{warning:!0,$$slots:{default:[ds]},$$scope:{ctx:T}}}),{c(){i=p("p"),i.innerHTML=j,o=a(),c(h.$$.fragment),f=a(),u=p("p"),u.innerHTML=J,I=a(),c(Z.$$.fragment),S=a(),B=p("p"),B.textContent=C,z=a(),c(_.$$.fragment),W=a(),c(G.$$.fragment)},l(r){i=d(r,"P",{"data-svelte-h":!0}),m(i)!=="svelte-1xg7vsu"&&(i.innerHTML=j),o=n(r),M(h.$$.fragment,r),f=n(r),u=d(r,"P",{"data-svelte-h":!0}),m(u)!=="svelte-184eatu"&&(u.innerHTML=J),I=n(r),M(Z.$$.fragment,r),S=n(r),B=d(r,"P",{"data-svelte-h":!0}),m(B)!=="svelte-1un5bjt"&&(B.textContent=C),z=n(r),M(_.$$.fragment,r),W=n(r),M(G.$$.fragment,r)},m(r,U){s(r,i,U),s(r,o,U),y(h,r,U),s(r,f,U),s(r,u,U),s(r,I,U),y(Z,r,U),s(r,S,U),s(r,B,U),s(r,z,U),y(_,r,U),s(r,W,U),y(G,r,U),v=!0},p(r,U){const Ee={};U&2&&(Ee.$$scope={dirty:U,ctx:r}),G.$set(Ee)},i(r){v||(g(h.$$.fragment,r),g(Z.$$.fragment,r),g(_.$$.fragment,r),g(G.$$.fragment,r),v=!0)},o(r){b(h.$$.fragment,r),b(Z.$$.fragment,r),b(_.$$.fragment,r),b(G.$$.fragment,r),v=!1},d(r){r&&(l(i),l(o),l(f),l(u),l(I),l(S),l(B),l(z),l(W)),w(h,r),w(Z,r),w(_,r),w(G,r)}}}function us(T){let i,j='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,f;return h=new $({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(){i=p("p"),i.innerHTML=j,o=a(),c(h.$$.fragment)},l(u){i=d(u,"P",{"data-svelte-h":!0}),m(i)!=="svelte-qdt5l0"&&(i.innerHTML=j),o=n(u),M(h.$$.fragment,u)},m(u,J){s(u,i,J),s(u,o,J),y(h,u,J),f=!0},p:ze,i(u){f||(g(h.$$.fragment,u),f=!0)},o(u){b(h.$$.fragment,u),f=!1},d(u){u&&(l(i),l(o)),w(h,u)}}}function hs(T){let i,j,o,h;return i=new El({props:{id:"other-trainers",option:"Kohya",$$slots:{default:[ms]},$$scope:{ctx:T}}}),o=new El({props:{id:"other-trainers",option:"TheLastBen",$$slots:{default:[us]},$$scope:{ctx:T}}}),{c(){c(i.$$.fragment),j=a(),c(o.$$.fragment)},l(f){M(i.$$.fragment,f),j=n(f),M(o.$$.fragment,f)},m(f,u){y(i,f,u),s(f,j,u),y(o,f,u),h=!0},p(f,u){const J={};u&2&&(J.$$scope={dirty:u,ctx:f}),i.$set(J);const I={};u&2&&(I.$$scope={dirty:u,ctx:f}),o.$set(I)},i(f){h||(g(i.$$.fragment,f),g(o.$$.fragment,f),h=!0)},o(f){b(i.$$.fragment,f),b(o.$$.fragment,f),h=!1},d(f){f&&l(j),w(i,f),w(o,f)}}}function fs(T){let i,j=`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(){i=p("p"),i.innerHTML=j},l(o){i=d(o,"P",{"data-svelte-h":!0}),m(i)!=="svelte-13d91fo"&&(i.innerHTML=j)},m(o,h){s(o,i,h)},p:ze,d(o){o&&l(i)}}}function cs(T){let i;return{c(){i=ls("As InsightFace pretrained models are available for non-commercial research purposes, IP-Adapter-FaceID models are released exclusively for research purposes and are not intended for commercial use.")},l(j){i=ss(j,"As InsightFace pretrained models are available for non-commercial research purposes, IP-Adapter-FaceID models are released exclusively for research purposes and are not intended for commercial use.")},m(j,o){s(j,i,o)},d(j){j&&l(i)}}}function Ms(T){let i,j,o,h,f,u,J,I,Z,S='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,C,z="This guide will show you how to load DreamBooth, textual inversion, and LoRA weights.",_,W,G,v,r,U,Ee='<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.',De,E,rl='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:',Ke,P,Oe,x,pl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_dreambooth.png"/>',et,D,tt,K,dl='<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.',lt,O,ml="Because textual inversion creates embeddings, it cannot be used on its own like DreamBooth and requires another model.",st,ee,at,te,ul='Now you can load the textual inversion embeddings with the <a href="/docs/diffusers/pr_8408/en/api/loaders/textual_inversion#diffusers.loaders.TextualInversionLoaderMixin.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:',nt,le,it,R,hl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_txt_embed.png"/>',ot,se,fl='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/pr_8408/en/api/loaders/textual_inversion#diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion">load_textual_inversion()</a>, but this time, you’ll need two more parameters:',rt,ae,cl="<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>",pt,ne,Ml='Let’s load the <a href="https://huggingface.co/sayakpaul/EasyNegative-test" rel="nofollow">sayakpaul/EasyNegative-test</a> embeddings:',dt,ie,mt,oe,yl="Now you can use the <code>token</code> to generate an image with the negative embeddings:",ut,re,ht,k,gl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_neg_embed.png"/>',ft,pe,ct,de,bl='<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.',Mt,X,yt,me,wl="LoRAs also need to be used with another model:",gt,ue,bt,he,jl='Then use the <a href="/docs/diffusers/pr_8408/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.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:',wt,fe,jt,H,Ul='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_lora.png"/>',Ut,ce,Jl='The <a href="/docs/diffusers/pr_8408/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.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:',Jt,Me,Tl="<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>",Tt,ye,$l='But if you only need to load LoRA weights into the UNet, then you can use the <a href="/docs/diffusers/pr_8408/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:',$t,ge,Zt,A,Zl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_attn_proc.png"/>',Wt,be,Wl='To unload the LoRA weights, use the <a href="/docs/diffusers/pr_8408/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,we,It,je,Bt,Ue,Gl='For both <a href="/docs/diffusers/pr_8408/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.load_lora_weights">load_lora_weights()</a> and <a href="/docs/diffusers/pr_8408/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.',_t,Je,Il="For more granular control on the amount of LoRA weights used per layer, you can use <code>set_adapters()</code> and pass a dictionary specifying by how much to scale the weights in each layer by.",vt,Te,Ct,$e,Bl='This also works with multiple adapters - see <a href="https://huggingface.co/docs/diffusers/tutorials/using_peft_for_inference#customize-adapters-strength" rel="nofollow">this guide</a> for how to do it.',Lt,V,xt,Ze,Rt,We,_l='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.',kt,Q,Xt,Ge,Ht,Ie,vl='<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.',At,Be,Cl='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.',Vt,F,Qt,_e,Ll="To start, load a Stable Diffusion checkpoint.",Ft,ve,Yt,Ce,xl='Then load the IP-Adapter weights and add it to the pipeline with the <a href="/docs/diffusers/pr_8408/en/api/loaders/ip_adapter#diffusers.loaders.IPAdapterMixin.load_ip_adapter">load_ip_adapter()</a> method.',Nt,Le,qt,xe,Rl="Once loaded, you can use the pipeline with an image and text prompt to guide the image generation process.",St,Re,zt,Y,kl='    <img src="https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/ip-bear.png"/>',Et,ke,Pt,Xe,Xl='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.',Dt,He,Hl="This is the case for <em>IP-Adapter Plus</em> checkpoints which use the ViT-H image encoder.",Kt,Ae,Ot,Ve,el,Qe,Al=`The IP-Adapter FaceID models are experimental IP Adapters that use image embeddings generated by <code>insightface</code> instead of CLIP image embeddings. Some of these models also use LoRA to improve ID consistency.
You need to install <code>insightface</code> and all its requirements to use these models.`,tl,N,ll,Fe,sl,Ye,Vl="If you want to use one of the two IP-Adapter FaceID Plus models, you must also load the CLIP image encoder, as this models use both <code>insightface</code> and CLIP image embeddings to achieve better photorealism.",al,Ne,nl,qe,il,Pe,ol;return f=new L({props:{title:"Load adapters",local:"load-adapters",headingTag:"h1"}}),J=new as({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 Se({props:{$$slots:{default:[os]},$$scope:{ctx:T}}}),v=new L({props:{title:"DreamBooth",local:"dreambooth",headingTag:"h2"}}),P=new $({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}}),D=new L({props:{title:"Textual inversion",local:"textual-inversion",headingTag:"h2"}}),ee=new $({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}}),le=new $({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}}),ie=new $({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}}),re=new $({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}}),pe=new L({props:{title:"LoRA",local:"lora",headingTag:"h2"}}),X=new Se({props:{$$slots:{default:[rs]},$$scope:{ctx:T}}}),ue=new $({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 $({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}}),ge=new $({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}}),we=new $({props:{code:"cGlwZWxpbmUudW5sb2FkX2xvcmFfd2VpZ2h0cygp",highlighted:"pipeline.unload_lora_weights()",wrap:!1}}),je=new L({props:{title:"Adjust LoRA weight scale",local:"adjust-lora-weight-scale",headingTag:"h3"}}),Te=new $({props:{code:"cGlwZSUyMCUzRCUyMC4uLiUyMCUyMyUyMGNyZWF0ZSUyMHBpcGVsaW5lJTBBcGlwZS5sb2FkX2xvcmFfd2VpZ2h0cyguLi4lMkMlMjBhZGFwdGVyX25hbWUlM0QlMjJteV9hZGFwdGVyJTIyKSUwQXNjYWxlcyUyMCUzRCUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMnRleHRfZW5jb2RlciUyMiUzQSUyMDAuNSUyQyUwQSUyMCUyMCUyMCUyMCUyMnRleHRfZW5jb2Rlcl8yJTIyJTNBJTIwMC41JTJDJTIwJTIwJTIzJTIwb25seSUyMHVzYWJsZSUyMGlmJTIwcGlwZSUyMGhhcyUyMGElMjAybmQlMjB0ZXh0JTIwZW5jb2RlciUwQSUyMCUyMCUyMCUyMCUyMnVuZXQlMjIlM0ElMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJkb3duJTIyJTNBJTIwMC45JTJDJTIwJTIwJTIzJTIwYWxsJTIwdHJhbnNmb3JtZXJzJTIwaW4lMjB0aGUlMjBkb3duLXBhcnQlMjB3aWxsJTIwdXNlJTIwc2NhbGUlMjAwLjklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjAlMjJtaWQlMjIlMjAlMjAlMjMlMjBpbiUyMHRoaXMlMjBleGFtcGxlJTIwJTIybWlkJTIyJTIwaXMlMjBub3QlMjBnaXZlbiUyQyUyMHRoZXJlZm9yZSUyMGFsbCUyMHRyYW5zZm9ybWVycyUyMGluJTIwdGhlJTIwbWlkJTIwcGFydCUyMHdpbGwlMjB1c2UlMjB0aGUlMjBkZWZhdWx0JTIwc2NhbGUlMjAxLjAlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJ1cCUyMiUzQSUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmJsb2NrXzAlMjIlM0ElMjAwLjYlMkMlMjAlMjAlMjMlMjBhbGwlMjAzJTIwdHJhbnNmb3JtZXJzJTIwaW4lMjB0aGUlMjAwdGglMjBibG9jayUyMGluJTIwdGhlJTIwdXAtcGFydCUyMHdpbGwlMjB1c2UlMjBzY2FsZSUyMDAuNiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmJsb2NrXzElMjIlM0ElMjAlNUIwLjQlMkMlMjAwLjglMkMlMjAxLjAlNUQlMkMlMjAlMjAlMjMlMjB0aGUlMjAzJTIwdHJhbnNmb3JtZXJzJTIwaW4lMjB0aGUlMjAxc3QlMjBibG9jayUyMGluJTIwdGhlJTIwdXAtcGFydCUyMHdpbGwlMjB1c2UlMjBzY2FsZXMlMjAwLjQlMkMlMjAwLjglMjBhbmQlMjAxLjAlMjByZXNwZWN0aXZlbHklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0QlMEElMjAlMjAlMjAlMjAlN0QlMEElN0QlMEFwaXBlLnNldF9hZGFwdGVycyglMjJteV9hZGFwdGVyJTIyJTJDJTIwc2NhbGVzKQ==",highlighted:`pipe = ... <span class="hljs-comment"># create pipeline</span>
pipe.load_lora_weights(..., adapter_name=<span class="hljs-string">&quot;my_adapter&quot;</span>)
scales = {
    <span class="hljs-string">&quot;text_encoder&quot;</span>: <span class="hljs-number">0.5</span>,
    <span class="hljs-string">&quot;text_encoder_2&quot;</span>: <span class="hljs-number">0.5</span>,  <span class="hljs-comment"># only usable if pipe has a 2nd text encoder</span>
    <span class="hljs-string">&quot;unet&quot;</span>: {
        <span class="hljs-string">&quot;down&quot;</span>: <span class="hljs-number">0.9</span>,  <span class="hljs-comment"># all transformers in the down-part will use scale 0.9</span>
        <span class="hljs-comment"># &quot;mid&quot;  # in this example &quot;mid&quot; is not given, therefore all transformers in the mid part will use the default scale 1.0</span>
        <span class="hljs-string">&quot;up&quot;</span>: {
            <span class="hljs-string">&quot;block_0&quot;</span>: <span class="hljs-number">0.6</span>,  <span class="hljs-comment"># all 3 transformers in the 0th block in the up-part will use scale 0.6</span>
            <span class="hljs-string">&quot;block_1&quot;</span>: [<span class="hljs-number">0.4</span>, <span class="hljs-number">0.8</span>, <span class="hljs-number">1.0</span>],  <span class="hljs-comment"># the 3 transformers in the 1st block in the up-part will use scales 0.4, 0.8 and 1.0 respectively</span>
        }
    }
}
pipe.set_adapters(<span class="hljs-string">&quot;my_adapter&quot;</span>, scales)`,wrap:!1}}),V=new Se({props:{warning:!0,$$slots:{default:[ps]},$$scope:{ctx:T}}}),Ze=new L({props:{title:"Kohya and TheLastBen",local:"kohya-and-thelastben",headingTag:"h3"}}),Q=new is({props:{id:"other-trainers",options:["Kohya","TheLastBen"],$$slots:{default:[hs]},$$scope:{ctx:T}}}),Ge=new L({props:{title:"IP-Adapter",local:"ip-adapter",headingTag:"h2"}}),F=new Se({props:{warning:!1,$$slots:{default:[fs]},$$scope:{ctx:T}}}),ve=new $({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}}),Le=new $({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}}),Re=new $({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}}),ke=new L({props:{title:"IP-Adapter Plus",local:"ip-adapter-plus",headingTag:"h3"}}),Ae=new $({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}}),Ve=new L({props:{title:"IP-Adapter Face ID models",local:"ip-adapter-face-id-models",headingTag:"h3"}}),N=new Se({props:{warning:!0,$$slots:{default:[cs]},$$scope:{ctx:T}}}),Fe=new $({props:{code:"cGlwZWxpbmUlMjAlM0QlMjBBdXRvUGlwZWxpbmVGb3JUZXh0MkltYWdlLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBJTBBcGlwZWxpbmUubG9hZF9pcF9hZGFwdGVyKCUyMmg5NCUyRklQLUFkYXB0ZXItRmFjZUlEJTIyJTJDJTIwc3ViZm9sZGVyJTNETm9uZSUyQyUyMHdlaWdodF9uYW1lJTNEJTIyaXAtYWRhcHRlci1mYWNlaWRfc2R4bC5iaW4lMjIlMkMlMjBpbWFnZV9lbmNvZGVyX2ZvbGRlciUzRE5vbmUp",highlighted:`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_ip_adapter(<span class="hljs-string">&quot;h94/IP-Adapter-FaceID&quot;</span>, subfolder=<span class="hljs-literal">None</span>, weight_name=<span class="hljs-string">&quot;ip-adapter-faceid_sdxl.bin&quot;</span>, image_encoder_folder=<span class="hljs-literal">None</span>)`,wrap:!1}}),Ne=new $({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBWaXNpb25Nb2RlbFdpdGhQcm9qZWN0aW9uJTBBJTBBaW1hZ2VfZW5jb2RlciUyMCUzRCUyMENMSVBWaXNpb25Nb2RlbFdpdGhQcm9qZWN0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJsYWlvbiUyRkNMSVAtVmlULUgtMTQtbGFpb24yQi1zMzJCLWI3OUslMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEEpJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBBdXRvUGlwZWxpbmVGb3JUZXh0MkltYWdlLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUyQyUwQSUyMCUyMCUyMCUyMGltYWdlX2VuY29kZXIlM0RpbWFnZV9lbmNvZGVyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQSUwQXBpcGVsaW5lLmxvYWRfaXBfYWRhcHRlciglMjJoOTQlMkZJUC1BZGFwdGVyLUZhY2VJRCUyMiUyQyUyMHN1YmZvbGRlciUzRE5vbmUlMkMlMjB3ZWlnaHRfbmFtZSUzRCUyMmlwLWFkYXB0ZXItZmFjZWlkLXBsdXNfc2QxNS5iaW4lMjIp",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;laion/CLIP-ViT-H-14-laion2B-s32B-b79K&quot;</span>,
    torch_dtype=torch.float16,
)

pipeline = AutoPipelineForText2Image.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&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-FaceID&quot;</span>, subfolder=<span class="hljs-literal">None</span>, weight_name=<span class="hljs-string">&quot;ip-adapter-faceid-plus_sd15.bin&quot;</span>)`,wrap:!1}}),qe=new ns({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/using-diffusers/loading_adapters.md"}}),{c(){i=p("meta"),j=a(),o=p("p"),h=a(),c(f.$$.fragment),u=a(),c(J.$$.fragment),I=a(),Z=p("p"),Z.innerHTML=S,B=a(),C=p("p"),C.textContent=z,_=a(),c(W.$$.fragment),G=a(),c(v.$$.fragment),r=a(),U=p("p"),U.innerHTML=Ee,De=a(),E=p("p"),E.innerHTML=rl,Ke=a(),c(P.$$.fragment),Oe=a(),x=p("div"),x.innerHTML=pl,et=a(),c(D.$$.fragment),tt=a(),K=p("p"),K.innerHTML=dl,lt=a(),O=p("p"),O.textContent=ml,st=a(),c(ee.$$.fragment),at=a(),te=p("p"),te.innerHTML=ul,nt=a(),c(le.$$.fragment),it=a(),R=p("div"),R.innerHTML=hl,ot=a(),se=p("p"),se.innerHTML=fl,rt=a(),ae=p("ul"),ae.innerHTML=cl,pt=a(),ne=p("p"),ne.innerHTML=Ml,dt=a(),c(ie.$$.fragment),mt=a(),oe=p("p"),oe.innerHTML=yl,ut=a(),c(re.$$.fragment),ht=a(),k=p("div"),k.innerHTML=gl,ft=a(),c(pe.$$.fragment),ct=a(),de=p("p"),de.innerHTML=bl,Mt=a(),c(X.$$.fragment),yt=a(),me=p("p"),me.textContent=wl,gt=a(),c(ue.$$.fragment),bt=a(),he=p("p"),he.innerHTML=jl,wt=a(),c(fe.$$.fragment),jt=a(),H=p("div"),H.innerHTML=Ul,Ut=a(),ce=p("p"),ce.innerHTML=Jl,Jt=a(),Me=p("ul"),Me.innerHTML=Tl,Tt=a(),ye=p("p"),ye.innerHTML=$l,$t=a(),c(ge.$$.fragment),Zt=a(),A=p("div"),A.innerHTML=Zl,Wt=a(),be=p("p"),be.innerHTML=Wl,Gt=a(),c(we.$$.fragment),It=a(),c(je.$$.fragment),Bt=a(),Ue=p("p"),Ue.innerHTML=Gl,_t=a(),Je=p("p"),Je.innerHTML=Il,vt=a(),c(Te.$$.fragment),Ct=a(),$e=p("p"),$e.innerHTML=Bl,Lt=a(),c(V.$$.fragment),xt=a(),c(Ze.$$.fragment),Rt=a(),We=p("p"),We.innerHTML=_l,kt=a(),c(Q.$$.fragment),Xt=a(),c(Ge.$$.fragment),Ht=a(),Ie=p("p"),Ie.innerHTML=vl,At=a(),Be=p("p"),Be.innerHTML=Cl,Vt=a(),c(F.$$.fragment),Qt=a(),_e=p("p"),_e.textContent=Ll,Ft=a(),c(ve.$$.fragment),Yt=a(),Ce=p("p"),Ce.innerHTML=xl,Nt=a(),c(Le.$$.fragment),qt=a(),xe=p("p"),xe.textContent=Rl,St=a(),c(Re.$$.fragment),zt=a(),Y=p("div"),Y.innerHTML=kl,Et=a(),c(ke.$$.fragment),Pt=a(),Xe=p("p"),Xe.innerHTML=Xl,Dt=a(),He=p("p"),He.innerHTML=Hl,Kt=a(),c(Ae.$$.fragment),Ot=a(),c(Ve.$$.fragment),el=a(),Qe=p("p"),Qe.innerHTML=Al,tl=a(),c(N.$$.fragment),ll=a(),c(Fe.$$.fragment),sl=a(),Ye=p("p"),Ye.innerHTML=Vl,al=a(),c(Ne.$$.fragment),nl=a(),c(qe.$$.fragment),il=a(),Pe=p("p"),this.h()},l(e){const t=es("svelte-u9bgzb",document.head);i=d(t,"META",{name:!0,content:!0}),t.forEach(l),j=n(e),o=d(e,"P",{}),zl(o).forEach(l),h=n(e),M(f.$$.fragment,e),u=n(e),M(J.$$.fragment,e),I=n(e),Z=d(e,"P",{"data-svelte-h":!0}),m(Z)!=="svelte-ax3rwx"&&(Z.innerHTML=S),B=n(e),C=d(e,"P",{"data-svelte-h":!0}),m(C)!=="svelte-h4deay"&&(C.textContent=z),_=n(e),M(W.$$.fragment,e),G=n(e),M(v.$$.fragment,e),r=n(e),U=d(e,"P",{"data-svelte-h":!0}),m(U)!=="svelte-yncm6r"&&(U.innerHTML=Ee),De=n(e),E=d(e,"P",{"data-svelte-h":!0}),m(E)!=="svelte-1ngpipq"&&(E.innerHTML=rl),Ke=n(e),M(P.$$.fragment,e),Oe=n(e),x=d(e,"DIV",{class:!0,"data-svelte-h":!0}),m(x)!=="svelte-1qqjocv"&&(x.innerHTML=pl),et=n(e),M(D.$$.fragment,e),tt=n(e),K=d(e,"P",{"data-svelte-h":!0}),m(K)!=="svelte-z0bjzf"&&(K.innerHTML=dl),lt=n(e),O=d(e,"P",{"data-svelte-h":!0}),m(O)!=="svelte-1bhtcph"&&(O.textContent=ml),st=n(e),M(ee.$$.fragment,e),at=n(e),te=d(e,"P",{"data-svelte-h":!0}),m(te)!=="svelte-zzk9at"&&(te.innerHTML=ul),nt=n(e),M(le.$$.fragment,e),it=n(e),R=d(e,"DIV",{class:!0,"data-svelte-h":!0}),m(R)!=="svelte-vwb4li"&&(R.innerHTML=hl),ot=n(e),se=d(e,"P",{"data-svelte-h":!0}),m(se)!=="svelte-ivc25u"&&(se.innerHTML=fl),rt=n(e),ae=d(e,"UL",{"data-svelte-h":!0}),m(ae)!=="svelte-1v8nqu6"&&(ae.innerHTML=cl),pt=n(e),ne=d(e,"P",{"data-svelte-h":!0}),m(ne)!=="svelte-1eujnzn"&&(ne.innerHTML=Ml),dt=n(e),M(ie.$$.fragment,e),mt=n(e),oe=d(e,"P",{"data-svelte-h":!0}),m(oe)!=="svelte-5s5bn9"&&(oe.innerHTML=yl),ut=n(e),M(re.$$.fragment,e),ht=n(e),k=d(e,"DIV",{class:!0,"data-svelte-h":!0}),m(k)!=="svelte-j6euo"&&(k.innerHTML=gl),ft=n(e),M(pe.$$.fragment,e),ct=n(e),de=d(e,"P",{"data-svelte-h":!0}),m(de)!=="svelte-10sp1c2"&&(de.innerHTML=bl),Mt=n(e),M(X.$$.fragment,e),yt=n(e),me=d(e,"P",{"data-svelte-h":!0}),m(me)!=="svelte-l2hd9l"&&(me.textContent=wl),gt=n(e),M(ue.$$.fragment,e),bt=n(e),he=d(e,"P",{"data-svelte-h":!0}),m(he)!=="svelte-oovdy1"&&(he.innerHTML=jl),wt=n(e),M(fe.$$.fragment,e),jt=n(e),H=d(e,"DIV",{class:!0,"data-svelte-h":!0}),m(H)!=="svelte-848z5s"&&(H.innerHTML=Ul),Ut=n(e),ce=d(e,"P",{"data-svelte-h":!0}),m(ce)!=="svelte-qx1zh4"&&(ce.innerHTML=Jl),Jt=n(e),Me=d(e,"UL",{"data-svelte-h":!0}),m(Me)!=="svelte-ddcy8o"&&(Me.innerHTML=Tl),Tt=n(e),ye=d(e,"P",{"data-svelte-h":!0}),m(ye)!=="svelte-191fowz"&&(ye.innerHTML=$l),$t=n(e),M(ge.$$.fragment,e),Zt=n(e),A=d(e,"DIV",{class:!0,"data-svelte-h":!0}),m(A)!=="svelte-1etahws"&&(A.innerHTML=Zl),Wt=n(e),be=d(e,"P",{"data-svelte-h":!0}),m(be)!=="svelte-7byx1l"&&(be.innerHTML=Wl),Gt=n(e),M(we.$$.fragment,e),It=n(e),M(je.$$.fragment,e),Bt=n(e),Ue=d(e,"P",{"data-svelte-h":!0}),m(Ue)!=="svelte-1nnjx3k"&&(Ue.innerHTML=Gl),_t=n(e),Je=d(e,"P",{"data-svelte-h":!0}),m(Je)!=="svelte-u1an6c"&&(Je.innerHTML=Il),vt=n(e),M(Te.$$.fragment,e),Ct=n(e),$e=d(e,"P",{"data-svelte-h":!0}),m($e)!=="svelte-y7bfbz"&&($e.innerHTML=Bl),Lt=n(e),M(V.$$.fragment,e),xt=n(e),M(Ze.$$.fragment,e),Rt=n(e),We=d(e,"P",{"data-svelte-h":!0}),m(We)!=="svelte-6zj1or"&&(We.innerHTML=_l),kt=n(e),M(Q.$$.fragment,e),Xt=n(e),M(Ge.$$.fragment,e),Ht=n(e),Ie=d(e,"P",{"data-svelte-h":!0}),m(Ie)!=="svelte-1pu4ft1"&&(Ie.innerHTML=vl),At=n(e),Be=d(e,"P",{"data-svelte-h":!0}),m(Be)!=="svelte-18j3qom"&&(Be.innerHTML=Cl),Vt=n(e),M(F.$$.fragment,e),Qt=n(e),_e=d(e,"P",{"data-svelte-h":!0}),m(_e)!=="svelte-w9hhyu"&&(_e.textContent=Ll),Ft=n(e),M(ve.$$.fragment,e),Yt=n(e),Ce=d(e,"P",{"data-svelte-h":!0}),m(Ce)!=="svelte-1wrkodi"&&(Ce.innerHTML=xl),Nt=n(e),M(Le.$$.fragment,e),qt=n(e),xe=d(e,"P",{"data-svelte-h":!0}),m(xe)!=="svelte-7abk5j"&&(xe.textContent=Rl),St=n(e),M(Re.$$.fragment,e),zt=n(e),Y=d(e,"DIV",{class:!0,"data-svelte-h":!0}),m(Y)!=="svelte-1vum0wo"&&(Y.innerHTML=kl),Et=n(e),M(ke.$$.fragment,e),Pt=n(e),Xe=d(e,"P",{"data-svelte-h":!0}),m(Xe)!=="svelte-85ru9q"&&(Xe.innerHTML=Xl),Dt=n(e),He=d(e,"P",{"data-svelte-h":!0}),m(He)!=="svelte-zfljo5"&&(He.innerHTML=Hl),Kt=n(e),M(Ae.$$.fragment,e),Ot=n(e),M(Ve.$$.fragment,e),el=n(e),Qe=d(e,"P",{"data-svelte-h":!0}),m(Qe)!=="svelte-1ah3evs"&&(Qe.innerHTML=Al),tl=n(e),M(N.$$.fragment,e),ll=n(e),M(Fe.$$.fragment,e),sl=n(e),Ye=d(e,"P",{"data-svelte-h":!0}),m(Ye)!=="svelte-3ktslb"&&(Ye.innerHTML=Vl),al=n(e),M(Ne.$$.fragment,e),nl=n(e),M(qe.$$.fragment,e),il=n(e),Pe=d(e,"P",{}),zl(Pe).forEach(l),this.h()},h(){q(i,"name","hf:doc:metadata"),q(i,"content",ys),q(x,"class","flex justify-center"),q(R,"class","flex justify-center"),q(k,"class","flex justify-center"),q(H,"class","flex justify-center"),q(A,"class","flex justify-center"),q(Y,"class","flex justify-center")},m(e,t){ts(document.head,i),s(e,j,t),s(e,o,t),s(e,h,t),y(f,e,t),s(e,u,t),y(J,e,t),s(e,I,t),s(e,Z,t),s(e,B,t),s(e,C,t),s(e,_,t),y(W,e,t),s(e,G,t),y(v,e,t),s(e,r,t),s(e,U,t),s(e,De,t),s(e,E,t),s(e,Ke,t),y(P,e,t),s(e,Oe,t),s(e,x,t),s(e,et,t),y(D,e,t),s(e,tt,t),s(e,K,t),s(e,lt,t),s(e,O,t),s(e,st,t),y(ee,e,t),s(e,at,t),s(e,te,t),s(e,nt,t),y(le,e,t),s(e,it,t),s(e,R,t),s(e,ot,t),s(e,se,t),s(e,rt,t),s(e,ae,t),s(e,pt,t),s(e,ne,t),s(e,dt,t),y(ie,e,t),s(e,mt,t),s(e,oe,t),s(e,ut,t),y(re,e,t),s(e,ht,t),s(e,k,t),s(e,ft,t),y(pe,e,t),s(e,ct,t),s(e,de,t),s(e,Mt,t),y(X,e,t),s(e,yt,t),s(e,me,t),s(e,gt,t),y(ue,e,t),s(e,bt,t),s(e,he,t),s(e,wt,t),y(fe,e,t),s(e,jt,t),s(e,H,t),s(e,Ut,t),s(e,ce,t),s(e,Jt,t),s(e,Me,t),s(e,Tt,t),s(e,ye,t),s(e,$t,t),y(ge,e,t),s(e,Zt,t),s(e,A,t),s(e,Wt,t),s(e,be,t),s(e,Gt,t),y(we,e,t),s(e,It,t),y(je,e,t),s(e,Bt,t),s(e,Ue,t),s(e,_t,t),s(e,Je,t),s(e,vt,t),y(Te,e,t),s(e,Ct,t),s(e,$e,t),s(e,Lt,t),y(V,e,t),s(e,xt,t),y(Ze,e,t),s(e,Rt,t),s(e,We,t),s(e,kt,t),y(Q,e,t),s(e,Xt,t),y(Ge,e,t),s(e,Ht,t),s(e,Ie,t),s(e,At,t),s(e,Be,t),s(e,Vt,t),y(F,e,t),s(e,Qt,t),s(e,_e,t),s(e,Ft,t),y(ve,e,t),s(e,Yt,t),s(e,Ce,t),s(e,Nt,t),y(Le,e,t),s(e,qt,t),s(e,xe,t),s(e,St,t),y(Re,e,t),s(e,zt,t),s(e,Y,t),s(e,Et,t),y(ke,e,t),s(e,Pt,t),s(e,Xe,t),s(e,Dt,t),s(e,He,t),s(e,Kt,t),y(Ae,e,t),s(e,Ot,t),y(Ve,e,t),s(e,el,t),s(e,Qe,t),s(e,tl,t),y(N,e,t),s(e,ll,t),y(Fe,e,t),s(e,sl,t),s(e,Ye,t),s(e,al,t),y(Ne,e,t),s(e,nl,t),y(qe,e,t),s(e,il,t),s(e,Pe,t),ol=!0},p(e,[t]){const Ql={};t&2&&(Ql.$$scope={dirty:t,ctx:e}),W.$set(Ql);const Fl={};t&2&&(Fl.$$scope={dirty:t,ctx:e}),X.$set(Fl);const Yl={};t&2&&(Yl.$$scope={dirty:t,ctx:e}),V.$set(Yl);const Nl={};t&2&&(Nl.$$scope={dirty:t,ctx:e}),Q.$set(Nl);const ql={};t&2&&(ql.$$scope={dirty:t,ctx:e}),F.$set(ql);const Sl={};t&2&&(Sl.$$scope={dirty:t,ctx:e}),N.$set(Sl)},i(e){ol||(g(f.$$.fragment,e),g(J.$$.fragment,e),g(W.$$.fragment,e),g(v.$$.fragment,e),g(P.$$.fragment,e),g(D.$$.fragment,e),g(ee.$$.fragment,e),g(le.$$.fragment,e),g(ie.$$.fragment,e),g(re.$$.fragment,e),g(pe.$$.fragment,e),g(X.$$.fragment,e),g(ue.$$.fragment,e),g(fe.$$.fragment,e),g(ge.$$.fragment,e),g(we.$$.fragment,e),g(je.$$.fragment,e),g(Te.$$.fragment,e),g(V.$$.fragment,e),g(Ze.$$.fragment,e),g(Q.$$.fragment,e),g(Ge.$$.fragment,e),g(F.$$.fragment,e),g(ve.$$.fragment,e),g(Le.$$.fragment,e),g(Re.$$.fragment,e),g(ke.$$.fragment,e),g(Ae.$$.fragment,e),g(Ve.$$.fragment,e),g(N.$$.fragment,e),g(Fe.$$.fragment,e),g(Ne.$$.fragment,e),g(qe.$$.fragment,e),ol=!0)},o(e){b(f.$$.fragment,e),b(J.$$.fragment,e),b(W.$$.fragment,e),b(v.$$.fragment,e),b(P.$$.fragment,e),b(D.$$.fragment,e),b(ee.$$.fragment,e),b(le.$$.fragment,e),b(ie.$$.fragment,e),b(re.$$.fragment,e),b(pe.$$.fragment,e),b(X.$$.fragment,e),b(ue.$$.fragment,e),b(fe.$$.fragment,e),b(ge.$$.fragment,e),b(we.$$.fragment,e),b(je.$$.fragment,e),b(Te.$$.fragment,e),b(V.$$.fragment,e),b(Ze.$$.fragment,e),b(Q.$$.fragment,e),b(Ge.$$.fragment,e),b(F.$$.fragment,e),b(ve.$$.fragment,e),b(Le.$$.fragment,e),b(Re.$$.fragment,e),b(ke.$$.fragment,e),b(Ae.$$.fragment,e),b(Ve.$$.fragment,e),b(N.$$.fragment,e),b(Fe.$$.fragment,e),b(Ne.$$.fragment,e),b(qe.$$.fragment,e),ol=!1},d(e){e&&(l(j),l(o),l(h),l(u),l(I),l(Z),l(B),l(C),l(_),l(G),l(r),l(U),l(De),l(E),l(Ke),l(Oe),l(x),l(et),l(tt),l(K),l(lt),l(O),l(st),l(at),l(te),l(nt),l(it),l(R),l(ot),l(se),l(rt),l(ae),l(pt),l(ne),l(dt),l(mt),l(oe),l(ut),l(ht),l(k),l(ft),l(ct),l(de),l(Mt),l(yt),l(me),l(gt),l(bt),l(he),l(wt),l(jt),l(H),l(Ut),l(ce),l(Jt),l(Me),l(Tt),l(ye),l($t),l(Zt),l(A),l(Wt),l(be),l(Gt),l(It),l(Bt),l(Ue),l(_t),l(Je),l(vt),l(Ct),l($e),l(Lt),l(xt),l(Rt),l(We),l(kt),l(Xt),l(Ht),l(Ie),l(At),l(Be),l(Vt),l(Qt),l(_e),l(Ft),l(Yt),l(Ce),l(Nt),l(qt),l(xe),l(St),l(zt),l(Y),l(Et),l(Pt),l(Xe),l(Dt),l(He),l(Kt),l(Ot),l(el),l(Qe),l(tl),l(ll),l(sl),l(Ye),l(al),l(nl),l(il),l(Pe)),l(i),w(f,e),w(J,e),w(W,e),w(v,e),w(P,e),w(D,e),w(ee,e),w(le,e),w(ie,e),w(re,e),w(pe,e),w(X,e),w(ue,e),w(fe,e),w(ge,e),w(we,e),w(je,e),w(Te,e),w(V,e),w(Ze,e),w(Q,e),w(Ge,e),w(F,e),w(ve,e),w(Le,e),w(Re,e),w(ke,e),w(Ae,e),w(Ve,e),w(N,e),w(Fe,e),w(Ne,e),w(qe,e)}}}const ys='{"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":"Adjust LoRA weight scale","local":"adjust-lora-weight-scale","sections":[],"depth":3},{"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},{"title":"IP-Adapter Face ID models","local":"ip-adapter-face-id-models","sections":[],"depth":3}],"depth":2}],"depth":1}';function gs(T){return Dl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Zs extends Kl{constructor(i){super(),Ol(this,i,gs,Ms,Pl,{})}}export{Zs as component};
