import{s as zl,o as El,n as Se}from"../chunks/scheduler.182ea377.js";import{S as Pl,i as Dl,g as p,s as a,r as f,A as Kl,h as d,f as l,c as n,j as ql,u as M,x as m,k as q,y as Ol,a as s,v as y,d as g,t as b,w,m as es,n as ts}from"../chunks/index.abf12888.js";import{T as qe}from"../chunks/Tip.230e2334.js";import{C as $}from"../chunks/CodeBlock.57fe6e13.js";import{D as ls}from"../chunks/DocNotebookDropdown.5fa27ace.js";import{H as L}from"../chunks/Heading.16916d63.js";import{H as ss,a as Sl}from"../chunks/HfOption.fc88c804.js";function as(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,u){s(o,i,u)},p:Se,d(o){o&&l(i)}}}function ns(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,u){s(o,i,u)},p:Se,d(o){o&&l(i)}}}function is(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,u){s(o,i,u)},p:Se,d(o){o&&l(i)}}}function os(T){let i,j="Some limitations of using Kohya LoRAs with 🤗 Diffusers include:",o,u,c='<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/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(),u=p("ul"),u.innerHTML=c},l(h){i=d(h,"P",{"data-svelte-h":!0}),m(i)!=="svelte-1aa8at7"&&(i.textContent=j),o=n(h),u=d(h,"UL",{"data-svelte-h":!0}),m(u)!=="svelte-witmc2"&&(u.innerHTML=c)},m(h,J){s(h,i,J),s(h,o,J),s(h,u,J)},p:Se,d(h){h&&(l(i),l(o),l(u))}}}function rs(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,u,c,h,J='Load the LoRA checkpoint with the <a href="/docs/diffusers/main/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,v,W,G,_;return u=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}}),v=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 qe({props:{warning:!0,$$slots:{default:[os]},$$scope:{ctx:T}}}),{c(){i=p("p"),i.innerHTML=j,o=a(),f(u.$$.fragment),c=a(),h=p("p"),h.innerHTML=J,I=a(),f(Z.$$.fragment),S=a(),B=p("p"),B.textContent=C,z=a(),f(v.$$.fragment),W=a(),f(G.$$.fragment)},l(r){i=d(r,"P",{"data-svelte-h":!0}),m(i)!=="svelte-1xg7vsu"&&(i.innerHTML=j),o=n(r),M(u.$$.fragment,r),c=n(r),h=d(r,"P",{"data-svelte-h":!0}),m(h)!=="svelte-34k3vo"&&(h.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(v.$$.fragment,r),W=n(r),M(G.$$.fragment,r)},m(r,U){s(r,i,U),s(r,o,U),y(u,r,U),s(r,c,U),s(r,h,U),s(r,I,U),y(Z,r,U),s(r,S,U),s(r,B,U),s(r,z,U),y(v,r,U),s(r,W,U),y(G,r,U),_=!0},p(r,U){const ze={};U&2&&(ze.$$scope={dirty:U,ctx:r}),G.$set(ze)},i(r){_||(g(u.$$.fragment,r),g(Z.$$.fragment,r),g(v.$$.fragment,r),g(G.$$.fragment,r),_=!0)},o(r){b(u.$$.fragment,r),b(Z.$$.fragment,r),b(v.$$.fragment,r),b(G.$$.fragment,r),_=!1},d(r){r&&(l(i),l(o),l(c),l(h),l(I),l(S),l(B),l(z),l(W)),w(u,r),w(Z,r),w(v,r),w(G,r)}}}function ps(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,u,c;return u=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(),f(u.$$.fragment)},l(h){i=d(h,"P",{"data-svelte-h":!0}),m(i)!=="svelte-qdt5l0"&&(i.innerHTML=j),o=n(h),M(u.$$.fragment,h)},m(h,J){s(h,i,J),s(h,o,J),y(u,h,J),c=!0},p:Se,i(h){c||(g(u.$$.fragment,h),c=!0)},o(h){b(u.$$.fragment,h),c=!1},d(h){h&&(l(i),l(o)),w(u,h)}}}function ds(T){let i,j,o,u;return i=new Sl({props:{id:"other-trainers",option:"Kohya",$$slots:{default:[rs]},$$scope:{ctx:T}}}),o=new Sl({props:{id:"other-trainers",option:"TheLastBen",$$slots:{default:[ps]},$$scope:{ctx:T}}}),{c(){f(i.$$.fragment),j=a(),f(o.$$.fragment)},l(c){M(i.$$.fragment,c),j=n(c),M(o.$$.fragment,c)},m(c,h){y(i,c,h),s(c,j,h),y(o,c,h),u=!0},p(c,h){const J={};h&2&&(J.$$scope={dirty:h,ctx:c}),i.$set(J);const I={};h&2&&(I.$$scope={dirty:h,ctx:c}),o.$set(I)},i(c){u||(g(i.$$.fragment,c),g(o.$$.fragment,c),u=!0)},o(c){b(i.$$.fragment,c),b(o.$$.fragment,c),u=!1},d(c){c&&l(j),w(i,c),w(o,c)}}}function ms(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,u){s(o,i,u)},p:Se,d(o){o&&l(i)}}}function hs(T){let i;return{c(){i=es("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=ts(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 us(T){let i,j,o,u,c,h,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.",v,W,G,_,r,U,ze='<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.',Pe,E,il='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:',De,P,Ke,R,ol='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_dreambooth.png"/>',Oe,D,et,K,rl='<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.',tt,O,pl="Because textual inversion creates embeddings, it cannot be used on its own like DreamBooth and requires another model.",lt,ee,st,te,dl='Now you can load the textual inversion embeddings with the <a href="/docs/diffusers/main/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:',at,le,nt,x,ml='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_txt_embed.png"/>',it,se,hl='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/loaders/textual_inversion#diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion">load_textual_inversion()</a>, but this time, you’ll need two more parameters:',ot,ae,ul="<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>",rt,ne,cl='Let’s load the <a href="https://huggingface.co/sayakpaul/EasyNegative-test" rel="nofollow">sayakpaul/EasyNegative-test</a> embeddings:',pt,ie,dt,oe,fl="Now you can use the <code>token</code> to generate an image with the negative embeddings:",mt,re,ht,k,Ml='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_neg_embed.png"/>',ut,pe,ct,de,yl='<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.',ft,X,Mt,me,gl="LoRAs also need to be used with another model:",yt,he,gt,ue,bl='Then use the <a href="/docs/diffusers/main/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:',bt,ce,wt,H,wl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_lora.png"/>',jt,fe,jl='The <a href="/docs/diffusers/main/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:',Ut,Me,Ul="<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>",Jt,ye,Jl='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:',Tt,ge,$t,A,Tl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_attn_proc.png"/>',Zt,be,$l='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:',Wt,we,Gt,je,It,Ue,Zl='For both <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.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.',Bt,Je,Wl="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,_t,$e,Gl='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.',Ct,V,Lt,Ze,Rt,We,Il='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.',xt,Q,kt,Ge,Xt,Ie,Bl='<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.',Ht,Be,vl='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.',At,F,Vt,ve,_l="To start, load a Stable Diffusion checkpoint.",Qt,_e,Ft,Ce,Cl='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.',Yt,Le,Nt,Re,Ll="Once loaded, you can use the pipeline with an image and text prompt to guide the image generation process.",qt,xe,St,Y,Rl='    <img src="https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/ip-bear.png"/>',zt,ke,Et,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.',Pt,He,kl="This is the case for <em>IP-Adapter Plus</em> checkpoints which use the ViT-H image encoder.",Dt,Ae,Kt,Ve,Ot,Qe,Xl=`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.`,el,N,tl,Fe,ll,Ye,Hl="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.",sl,Ne,al,Ee,nl;return c=new L({props:{title:"Load adapters",local:"load-adapters",headingTag:"h1"}}),J=new ls({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 qe({props:{$$slots:{default:[as]},$$scope:{ctx:T}}}),_=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 qe({props:{$$slots:{default:[ns]},$$scope:{ctx:T}}}),he=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}}),ce=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:"cGlwZSUyMCUzRCUyMC4uLiUyMCUyMyUyMGNyZWF0ZSUyMHBpcGVsaW5lJTBBcGlwZS5sb2FkX2xvcmFfd2VpZ2h0cyguLi4lMkMlMjBhZGFwdGVyX25hbWUlM0QlMjJteV9hZGFwdGVyJTIyKSUyMCUwQXNjYWxlcyUyMCUzRCUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMnRleHRfZW5jb2RlciUyMiUzQSUyMDAuNSUyQyUwQSUyMCUyMCUyMCUyMCUyMnRleHRfZW5jb2Rlcl8yJTIyJTNBJTIwMC41JTJDJTIwJTIwJTIzJTIwb25seSUyMHVzYWJsZSUyMGlmJTIwcGlwZSUyMGhhcyUyMGElMjAybmQlMjB0ZXh0JTIwZW5jb2RlciUwQSUyMCUyMCUyMCUyMCUyMnVuZXQlMjIlM0ElMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJkb3duJTIyJTNBJTIwMC45JTJDJTIwJTIwJTIzJTIwYWxsJTIwdHJhbnNmb3JtZXJzJTIwaW4lMjB0aGUlMjBkb3duLXBhcnQlMjB3aWxsJTIwdXNlJTIwc2NhbGUlMjAwLjklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjAlMjJtaWQlMjIlMjAlMjAlMjMlMjBpbiUyMHRoaXMlMjBleGFtcGxlJTIwJTIybWlkJTIyJTIwaXMlMjBub3QlMjBnaXZlbiUyQyUyMHRoZXJlZm9yZSUyMGFsbCUyMHRyYW5zZm9ybWVycyUyMGluJTIwdGhlJTIwbWlkJTIwcGFydCUyMHdpbGwlMjB1c2UlMjB0aGUlMjBkZWZhdWx0JTIwc2NhbGUlMjAxLjAlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJ1cCUyMiUzQSUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmJsb2NrXzAlMjIlM0ElMjAwLjYlMkMlMjAlMjAlMjMlMjBhbGwlMjAzJTIwdHJhbnNmb3JtZXJzJTIwaW4lMjB0aGUlMjAwdGglMjBibG9jayUyMGluJTIwdGhlJTIwdXAtcGFydCUyMHdpbGwlMjB1c2UlMjBzY2FsZSUyMDAuNiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmJsb2NrXzElMjIlM0ElMjAlNUIwLjQlMkMlMjAwLjglMkMlMjAxLjAlNUQlMkMlMjAlMjAlMjMlMjB0aGUlMjAzJTIwdHJhbnNmb3JtZXJzJTIwaW4lMjB0aGUlMjAxc3QlMjBibG9jayUyMGluJTIwdGhlJTIwdXAtcGFydCUyMHdpbGwlMjB1c2UlMjBzY2FsZXMlMjAwLjQlMkMlMjAwLjglMjBhbmQlMjAxLjAlMjByZXNwZWN0aXZlbHklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0QlMEElMjAlMjAlMjAlMjAlN0QlMEElN0QlMEFwaXBlLnNldF9hZGFwdGVycyglMjJteV9hZGFwdGVyJTIyJTJDJTIwc2NhbGVzKQ==",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 qe({props:{warning:!0,$$slots:{default:[is]},$$scope:{ctx:T}}}),Ze=new L({props:{title:"Kohya and TheLastBen",local:"kohya-and-thelastben",headingTag:"h3"}}),Q=new ss({props:{id:"other-trainers",options:["Kohya","TheLastBen"],$$slots:{default:[ds]},$$scope:{ctx:T}}}),Ge=new L({props:{title:"IP-Adapter",local:"ip-adapter",headingTag:"h2"}}),F=new qe({props:{warning:!1,$$slots:{default:[ms]},$$scope:{ctx:T}}}),_e=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}}),xe=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 qe({props:{warning:!0,$$slots:{default:[hs]},$$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}}),{c(){i=p("meta"),j=a(),o=p("p"),u=a(),f(c.$$.fragment),h=a(),f(J.$$.fragment),I=a(),Z=p("p"),Z.innerHTML=S,B=a(),C=p("p"),C.textContent=z,v=a(),f(W.$$.fragment),G=a(),f(_.$$.fragment),r=a(),U=p("p"),U.innerHTML=ze,Pe=a(),E=p("p"),E.innerHTML=il,De=a(),f(P.$$.fragment),Ke=a(),R=p("div"),R.innerHTML=ol,Oe=a(),f(D.$$.fragment),et=a(),K=p("p"),K.innerHTML=rl,tt=a(),O=p("p"),O.textContent=pl,lt=a(),f(ee.$$.fragment),st=a(),te=p("p"),te.innerHTML=dl,at=a(),f(le.$$.fragment),nt=a(),x=p("div"),x.innerHTML=ml,it=a(),se=p("p"),se.innerHTML=hl,ot=a(),ae=p("ul"),ae.innerHTML=ul,rt=a(),ne=p("p"),ne.innerHTML=cl,pt=a(),f(ie.$$.fragment),dt=a(),oe=p("p"),oe.innerHTML=fl,mt=a(),f(re.$$.fragment),ht=a(),k=p("div"),k.innerHTML=Ml,ut=a(),f(pe.$$.fragment),ct=a(),de=p("p"),de.innerHTML=yl,ft=a(),f(X.$$.fragment),Mt=a(),me=p("p"),me.textContent=gl,yt=a(),f(he.$$.fragment),gt=a(),ue=p("p"),ue.innerHTML=bl,bt=a(),f(ce.$$.fragment),wt=a(),H=p("div"),H.innerHTML=wl,jt=a(),fe=p("p"),fe.innerHTML=jl,Ut=a(),Me=p("ul"),Me.innerHTML=Ul,Jt=a(),ye=p("p"),ye.innerHTML=Jl,Tt=a(),f(ge.$$.fragment),$t=a(),A=p("div"),A.innerHTML=Tl,Zt=a(),be=p("p"),be.innerHTML=$l,Wt=a(),f(we.$$.fragment),Gt=a(),f(je.$$.fragment),It=a(),Ue=p("p"),Ue.innerHTML=Zl,Bt=a(),Je=p("p"),Je.innerHTML=Wl,vt=a(),f(Te.$$.fragment),_t=a(),$e=p("p"),$e.innerHTML=Gl,Ct=a(),f(V.$$.fragment),Lt=a(),f(Ze.$$.fragment),Rt=a(),We=p("p"),We.innerHTML=Il,xt=a(),f(Q.$$.fragment),kt=a(),f(Ge.$$.fragment),Xt=a(),Ie=p("p"),Ie.innerHTML=Bl,Ht=a(),Be=p("p"),Be.innerHTML=vl,At=a(),f(F.$$.fragment),Vt=a(),ve=p("p"),ve.textContent=_l,Qt=a(),f(_e.$$.fragment),Ft=a(),Ce=p("p"),Ce.innerHTML=Cl,Yt=a(),f(Le.$$.fragment),Nt=a(),Re=p("p"),Re.textContent=Ll,qt=a(),f(xe.$$.fragment),St=a(),Y=p("div"),Y.innerHTML=Rl,zt=a(),f(ke.$$.fragment),Et=a(),Xe=p("p"),Xe.innerHTML=xl,Pt=a(),He=p("p"),He.innerHTML=kl,Dt=a(),f(Ae.$$.fragment),Kt=a(),f(Ve.$$.fragment),Ot=a(),Qe=p("p"),Qe.innerHTML=Xl,el=a(),f(N.$$.fragment),tl=a(),f(Fe.$$.fragment),ll=a(),Ye=p("p"),Ye.innerHTML=Hl,sl=a(),f(Ne.$$.fragment),al=a(),Ee=p("p"),this.h()},l(e){const t=Kl("svelte-u9bgzb",document.head);i=d(t,"META",{name:!0,content:!0}),t.forEach(l),j=n(e),o=d(e,"P",{}),ql(o).forEach(l),u=n(e),M(c.$$.fragment,e),h=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),v=n(e),M(W.$$.fragment,e),G=n(e),M(_.$$.fragment,e),r=n(e),U=d(e,"P",{"data-svelte-h":!0}),m(U)!=="svelte-yncm6r"&&(U.innerHTML=ze),Pe=n(e),E=d(e,"P",{"data-svelte-h":!0}),m(E)!=="svelte-1ngpipq"&&(E.innerHTML=il),De=n(e),M(P.$$.fragment,e),Ke=n(e),R=d(e,"DIV",{class:!0,"data-svelte-h":!0}),m(R)!=="svelte-1qqjocv"&&(R.innerHTML=ol),Oe=n(e),M(D.$$.fragment,e),et=n(e),K=d(e,"P",{"data-svelte-h":!0}),m(K)!=="svelte-z0bjzf"&&(K.innerHTML=rl),tt=n(e),O=d(e,"P",{"data-svelte-h":!0}),m(O)!=="svelte-1bhtcph"&&(O.textContent=pl),lt=n(e),M(ee.$$.fragment,e),st=n(e),te=d(e,"P",{"data-svelte-h":!0}),m(te)!=="svelte-1s1y71b"&&(te.innerHTML=dl),at=n(e),M(le.$$.fragment,e),nt=n(e),x=d(e,"DIV",{class:!0,"data-svelte-h":!0}),m(x)!=="svelte-vwb4li"&&(x.innerHTML=ml),it=n(e),se=d(e,"P",{"data-svelte-h":!0}),m(se)!=="svelte-h6sd1m"&&(se.innerHTML=hl),ot=n(e),ae=d(e,"UL",{"data-svelte-h":!0}),m(ae)!=="svelte-1v8nqu6"&&(ae.innerHTML=ul),rt=n(e),ne=d(e,"P",{"data-svelte-h":!0}),m(ne)!=="svelte-1eujnzn"&&(ne.innerHTML=cl),pt=n(e),M(ie.$$.fragment,e),dt=n(e),oe=d(e,"P",{"data-svelte-h":!0}),m(oe)!=="svelte-5s5bn9"&&(oe.innerHTML=fl),mt=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=Ml),ut=n(e),M(pe.$$.fragment,e),ct=n(e),de=d(e,"P",{"data-svelte-h":!0}),m(de)!=="svelte-10sp1c2"&&(de.innerHTML=yl),ft=n(e),M(X.$$.fragment,e),Mt=n(e),me=d(e,"P",{"data-svelte-h":!0}),m(me)!=="svelte-l2hd9l"&&(me.textContent=gl),yt=n(e),M(he.$$.fragment,e),gt=n(e),ue=d(e,"P",{"data-svelte-h":!0}),m(ue)!=="svelte-1ud9e4b"&&(ue.innerHTML=bl),bt=n(e),M(ce.$$.fragment,e),wt=n(e),H=d(e,"DIV",{class:!0,"data-svelte-h":!0}),m(H)!=="svelte-848z5s"&&(H.innerHTML=wl),jt=n(e),fe=d(e,"P",{"data-svelte-h":!0}),m(fe)!=="svelte-j3sxhc"&&(fe.innerHTML=jl),Ut=n(e),Me=d(e,"UL",{"data-svelte-h":!0}),m(Me)!=="svelte-ddcy8o"&&(Me.innerHTML=Ul),Jt=n(e),ye=d(e,"P",{"data-svelte-h":!0}),m(ye)!=="svelte-im0lkb"&&(ye.innerHTML=Jl),Tt=n(e),M(ge.$$.fragment,e),$t=n(e),A=d(e,"DIV",{class:!0,"data-svelte-h":!0}),m(A)!=="svelte-1etahws"&&(A.innerHTML=Tl),Zt=n(e),be=d(e,"P",{"data-svelte-h":!0}),m(be)!=="svelte-wf4vgp"&&(be.innerHTML=$l),Wt=n(e),M(we.$$.fragment,e),Gt=n(e),M(je.$$.fragment,e),It=n(e),Ue=d(e,"P",{"data-svelte-h":!0}),m(Ue)!=="svelte-nj309k"&&(Ue.innerHTML=Zl),Bt=n(e),Je=d(e,"P",{"data-svelte-h":!0}),m(Je)!=="svelte-u1an6c"&&(Je.innerHTML=Wl),vt=n(e),M(Te.$$.fragment,e),_t=n(e),$e=d(e,"P",{"data-svelte-h":!0}),m($e)!=="svelte-y7bfbz"&&($e.innerHTML=Gl),Ct=n(e),M(V.$$.fragment,e),Lt=n(e),M(Ze.$$.fragment,e),Rt=n(e),We=d(e,"P",{"data-svelte-h":!0}),m(We)!=="svelte-6zj1or"&&(We.innerHTML=Il),xt=n(e),M(Q.$$.fragment,e),kt=n(e),M(Ge.$$.fragment,e),Xt=n(e),Ie=d(e,"P",{"data-svelte-h":!0}),m(Ie)!=="svelte-1pu4ft1"&&(Ie.innerHTML=Bl),Ht=n(e),Be=d(e,"P",{"data-svelte-h":!0}),m(Be)!=="svelte-18j3qom"&&(Be.innerHTML=vl),At=n(e),M(F.$$.fragment,e),Vt=n(e),ve=d(e,"P",{"data-svelte-h":!0}),m(ve)!=="svelte-w9hhyu"&&(ve.textContent=_l),Qt=n(e),M(_e.$$.fragment,e),Ft=n(e),Ce=d(e,"P",{"data-svelte-h":!0}),m(Ce)!=="svelte-lmam2w"&&(Ce.innerHTML=Cl),Yt=n(e),M(Le.$$.fragment,e),Nt=n(e),Re=d(e,"P",{"data-svelte-h":!0}),m(Re)!=="svelte-7abk5j"&&(Re.textContent=Ll),qt=n(e),M(xe.$$.fragment,e),St=n(e),Y=d(e,"DIV",{class:!0,"data-svelte-h":!0}),m(Y)!=="svelte-1vum0wo"&&(Y.innerHTML=Rl),zt=n(e),M(ke.$$.fragment,e),Et=n(e),Xe=d(e,"P",{"data-svelte-h":!0}),m(Xe)!=="svelte-85ru9q"&&(Xe.innerHTML=xl),Pt=n(e),He=d(e,"P",{"data-svelte-h":!0}),m(He)!=="svelte-zfljo5"&&(He.innerHTML=kl),Dt=n(e),M(Ae.$$.fragment,e),Kt=n(e),M(Ve.$$.fragment,e),Ot=n(e),Qe=d(e,"P",{"data-svelte-h":!0}),m(Qe)!=="svelte-1ah3evs"&&(Qe.innerHTML=Xl),el=n(e),M(N.$$.fragment,e),tl=n(e),M(Fe.$$.fragment,e),ll=n(e),Ye=d(e,"P",{"data-svelte-h":!0}),m(Ye)!=="svelte-3ktslb"&&(Ye.innerHTML=Hl),sl=n(e),M(Ne.$$.fragment,e),al=n(e),Ee=d(e,"P",{}),ql(Ee).forEach(l),this.h()},h(){q(i,"name","hf:doc:metadata"),q(i,"content",cs),q(R,"class","flex justify-center"),q(x,"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){Ol(document.head,i),s(e,j,t),s(e,o,t),s(e,u,t),y(c,e,t),s(e,h,t),y(J,e,t),s(e,I,t),s(e,Z,t),s(e,B,t),s(e,C,t),s(e,v,t),y(W,e,t),s(e,G,t),y(_,e,t),s(e,r,t),s(e,U,t),s(e,Pe,t),s(e,E,t),s(e,De,t),y(P,e,t),s(e,Ke,t),s(e,R,t),s(e,Oe,t),y(D,e,t),s(e,et,t),s(e,K,t),s(e,tt,t),s(e,O,t),s(e,lt,t),y(ee,e,t),s(e,st,t),s(e,te,t),s(e,at,t),y(le,e,t),s(e,nt,t),s(e,x,t),s(e,it,t),s(e,se,t),s(e,ot,t),s(e,ae,t),s(e,rt,t),s(e,ne,t),s(e,pt,t),y(ie,e,t),s(e,dt,t),s(e,oe,t),s(e,mt,t),y(re,e,t),s(e,ht,t),s(e,k,t),s(e,ut,t),y(pe,e,t),s(e,ct,t),s(e,de,t),s(e,ft,t),y(X,e,t),s(e,Mt,t),s(e,me,t),s(e,yt,t),y(he,e,t),s(e,gt,t),s(e,ue,t),s(e,bt,t),y(ce,e,t),s(e,wt,t),s(e,H,t),s(e,jt,t),s(e,fe,t),s(e,Ut,t),s(e,Me,t),s(e,Jt,t),s(e,ye,t),s(e,Tt,t),y(ge,e,t),s(e,$t,t),s(e,A,t),s(e,Zt,t),s(e,be,t),s(e,Wt,t),y(we,e,t),s(e,Gt,t),y(je,e,t),s(e,It,t),s(e,Ue,t),s(e,Bt,t),s(e,Je,t),s(e,vt,t),y(Te,e,t),s(e,_t,t),s(e,$e,t),s(e,Ct,t),y(V,e,t),s(e,Lt,t),y(Ze,e,t),s(e,Rt,t),s(e,We,t),s(e,xt,t),y(Q,e,t),s(e,kt,t),y(Ge,e,t),s(e,Xt,t),s(e,Ie,t),s(e,Ht,t),s(e,Be,t),s(e,At,t),y(F,e,t),s(e,Vt,t),s(e,ve,t),s(e,Qt,t),y(_e,e,t),s(e,Ft,t),s(e,Ce,t),s(e,Yt,t),y(Le,e,t),s(e,Nt,t),s(e,Re,t),s(e,qt,t),y(xe,e,t),s(e,St,t),s(e,Y,t),s(e,zt,t),y(ke,e,t),s(e,Et,t),s(e,Xe,t),s(e,Pt,t),s(e,He,t),s(e,Dt,t),y(Ae,e,t),s(e,Kt,t),y(Ve,e,t),s(e,Ot,t),s(e,Qe,t),s(e,el,t),y(N,e,t),s(e,tl,t),y(Fe,e,t),s(e,ll,t),s(e,Ye,t),s(e,sl,t),y(Ne,e,t),s(e,al,t),s(e,Ee,t),nl=!0},p(e,[t]){const Al={};t&2&&(Al.$$scope={dirty:t,ctx:e}),W.$set(Al);const Vl={};t&2&&(Vl.$$scope={dirty:t,ctx:e}),X.$set(Vl);const Ql={};t&2&&(Ql.$$scope={dirty:t,ctx:e}),V.$set(Ql);const Fl={};t&2&&(Fl.$$scope={dirty:t,ctx:e}),Q.$set(Fl);const Yl={};t&2&&(Yl.$$scope={dirty:t,ctx:e}),F.$set(Yl);const Nl={};t&2&&(Nl.$$scope={dirty:t,ctx:e}),N.$set(Nl)},i(e){nl||(g(c.$$.fragment,e),g(J.$$.fragment,e),g(W.$$.fragment,e),g(_.$$.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(he.$$.fragment,e),g(ce.$$.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(_e.$$.fragment,e),g(Le.$$.fragment,e),g(xe.$$.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),nl=!0)},o(e){b(c.$$.fragment,e),b(J.$$.fragment,e),b(W.$$.fragment,e),b(_.$$.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(he.$$.fragment,e),b(ce.$$.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(_e.$$.fragment,e),b(Le.$$.fragment,e),b(xe.$$.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),nl=!1},d(e){e&&(l(j),l(o),l(u),l(h),l(I),l(Z),l(B),l(C),l(v),l(G),l(r),l(U),l(Pe),l(E),l(De),l(Ke),l(R),l(Oe),l(et),l(K),l(tt),l(O),l(lt),l(st),l(te),l(at),l(nt),l(x),l(it),l(se),l(ot),l(ae),l(rt),l(ne),l(pt),l(dt),l(oe),l(mt),l(ht),l(k),l(ut),l(ct),l(de),l(ft),l(Mt),l(me),l(yt),l(gt),l(ue),l(bt),l(wt),l(H),l(jt),l(fe),l(Ut),l(Me),l(Jt),l(ye),l(Tt),l($t),l(A),l(Zt),l(be),l(Wt),l(Gt),l(It),l(Ue),l(Bt),l(Je),l(vt),l(_t),l($e),l(Ct),l(Lt),l(Rt),l(We),l(xt),l(kt),l(Xt),l(Ie),l(Ht),l(Be),l(At),l(Vt),l(ve),l(Qt),l(Ft),l(Ce),l(Yt),l(Nt),l(Re),l(qt),l(St),l(Y),l(zt),l(Et),l(Xe),l(Pt),l(He),l(Dt),l(Kt),l(Ot),l(Qe),l(el),l(tl),l(ll),l(Ye),l(sl),l(al),l(Ee)),l(i),w(c,e),w(J,e),w(W,e),w(_,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(he,e),w(ce,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(_e,e),w(Le,e),w(xe,e),w(ke,e),w(Ae,e),w(Ve,e),w(N,e),w(Fe,e),w(Ne,e)}}}const cs='{"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 fs(T){return El(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Js extends Pl{constructor(i){super(),Dl(this,i,fs,us,zl,{})}}export{Js as component};
