import{s as ls,o as ss,n as Pe}from"../chunks/scheduler.8c3d61f6.js";import{S as as,i as is,g as r,s as a,r as c,A as ns,h as p,f as l,c as i,j as es,u as M,x as m,k as Y,y as os,a as s,v as y,d as g,t as b,w,m as rs,n as ps}from"../chunks/index.da70eac4.js";import{T as Ee}from"../chunks/Tip.1d9b8c37.js";import{C as $}from"../chunks/CodeBlock.00a903b3.js";import{D as ds}from"../chunks/DocNotebookDropdown.02900f6b.js";import{H as L,E as ms}from"../chunks/EditOnGithub.1e64e623.js";import{H as us,a as ts}from"../chunks/HfOption.6ab18950.js";function hs(T){let n,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(){n=r("p"),n.innerHTML=j},l(o){n=p(o,"P",{"data-svelte-h":!0}),m(n)!=="svelte-unc393"&&(n.innerHTML=j)},m(o,h){s(o,n,h)},p:Pe,d(o){o&&l(n)}}}function fs(T){let n,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(){n=r("p"),n.innerHTML=j},l(o){n=p(o,"P",{"data-svelte-h":!0}),m(n)!=="svelte-bp0omm"&&(n.innerHTML=j)},m(o,h){s(o,n,h)},p:Pe,d(o){o&&l(n)}}}function cs(T){let n,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(){n=r("p"),n.innerHTML=j},l(o){n=p(o,"P",{"data-svelte-h":!0}),m(n)!=="svelte-1aq2a67"&&(n.innerHTML=j)},m(o,h){s(o,n,h)},p:Pe,d(o){o&&l(n)}}}function Ms(T){let n,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/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.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(){n=r("p"),n.textContent=j,o=a(),h=r("ul"),h.innerHTML=f},l(u){n=p(u,"P",{"data-svelte-h":!0}),m(n)!=="svelte-1aa8at7"&&(n.textContent=j),o=i(u),h=p(u,"UL",{"data-svelte-h":!0}),m(h)!=="svelte-f01ws8"&&(h.innerHTML=f)},m(u,U){s(u,n,U),s(u,o,U),s(u,h,U)},p:Pe,d(u){u&&(l(n),l(o),l(h))}}}function ys(T){let n,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,U='Load the LoRA checkpoint with the <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> method, and specify the filename in the <code>weight_name</code> parameter:',I,Z,N,_,C="Generate an image:",z,B,G,W,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}}),B=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}}),W=new Ee({props:{warning:!0,$$slots:{default:[Ms]},$$scope:{ctx:T}}}),{c(){n=r("p"),n.innerHTML=j,o=a(),c(h.$$.fragment),f=a(),u=r("p"),u.innerHTML=U,I=a(),c(Z.$$.fragment),N=a(),_=r("p"),_.textContent=C,z=a(),c(B.$$.fragment),G=a(),c(W.$$.fragment)},l(d){n=p(d,"P",{"data-svelte-h":!0}),m(n)!=="svelte-1xg7vsu"&&(n.innerHTML=j),o=i(d),M(h.$$.fragment,d),f=i(d),u=p(d,"P",{"data-svelte-h":!0}),m(u)!=="svelte-6gv8x6"&&(u.innerHTML=U),I=i(d),M(Z.$$.fragment,d),N=i(d),_=p(d,"P",{"data-svelte-h":!0}),m(_)!=="svelte-1un5bjt"&&(_.textContent=C),z=i(d),M(B.$$.fragment,d),G=i(d),M(W.$$.fragment,d)},m(d,J){s(d,n,J),s(d,o,J),y(h,d,J),s(d,f,J),s(d,u,J),s(d,I,J),y(Z,d,J),s(d,N,J),s(d,_,J),s(d,z,J),y(B,d,J),s(d,G,J),y(W,d,J),v=!0},p(d,J){const De={};J&2&&(De.$$scope={dirty:J,ctx:d}),W.$set(De)},i(d){v||(g(h.$$.fragment,d),g(Z.$$.fragment,d),g(B.$$.fragment,d),g(W.$$.fragment,d),v=!0)},o(d){b(h.$$.fragment,d),b(Z.$$.fragment,d),b(B.$$.fragment,d),b(W.$$.fragment,d),v=!1},d(d){d&&(l(n),l(o),l(f),l(u),l(I),l(N),l(_),l(z),l(G)),w(h,d),w(Z,d),w(B,d),w(W,d)}}}function gs(T){let n,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(){n=r("p"),n.innerHTML=j,o=a(),c(h.$$.fragment)},l(u){n=p(u,"P",{"data-svelte-h":!0}),m(n)!=="svelte-qdt5l0"&&(n.innerHTML=j),o=i(u),M(h.$$.fragment,u)},m(u,U){s(u,n,U),s(u,o,U),y(h,u,U),f=!0},p:Pe,i(u){f||(g(h.$$.fragment,u),f=!0)},o(u){b(h.$$.fragment,u),f=!1},d(u){u&&(l(n),l(o)),w(h,u)}}}function bs(T){let n,j,o,h;return n=new ts({props:{id:"other-trainers",option:"Kohya",$$slots:{default:[ys]},$$scope:{ctx:T}}}),o=new ts({props:{id:"other-trainers",option:"TheLastBen",$$slots:{default:[gs]},$$scope:{ctx:T}}}),{c(){c(n.$$.fragment),j=a(),c(o.$$.fragment)},l(f){M(n.$$.fragment,f),j=i(f),M(o.$$.fragment,f)},m(f,u){y(n,f,u),s(f,j,u),y(o,f,u),h=!0},p(f,u){const U={};u&2&&(U.$$scope={dirty:u,ctx:f}),n.$set(U);const I={};u&2&&(I.$$scope={dirty:u,ctx:f}),o.$set(I)},i(f){h||(g(n.$$.fragment,f),g(o.$$.fragment,f),h=!0)},o(f){b(n.$$.fragment,f),b(o.$$.fragment,f),h=!1},d(f){f&&l(j),w(n,f),w(o,f)}}}function ws(T){let n,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(){n=r("p"),n.innerHTML=j},l(o){n=p(o,"P",{"data-svelte-h":!0}),m(n)!=="svelte-13d91fo"&&(n.innerHTML=j)},m(o,h){s(o,n,h)},p:Pe,d(o){o&&l(n)}}}function js(T){let n;return{c(){n=rs("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){n=ps(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,n,o)},d(j){j&&l(n)}}}function Js(T){let n,j,o,h,f,u,U,I,Z,N='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.',_,C,z="This guide will show you how to load DreamBooth, textual inversion, and LoRA weights.",B,G,W,v,d,J,De='<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.',Oe,E,ul='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:',et,P,tt,x,hl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_dreambooth.png"/>',lt,D,st,K,fl='<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.',at,O,cl="Because textual inversion creates embeddings, it cannot be used on its own like DreamBooth and requires another model.",it,ee,nt,te,Ml='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:',ot,le,rt,R,yl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_txt_embed.png"/>',pt,se,gl='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:',dt,ae,bl="<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>",mt,ie,wl='Let’s load the <a href="https://huggingface.co/sayakpaul/EasyNegative-test" rel="nofollow">sayakpaul/EasyNegative-test</a> embeddings:',ut,ne,ht,oe,jl="Now you can use the <code>token</code> to generate an image with the negative embeddings:",ft,re,ct,k,Jl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_neg_embed.png"/>',Mt,pe,yt,de,Ul='<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.',gt,X,bt,me,Tl="LoRAs also need to be used with another model:",wt,ue,jt,he,$l='Then use the <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.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:',Jt,fe,Ut,A,Zl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_lora.png"/>',Tt,ce,Gl='The <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.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:',$t,Me,Wl="<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>",Zt,ye,Il='To directly load (and save) a LoRA adapter at the <em>model-level</em>, use <code>~PeftAdapterMixin.load_lora_adapter</code>, which builds and prepares the necessary model configuration for the adapter. Like <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a>, <code>PeftAdapterMixin.load_lora_adapter</code> can load LoRAs for both the UNet and text encoder. For example, if you’re loading a LoRA for the UNet, <code>PeftAdapterMixin.load_lora_adapter</code> ignores the keys for the text encoder.',Gt,ge,_l="Use the <code>weight_name</code> parameter to specify the specific weight file and the <code>prefix</code> parameter to filter for the appropriate state dicts (<code>&quot;unet&quot;</code> in this case) to load.",Wt,be,It,H,Bl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_attn_proc.png"/>',_t,we,vl="Save an adapter with <code>~PeftAdapterMixin.save_lora_adapter</code>.",Bt,je,Cl='To unload the LoRA weights, use the <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.lora_base.LoraBaseMixin.unload_lora_weights">unload_lora_weights()</a> method to discard the LoRA weights and restore the model to its original weights:',vt,Je,Ct,Ue,Lt,Te,Ll='For both <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.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.',xt,$e,xl="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.",Rt,Ze,kt,Ge,Rl='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.',Xt,V,At,We,Ht,Ie,kl='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.',Vt,Q,Qt,_e,Ft,Be,Xl='<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.',qt,ve,Al='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.',St,F,Yt,Ce,Hl="To start, load a Stable Diffusion checkpoint.",Nt,Le,zt,xe,Vl='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.',Et,Re,Pt,ke,Ql="Once loaded, you can use the pipeline with an image and text prompt to guide the image generation process.",Dt,Xe,Kt,q,Fl='    <img src="https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/ip-bear.png"/>',Ot,Ae,el,He,ql='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.',tl,Ve,Sl="This is the case for <em>IP-Adapter Plus</em> checkpoints which use the ViT-H image encoder.",ll,Qe,sl,Fe,al,qe,Yl=`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.`,il,S,nl,Se,ol,Ye,Nl="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.",rl,Ne,pl,ze,dl,Ke,ml;return f=new L({props:{title:"Load adapters",local:"load-adapters",headingTag:"h1"}}),U=new ds({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"}]}}),G=new Ee({props:{$$slots:{default:[hs]},$$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:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmxlLWRpZmZ1c2lvbi12MS01JTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKQ==",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;stable-diffusion-v1-5/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}}),ne=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 Ee({props:{$$slots:{default:[fs]},$$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}}),be=new $({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLnVuZXQubG9hZF9sb3JhX2FkYXB0ZXIoJTIyamJpbGNrZS1oZiUyRnNkeGwtY2luZW1hdGljLTElMjIlMkMlMjB3ZWlnaHRfbmFtZSUzRCUyMnB5dG9yY2hfbG9yYV93ZWlnaHRzLnNhZmV0ZW5zb3JzJTIyJTJDJTIwcHJlZml4JTNEJTIydW5ldCUyMiklMEElMEElMjMlMjB1c2UlMjBjbm10JTIwaW4lMjB0aGUlMjBwcm9tcHQlMjB0byUyMHRyaWdnZXIlMjB0aGUlMjBMb1JBJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMGN1dGUlMjBjbm10JTIwZWF0aW5nJTIwYSUyMHNsaWNlJTIwb2YlMjBwaXp6YSUyQyUyMHN0dW5uaW5nJTIwY29sb3IlMjBzY2hlbWUlMkMlMjBtYXN0ZXJwaWVjZSUyQyUyMGlsbHVzdHJhdGlvbiUyMiUwQWltYWdlJTIwJTNEJTIwcGlwZWxpbmUocHJvbXB0KS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2U=",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_lora_adapter(<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>, prefix=<span class="hljs-string">&quot;unet&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}}),Je=new $({props:{code:"cGlwZWxpbmUudW5sb2FkX2xvcmFfd2VpZ2h0cygp",highlighted:"pipeline.unload_lora_weights()",wrap:!1}}),Ue=new L({props:{title:"Adjust LoRA weight scale",local:"adjust-lora-weight-scale",headingTag:"h3"}}),Ze=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 Ee({props:{warning:!0,$$slots:{default:[cs]},$$scope:{ctx:T}}}),We=new L({props:{title:"Kohya and TheLastBen",local:"kohya-and-thelastben",headingTag:"h3"}}),Q=new us({props:{id:"other-trainers",options:["Kohya","TheLastBen"],$$slots:{default:[bs]},$$scope:{ctx:T}}}),_e=new L({props:{title:"IP-Adapter",local:"ip-adapter",headingTag:"h2"}}),F=new Ee({props:{warning:!1,$$slots:{default:[ws]},$$scope:{ctx:T}}}),Le=new $({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBsb2FkX2ltYWdlJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBBdXRvUGlwZWxpbmVGb3JUZXh0MkltYWdlLmZyb21fcHJldHJhaW5lZCglMjJzdGFibGUtZGlmZnVzaW9uLXYxLTUlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIp",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;stable-diffusion-v1-5/stable-diffusion-v1-5&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),Re=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}}),Ae=new L({props:{title:"IP-Adapter Plus",local:"ip-adapter-plus",headingTag:"h3"}}),Qe=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}}),Fe=new L({props:{title:"IP-Adapter Face ID models",local:"ip-adapter-face-id-models",headingTag:"h3"}}),S=new Ee({props:{warning:!0,$$slots:{default:[js]},$$scope:{ctx:T}}}),Se=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:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBWaXNpb25Nb2RlbFdpdGhQcm9qZWN0aW9uJTBBJTBBaW1hZ2VfZW5jb2RlciUyMCUzRCUyMENMSVBWaXNpb25Nb2RlbFdpdGhQcm9qZWN0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJsYWlvbiUyRkNMSVAtVmlULUgtMTQtbGFpb24yQi1zMzJCLWI3OUslMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEEpJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBBdXRvUGlwZWxpbmVGb3JUZXh0MkltYWdlLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFibGUtZGlmZnVzaW9uLXYxLTUlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMkMlMEElMjAlMjAlMjAlMjBpbWFnZV9lbmNvZGVyJTNEaW1hZ2VfZW5jb2RlciUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSkudG8oJTIyY3VkYSUyMiklMEElMEFwaXBlbGluZS5sb2FkX2lwX2FkYXB0ZXIoJTIyaDk0JTJGSVAtQWRhcHRlci1GYWNlSUQlMjIlMkMlMjBzdWJmb2xkZXIlM0ROb25lJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJpcC1hZGFwdGVyLWZhY2VpZC1wbHVzX3NkMTUuYmluJTIyKQ==",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;stable-diffusion-v1-5/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}}),ze=new ms({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/using-diffusers/loading_adapters.md"}}),{c(){n=r("meta"),j=a(),o=r("p"),h=a(),c(f.$$.fragment),u=a(),c(U.$$.fragment),I=a(),Z=r("p"),Z.innerHTML=N,_=a(),C=r("p"),C.textContent=z,B=a(),c(G.$$.fragment),W=a(),c(v.$$.fragment),d=a(),J=r("p"),J.innerHTML=De,Oe=a(),E=r("p"),E.innerHTML=ul,et=a(),c(P.$$.fragment),tt=a(),x=r("div"),x.innerHTML=hl,lt=a(),c(D.$$.fragment),st=a(),K=r("p"),K.innerHTML=fl,at=a(),O=r("p"),O.textContent=cl,it=a(),c(ee.$$.fragment),nt=a(),te=r("p"),te.innerHTML=Ml,ot=a(),c(le.$$.fragment),rt=a(),R=r("div"),R.innerHTML=yl,pt=a(),se=r("p"),se.innerHTML=gl,dt=a(),ae=r("ul"),ae.innerHTML=bl,mt=a(),ie=r("p"),ie.innerHTML=wl,ut=a(),c(ne.$$.fragment),ht=a(),oe=r("p"),oe.innerHTML=jl,ft=a(),c(re.$$.fragment),ct=a(),k=r("div"),k.innerHTML=Jl,Mt=a(),c(pe.$$.fragment),yt=a(),de=r("p"),de.innerHTML=Ul,gt=a(),c(X.$$.fragment),bt=a(),me=r("p"),me.textContent=Tl,wt=a(),c(ue.$$.fragment),jt=a(),he=r("p"),he.innerHTML=$l,Jt=a(),c(fe.$$.fragment),Ut=a(),A=r("div"),A.innerHTML=Zl,Tt=a(),ce=r("p"),ce.innerHTML=Gl,$t=a(),Me=r("ul"),Me.innerHTML=Wl,Zt=a(),ye=r("p"),ye.innerHTML=Il,Gt=a(),ge=r("p"),ge.innerHTML=_l,Wt=a(),c(be.$$.fragment),It=a(),H=r("div"),H.innerHTML=Bl,_t=a(),we=r("p"),we.innerHTML=vl,Bt=a(),je=r("p"),je.innerHTML=Cl,vt=a(),c(Je.$$.fragment),Ct=a(),c(Ue.$$.fragment),Lt=a(),Te=r("p"),Te.innerHTML=Ll,xt=a(),$e=r("p"),$e.innerHTML=xl,Rt=a(),c(Ze.$$.fragment),kt=a(),Ge=r("p"),Ge.innerHTML=Rl,Xt=a(),c(V.$$.fragment),At=a(),c(We.$$.fragment),Ht=a(),Ie=r("p"),Ie.innerHTML=kl,Vt=a(),c(Q.$$.fragment),Qt=a(),c(_e.$$.fragment),Ft=a(),Be=r("p"),Be.innerHTML=Xl,qt=a(),ve=r("p"),ve.innerHTML=Al,St=a(),c(F.$$.fragment),Yt=a(),Ce=r("p"),Ce.textContent=Hl,Nt=a(),c(Le.$$.fragment),zt=a(),xe=r("p"),xe.innerHTML=Vl,Et=a(),c(Re.$$.fragment),Pt=a(),ke=r("p"),ke.textContent=Ql,Dt=a(),c(Xe.$$.fragment),Kt=a(),q=r("div"),q.innerHTML=Fl,Ot=a(),c(Ae.$$.fragment),el=a(),He=r("p"),He.innerHTML=ql,tl=a(),Ve=r("p"),Ve.innerHTML=Sl,ll=a(),c(Qe.$$.fragment),sl=a(),c(Fe.$$.fragment),al=a(),qe=r("p"),qe.innerHTML=Yl,il=a(),c(S.$$.fragment),nl=a(),c(Se.$$.fragment),ol=a(),Ye=r("p"),Ye.innerHTML=Nl,rl=a(),c(Ne.$$.fragment),pl=a(),c(ze.$$.fragment),dl=a(),Ke=r("p"),this.h()},l(e){const t=ns("svelte-u9bgzb",document.head);n=p(t,"META",{name:!0,content:!0}),t.forEach(l),j=i(e),o=p(e,"P",{}),es(o).forEach(l),h=i(e),M(f.$$.fragment,e),u=i(e),M(U.$$.fragment,e),I=i(e),Z=p(e,"P",{"data-svelte-h":!0}),m(Z)!=="svelte-ax3rwx"&&(Z.innerHTML=N),_=i(e),C=p(e,"P",{"data-svelte-h":!0}),m(C)!=="svelte-h4deay"&&(C.textContent=z),B=i(e),M(G.$$.fragment,e),W=i(e),M(v.$$.fragment,e),d=i(e),J=p(e,"P",{"data-svelte-h":!0}),m(J)!=="svelte-yncm6r"&&(J.innerHTML=De),Oe=i(e),E=p(e,"P",{"data-svelte-h":!0}),m(E)!=="svelte-1ngpipq"&&(E.innerHTML=ul),et=i(e),M(P.$$.fragment,e),tt=i(e),x=p(e,"DIV",{class:!0,"data-svelte-h":!0}),m(x)!=="svelte-1qqjocv"&&(x.innerHTML=hl),lt=i(e),M(D.$$.fragment,e),st=i(e),K=p(e,"P",{"data-svelte-h":!0}),m(K)!=="svelte-z0bjzf"&&(K.innerHTML=fl),at=i(e),O=p(e,"P",{"data-svelte-h":!0}),m(O)!=="svelte-1bhtcph"&&(O.textContent=cl),it=i(e),M(ee.$$.fragment,e),nt=i(e),te=p(e,"P",{"data-svelte-h":!0}),m(te)!=="svelte-1s1y71b"&&(te.innerHTML=Ml),ot=i(e),M(le.$$.fragment,e),rt=i(e),R=p(e,"DIV",{class:!0,"data-svelte-h":!0}),m(R)!=="svelte-vwb4li"&&(R.innerHTML=yl),pt=i(e),se=p(e,"P",{"data-svelte-h":!0}),m(se)!=="svelte-h6sd1m"&&(se.innerHTML=gl),dt=i(e),ae=p(e,"UL",{"data-svelte-h":!0}),m(ae)!=="svelte-1v8nqu6"&&(ae.innerHTML=bl),mt=i(e),ie=p(e,"P",{"data-svelte-h":!0}),m(ie)!=="svelte-1eujnzn"&&(ie.innerHTML=wl),ut=i(e),M(ne.$$.fragment,e),ht=i(e),oe=p(e,"P",{"data-svelte-h":!0}),m(oe)!=="svelte-5s5bn9"&&(oe.innerHTML=jl),ft=i(e),M(re.$$.fragment,e),ct=i(e),k=p(e,"DIV",{class:!0,"data-svelte-h":!0}),m(k)!=="svelte-j6euo"&&(k.innerHTML=Jl),Mt=i(e),M(pe.$$.fragment,e),yt=i(e),de=p(e,"P",{"data-svelte-h":!0}),m(de)!=="svelte-10sp1c2"&&(de.innerHTML=Ul),gt=i(e),M(X.$$.fragment,e),bt=i(e),me=p(e,"P",{"data-svelte-h":!0}),m(me)!=="svelte-l2hd9l"&&(me.textContent=Tl),wt=i(e),M(ue.$$.fragment,e),jt=i(e),he=p(e,"P",{"data-svelte-h":!0}),m(he)!=="svelte-1wqr7k9"&&(he.innerHTML=$l),Jt=i(e),M(fe.$$.fragment,e),Ut=i(e),A=p(e,"DIV",{class:!0,"data-svelte-h":!0}),m(A)!=="svelte-848z5s"&&(A.innerHTML=Zl),Tt=i(e),ce=p(e,"P",{"data-svelte-h":!0}),m(ce)!=="svelte-1chgy74"&&(ce.innerHTML=Gl),$t=i(e),Me=p(e,"UL",{"data-svelte-h":!0}),m(Me)!=="svelte-ddcy8o"&&(Me.innerHTML=Wl),Zt=i(e),ye=p(e,"P",{"data-svelte-h":!0}),m(ye)!=="svelte-zk26jd"&&(ye.innerHTML=Il),Gt=i(e),ge=p(e,"P",{"data-svelte-h":!0}),m(ge)!=="svelte-1f523mj"&&(ge.innerHTML=_l),Wt=i(e),M(be.$$.fragment,e),It=i(e),H=p(e,"DIV",{class:!0,"data-svelte-h":!0}),m(H)!=="svelte-1etahws"&&(H.innerHTML=Bl),_t=i(e),we=p(e,"P",{"data-svelte-h":!0}),m(we)!=="svelte-hclwab"&&(we.innerHTML=vl),Bt=i(e),je=p(e,"P",{"data-svelte-h":!0}),m(je)!=="svelte-1iypcpp"&&(je.innerHTML=Cl),vt=i(e),M(Je.$$.fragment,e),Ct=i(e),M(Ue.$$.fragment,e),Lt=i(e),Te=p(e,"P",{"data-svelte-h":!0}),m(Te)!=="svelte-1mt3i4y"&&(Te.innerHTML=Ll),xt=i(e),$e=p(e,"P",{"data-svelte-h":!0}),m($e)!=="svelte-u1an6c"&&($e.innerHTML=xl),Rt=i(e),M(Ze.$$.fragment,e),kt=i(e),Ge=p(e,"P",{"data-svelte-h":!0}),m(Ge)!=="svelte-y7bfbz"&&(Ge.innerHTML=Rl),Xt=i(e),M(V.$$.fragment,e),At=i(e),M(We.$$.fragment,e),Ht=i(e),Ie=p(e,"P",{"data-svelte-h":!0}),m(Ie)!=="svelte-6zj1or"&&(Ie.innerHTML=kl),Vt=i(e),M(Q.$$.fragment,e),Qt=i(e),M(_e.$$.fragment,e),Ft=i(e),Be=p(e,"P",{"data-svelte-h":!0}),m(Be)!=="svelte-1pu4ft1"&&(Be.innerHTML=Xl),qt=i(e),ve=p(e,"P",{"data-svelte-h":!0}),m(ve)!=="svelte-18j3qom"&&(ve.innerHTML=Al),St=i(e),M(F.$$.fragment,e),Yt=i(e),Ce=p(e,"P",{"data-svelte-h":!0}),m(Ce)!=="svelte-w9hhyu"&&(Ce.textContent=Hl),Nt=i(e),M(Le.$$.fragment,e),zt=i(e),xe=p(e,"P",{"data-svelte-h":!0}),m(xe)!=="svelte-lmam2w"&&(xe.innerHTML=Vl),Et=i(e),M(Re.$$.fragment,e),Pt=i(e),ke=p(e,"P",{"data-svelte-h":!0}),m(ke)!=="svelte-7abk5j"&&(ke.textContent=Ql),Dt=i(e),M(Xe.$$.fragment,e),Kt=i(e),q=p(e,"DIV",{class:!0,"data-svelte-h":!0}),m(q)!=="svelte-1vum0wo"&&(q.innerHTML=Fl),Ot=i(e),M(Ae.$$.fragment,e),el=i(e),He=p(e,"P",{"data-svelte-h":!0}),m(He)!=="svelte-85ru9q"&&(He.innerHTML=ql),tl=i(e),Ve=p(e,"P",{"data-svelte-h":!0}),m(Ve)!=="svelte-zfljo5"&&(Ve.innerHTML=Sl),ll=i(e),M(Qe.$$.fragment,e),sl=i(e),M(Fe.$$.fragment,e),al=i(e),qe=p(e,"P",{"data-svelte-h":!0}),m(qe)!=="svelte-1ah3evs"&&(qe.innerHTML=Yl),il=i(e),M(S.$$.fragment,e),nl=i(e),M(Se.$$.fragment,e),ol=i(e),Ye=p(e,"P",{"data-svelte-h":!0}),m(Ye)!=="svelte-3ktslb"&&(Ye.innerHTML=Nl),rl=i(e),M(Ne.$$.fragment,e),pl=i(e),M(ze.$$.fragment,e),dl=i(e),Ke=p(e,"P",{}),es(Ke).forEach(l),this.h()},h(){Y(n,"name","hf:doc:metadata"),Y(n,"content",Us),Y(x,"class","flex justify-center"),Y(R,"class","flex justify-center"),Y(k,"class","flex justify-center"),Y(A,"class","flex justify-center"),Y(H,"class","flex justify-center"),Y(q,"class","flex justify-center")},m(e,t){os(document.head,n),s(e,j,t),s(e,o,t),s(e,h,t),y(f,e,t),s(e,u,t),y(U,e,t),s(e,I,t),s(e,Z,t),s(e,_,t),s(e,C,t),s(e,B,t),y(G,e,t),s(e,W,t),y(v,e,t),s(e,d,t),s(e,J,t),s(e,Oe,t),s(e,E,t),s(e,et,t),y(P,e,t),s(e,tt,t),s(e,x,t),s(e,lt,t),y(D,e,t),s(e,st,t),s(e,K,t),s(e,at,t),s(e,O,t),s(e,it,t),y(ee,e,t),s(e,nt,t),s(e,te,t),s(e,ot,t),y(le,e,t),s(e,rt,t),s(e,R,t),s(e,pt,t),s(e,se,t),s(e,dt,t),s(e,ae,t),s(e,mt,t),s(e,ie,t),s(e,ut,t),y(ne,e,t),s(e,ht,t),s(e,oe,t),s(e,ft,t),y(re,e,t),s(e,ct,t),s(e,k,t),s(e,Mt,t),y(pe,e,t),s(e,yt,t),s(e,de,t),s(e,gt,t),y(X,e,t),s(e,bt,t),s(e,me,t),s(e,wt,t),y(ue,e,t),s(e,jt,t),s(e,he,t),s(e,Jt,t),y(fe,e,t),s(e,Ut,t),s(e,A,t),s(e,Tt,t),s(e,ce,t),s(e,$t,t),s(e,Me,t),s(e,Zt,t),s(e,ye,t),s(e,Gt,t),s(e,ge,t),s(e,Wt,t),y(be,e,t),s(e,It,t),s(e,H,t),s(e,_t,t),s(e,we,t),s(e,Bt,t),s(e,je,t),s(e,vt,t),y(Je,e,t),s(e,Ct,t),y(Ue,e,t),s(e,Lt,t),s(e,Te,t),s(e,xt,t),s(e,$e,t),s(e,Rt,t),y(Ze,e,t),s(e,kt,t),s(e,Ge,t),s(e,Xt,t),y(V,e,t),s(e,At,t),y(We,e,t),s(e,Ht,t),s(e,Ie,t),s(e,Vt,t),y(Q,e,t),s(e,Qt,t),y(_e,e,t),s(e,Ft,t),s(e,Be,t),s(e,qt,t),s(e,ve,t),s(e,St,t),y(F,e,t),s(e,Yt,t),s(e,Ce,t),s(e,Nt,t),y(Le,e,t),s(e,zt,t),s(e,xe,t),s(e,Et,t),y(Re,e,t),s(e,Pt,t),s(e,ke,t),s(e,Dt,t),y(Xe,e,t),s(e,Kt,t),s(e,q,t),s(e,Ot,t),y(Ae,e,t),s(e,el,t),s(e,He,t),s(e,tl,t),s(e,Ve,t),s(e,ll,t),y(Qe,e,t),s(e,sl,t),y(Fe,e,t),s(e,al,t),s(e,qe,t),s(e,il,t),y(S,e,t),s(e,nl,t),y(Se,e,t),s(e,ol,t),s(e,Ye,t),s(e,rl,t),y(Ne,e,t),s(e,pl,t),y(ze,e,t),s(e,dl,t),s(e,Ke,t),ml=!0},p(e,[t]){const zl={};t&2&&(zl.$$scope={dirty:t,ctx:e}),G.$set(zl);const El={};t&2&&(El.$$scope={dirty:t,ctx:e}),X.$set(El);const Pl={};t&2&&(Pl.$$scope={dirty:t,ctx:e}),V.$set(Pl);const Dl={};t&2&&(Dl.$$scope={dirty:t,ctx:e}),Q.$set(Dl);const Kl={};t&2&&(Kl.$$scope={dirty:t,ctx:e}),F.$set(Kl);const Ol={};t&2&&(Ol.$$scope={dirty:t,ctx:e}),S.$set(Ol)},i(e){ml||(g(f.$$.fragment,e),g(U.$$.fragment,e),g(G.$$.fragment,e),g(v.$$.fragment,e),g(P.$$.fragment,e),g(D.$$.fragment,e),g(ee.$$.fragment,e),g(le.$$.fragment,e),g(ne.$$.fragment,e),g(re.$$.fragment,e),g(pe.$$.fragment,e),g(X.$$.fragment,e),g(ue.$$.fragment,e),g(fe.$$.fragment,e),g(be.$$.fragment,e),g(Je.$$.fragment,e),g(Ue.$$.fragment,e),g(Ze.$$.fragment,e),g(V.$$.fragment,e),g(We.$$.fragment,e),g(Q.$$.fragment,e),g(_e.$$.fragment,e),g(F.$$.fragment,e),g(Le.$$.fragment,e),g(Re.$$.fragment,e),g(Xe.$$.fragment,e),g(Ae.$$.fragment,e),g(Qe.$$.fragment,e),g(Fe.$$.fragment,e),g(S.$$.fragment,e),g(Se.$$.fragment,e),g(Ne.$$.fragment,e),g(ze.$$.fragment,e),ml=!0)},o(e){b(f.$$.fragment,e),b(U.$$.fragment,e),b(G.$$.fragment,e),b(v.$$.fragment,e),b(P.$$.fragment,e),b(D.$$.fragment,e),b(ee.$$.fragment,e),b(le.$$.fragment,e),b(ne.$$.fragment,e),b(re.$$.fragment,e),b(pe.$$.fragment,e),b(X.$$.fragment,e),b(ue.$$.fragment,e),b(fe.$$.fragment,e),b(be.$$.fragment,e),b(Je.$$.fragment,e),b(Ue.$$.fragment,e),b(Ze.$$.fragment,e),b(V.$$.fragment,e),b(We.$$.fragment,e),b(Q.$$.fragment,e),b(_e.$$.fragment,e),b(F.$$.fragment,e),b(Le.$$.fragment,e),b(Re.$$.fragment,e),b(Xe.$$.fragment,e),b(Ae.$$.fragment,e),b(Qe.$$.fragment,e),b(Fe.$$.fragment,e),b(S.$$.fragment,e),b(Se.$$.fragment,e),b(Ne.$$.fragment,e),b(ze.$$.fragment,e),ml=!1},d(e){e&&(l(j),l(o),l(h),l(u),l(I),l(Z),l(_),l(C),l(B),l(W),l(d),l(J),l(Oe),l(E),l(et),l(tt),l(x),l(lt),l(st),l(K),l(at),l(O),l(it),l(nt),l(te),l(ot),l(rt),l(R),l(pt),l(se),l(dt),l(ae),l(mt),l(ie),l(ut),l(ht),l(oe),l(ft),l(ct),l(k),l(Mt),l(yt),l(de),l(gt),l(bt),l(me),l(wt),l(jt),l(he),l(Jt),l(Ut),l(A),l(Tt),l(ce),l($t),l(Me),l(Zt),l(ye),l(Gt),l(ge),l(Wt),l(It),l(H),l(_t),l(we),l(Bt),l(je),l(vt),l(Ct),l(Lt),l(Te),l(xt),l($e),l(Rt),l(kt),l(Ge),l(Xt),l(At),l(Ht),l(Ie),l(Vt),l(Qt),l(Ft),l(Be),l(qt),l(ve),l(St),l(Yt),l(Ce),l(Nt),l(zt),l(xe),l(Et),l(Pt),l(ke),l(Dt),l(Kt),l(q),l(Ot),l(el),l(He),l(tl),l(Ve),l(ll),l(sl),l(al),l(qe),l(il),l(nl),l(ol),l(Ye),l(rl),l(pl),l(dl),l(Ke)),l(n),w(f,e),w(U,e),w(G,e),w(v,e),w(P,e),w(D,e),w(ee,e),w(le,e),w(ne,e),w(re,e),w(pe,e),w(X,e),w(ue,e),w(fe,e),w(be,e),w(Je,e),w(Ue,e),w(Ze,e),w(V,e),w(We,e),w(Q,e),w(_e,e),w(F,e),w(Le,e),w(Re,e),w(Xe,e),w(Ae,e),w(Qe,e),w(Fe,e),w(S,e),w(Se,e),w(Ne,e),w(ze,e)}}}const Us='{"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 Ts(T){return ss(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class vs extends as{constructor(n){super(),is(this,n,Ts,Js,ls,{})}}export{vs as component};
