import{s as Pl,o as Dl,n as ze}from"../chunks/scheduler.8c3d61f6.js";import{S as Kl,i as Ol,g as p,s as a,r as c,A as es,h as d,f as l,c as i,j as zl,u as M,x as m,k as S,y as ts,a as s,v as y,d as g,t as b,w,m as ls,n as ss}from"../chunks/index.da70eac4.js";import{T as Ne}from"../chunks/Tip.1d9b8c37.js";import{C as $}from"../chunks/CodeBlock.00a903b3.js";import{D as as}from"../chunks/DocNotebookDropdown.02900f6b.js";import{H as L,E as is}from"../chunks/EditOnGithub.1e64e623.js";import{H as ns,a as El}from"../chunks/HfOption.c1483eb1.js";function os(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=p("p"),n.innerHTML=j},l(o){n=d(o,"P",{"data-svelte-h":!0}),m(n)!=="svelte-unc393"&&(n.innerHTML=j)},m(o,h){s(o,n,h)},p:ze,d(o){o&&l(n)}}}function rs(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=p("p"),n.innerHTML=j},l(o){n=d(o,"P",{"data-svelte-h":!0}),m(n)!=="svelte-bp0omm"&&(n.innerHTML=j)},m(o,h){s(o,n,h)},p:ze,d(o){o&&l(n)}}}function ps(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=p("p"),n.innerHTML=j},l(o){n=d(o,"P",{"data-svelte-h":!0}),m(n)!=="svelte-1aq2a67"&&(n.innerHTML=j)},m(o,h){s(o,n,h)},p:ze,d(o){o&&l(n)}}}function ds(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/pr_10095/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=p("p"),n.textContent=j,o=a(),h=p("ul"),h.innerHTML=f},l(u){n=d(u,"P",{"data-svelte-h":!0}),m(n)!=="svelte-1aa8at7"&&(n.textContent=j),o=i(u),h=d(u,"UL",{"data-svelte-h":!0}),m(h)!=="svelte-q0cxst"&&(h.innerHTML=f)},m(u,U){s(u,n,U),s(u,o,U),s(u,h,U)},p:ze,d(u){u&&(l(n),l(o),l(h))}}}function ms(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/pr_10095/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,W,G,v;return h=new $({props:{code:"IXdnZXQlMjBodHRwcyUzQSUyRiUyRmNpdml0YWkuY29tJTJGYXBpJTJGZG93bmxvYWQlMkZtb2RlbHMlMkYxNjg3NzYlMjAtTyUyMGJsdWVwcmludGlmeS1zZC14bC0xMC5zYWZldGVuc29ycw==",highlighted:"!wget https://civitai.com/api/download/models/168776 -O blueprintify-sd-xl-10.safetensors",wrap:!1}}),Z=new $({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUyMnBhdGglMkZ0byUyRndlaWdodHMlMjIlMkMlMjB3ZWlnaHRfbmFtZSUzRCUyMmJsdWVwcmludGlmeS1zZC14bC0xMC5zYWZldGVuc29ycyUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch

pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline.load_lora_weights(<span class="hljs-string">&quot;path/to/weights&quot;</span>, weight_name=<span class="hljs-string">&quot;blueprintify-sd-xl-10.safetensors&quot;</span>)`,wrap:!1}}),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}}),G=new Ne({props:{warning:!0,$$slots:{default:[ds]},$$scope:{ctx:T}}}),{c(){n=p("p"),n.innerHTML=j,o=a(),c(h.$$.fragment),f=a(),u=p("p"),u.innerHTML=U,I=a(),c(Z.$$.fragment),N=a(),_=p("p"),_.textContent=C,z=a(),c(B.$$.fragment),W=a(),c(G.$$.fragment)},l(r){n=d(r,"P",{"data-svelte-h":!0}),m(n)!=="svelte-1xg7vsu"&&(n.innerHTML=j),o=i(r),M(h.$$.fragment,r),f=i(r),u=d(r,"P",{"data-svelte-h":!0}),m(u)!=="svelte-h5mj9v"&&(u.innerHTML=U),I=i(r),M(Z.$$.fragment,r),N=i(r),_=d(r,"P",{"data-svelte-h":!0}),m(_)!=="svelte-1un5bjt"&&(_.textContent=C),z=i(r),M(B.$$.fragment,r),W=i(r),M(G.$$.fragment,r)},m(r,J){s(r,n,J),s(r,o,J),y(h,r,J),s(r,f,J),s(r,u,J),s(r,I,J),y(Z,r,J),s(r,N,J),s(r,_,J),s(r,z,J),y(B,r,J),s(r,W,J),y(G,r,J),v=!0},p(r,J){const Ee={};J&2&&(Ee.$$scope={dirty:J,ctx:r}),G.$set(Ee)},i(r){v||(g(h.$$.fragment,r),g(Z.$$.fragment,r),g(B.$$.fragment,r),g(G.$$.fragment,r),v=!0)},o(r){b(h.$$.fragment,r),b(Z.$$.fragment,r),b(B.$$.fragment,r),b(G.$$.fragment,r),v=!1},d(r){r&&(l(n),l(o),l(f),l(u),l(I),l(N),l(_),l(z),l(W)),w(h,r),w(Z,r),w(B,r),w(G,r)}}}function us(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=p("p"),n.innerHTML=j,o=a(),c(h.$$.fragment)},l(u){n=d(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:ze,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 hs(T){let n,j,o,h;return n=new El({props:{id:"other-trainers",option:"Kohya",$$slots:{default:[ms]},$$scope:{ctx:T}}}),o=new El({props:{id:"other-trainers",option:"TheLastBen",$$slots:{default:[us]},$$scope:{ctx:T}}}),{c(){c(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 fs(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=p("p"),n.innerHTML=j},l(o){n=d(o,"P",{"data-svelte-h":!0}),m(n)!=="svelte-13d91fo"&&(n.innerHTML=j)},m(o,h){s(o,n,h)},p:ze,d(o){o&&l(n)}}}function cs(T){let n;return{c(){n=ls("As InsightFace pretrained models are available for non-commercial research purposes, IP-Adapter-FaceID models are released exclusively for research purposes and are not intended for commercial use.")},l(j){n=ss(j,"As InsightFace pretrained models are available for non-commercial research purposes, IP-Adapter-FaceID models are released exclusively for research purposes and are not intended for commercial use.")},m(j,o){s(j,n,o)},d(j){j&&l(n)}}}function Ms(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,W,G,v,r,J,Ee='<a href="https://dreambooth.github.io/" rel="nofollow">DreamBooth</a> finetunes an <em>entire diffusion model</em> on just several images of a subject to generate images of that subject in new styles and settings. This method works by using a special word in the prompt that the model learns to associate with the subject image. Of all the training methods, DreamBooth produces the largest file size (usually a few GBs) because it is a full checkpoint model.',De,E,rl='Let’s load the <a href="https://huggingface.co/sd-dreambooth-library/herge-style" rel="nofollow">herge_style</a> checkpoint, which is trained on just 10 images drawn by Hergé, to generate images in that style. For it to work, you need to include the special word <code>herge_style</code> in your prompt to trigger the checkpoint:',Ke,P,Oe,x,pl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_dreambooth.png"/>',et,D,tt,K,dl='<a href="https://textual-inversion.github.io/" rel="nofollow">Textual inversion</a> is very similar to DreamBooth and it can also personalize a diffusion model to generate certain concepts (styles, objects) from just a few images. This method works by training and finding new embeddings that represent the images you provide with a special word in the prompt. As a result, the diffusion model weights stay the same and the training process produces a relatively tiny (a few KBs) file.',lt,O,ml="Because textual inversion creates embeddings, it cannot be used on its own like DreamBooth and requires another model.",st,ee,at,te,ul='Now you can load the textual inversion embeddings with the <a href="/docs/diffusers/pr_10095/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:',it,le,nt,R,hl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_txt_embed.png"/>',ot,se,fl='Textual inversion can also be trained on undesirable things to create <em>negative embeddings</em> to discourage a model from generating images with those undesirable things like blurry images or extra fingers on a hand. This can be an easy way to quickly improve your prompt. You’ll also load the embeddings with <a href="/docs/diffusers/pr_10095/en/api/loaders/textual_inversion#diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion">load_textual_inversion()</a>, but this time, you’ll need two more parameters:',rt,ae,cl="<li><code>weight_name</code>: specifies the weight file to load if the file was saved in the 🤗 Diffusers format with a specific name or if the file is stored in the A1111 format</li> <li><code>token</code>: specifies the special word to use in the prompt to trigger the embeddings</li>",pt,ie,Ml='Let’s load the <a href="https://huggingface.co/sayakpaul/EasyNegative-test" rel="nofollow">sayakpaul/EasyNegative-test</a> embeddings:',dt,ne,mt,oe,yl="Now you can use the <code>token</code> to generate an image with the negative embeddings:",ut,re,ht,k,gl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_neg_embed.png"/>',ft,pe,ct,de,bl='<a href="https://huggingface.co/papers/2106.09685" rel="nofollow">Low-Rank Adaptation (LoRA)</a> is a popular training technique because it is fast and generates smaller file sizes (a couple hundred MBs). Like the other methods in this guide, LoRA can train a model to learn new styles from just a few images. It works by inserting new weights into the diffusion model and then only the new weights are trained instead of the entire model. This makes LoRAs faster to train and easier to store.',Mt,X,yt,me,wl="LoRAs also need to be used with another model:",gt,ue,bt,he,jl='Then use the <a href="/docs/diffusers/pr_10095/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:',wt,fe,jt,A,Jl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_lora.png"/>',Jt,ce,Ul='The <a href="/docs/diffusers/pr_10095/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:',Ut,Me,Tl="<li>the LoRA weights don’t have separate identifiers for the UNet and text encoder</li> <li>the LoRA weights have separate identifiers for the UNet and text encoder</li>",Tt,ye,$l='But if you only need to load LoRA weights into the UNet, then you can use the <a href="/docs/diffusers/pr_10095/en/api/loaders/unet#diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs">load_attn_procs()</a> method. Let’s load the <a href="https://huggingface.co/jbilcke-hf/sdxl-cinematic-1" rel="nofollow">jbilcke-hf/sdxl-cinematic-1</a> LoRA:',$t,ge,Zt,H,Zl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_attn_proc.png"/>',Wt,be,Wl='To unload the LoRA weights, use the <a href="/docs/diffusers/pr_10095/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:',Gt,we,It,je,_t,Je,Gl='For both <a href="/docs/diffusers/pr_10095/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> and <a href="/docs/diffusers/pr_10095/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,Ue,Il="For more granular control on the amount of LoRA weights used per layer, you can use <code>set_adapters()</code> and pass a dictionary specifying by how much to scale the weights in each layer by.",vt,Te,Ct,$e,_l='This also works with multiple adapters - see <a href="https://huggingface.co/docs/diffusers/tutorials/using_peft_for_inference#customize-adapters-strength" rel="nofollow">this guide</a> for how to do it.',Lt,V,xt,Ze,Rt,We,Bl='Other popular LoRA trainers from the community include those by <a href="https://github.com/kohya-ss/sd-scripts/" rel="nofollow">Kohya</a> and <a href="https://github.com/TheLastBen/fast-stable-diffusion" rel="nofollow">TheLastBen</a>. These trainers create different LoRA checkpoints than those trained by 🤗 Diffusers, but they can still be loaded in the same way.',kt,Q,Xt,Ge,At,Ie,vl='<a href="https://ip-adapter.github.io/" rel="nofollow">IP-Adapter</a> is a lightweight adapter that enables image prompting for any diffusion model. This adapter works by decoupling the cross-attention layers of the image and text features. All the other model components are frozen and only the embedded image features in the UNet are trained. As a result, IP-Adapter files are typically only ~100MBs.',Ht,_e,Cl='You can learn more about how to use IP-Adapter for different tasks and specific use cases in the <a href="../using-diffusers/ip_adapter">IP-Adapter</a> guide.',Vt,F,Qt,Be,Ll="To start, load a Stable Diffusion checkpoint.",Ft,ve,qt,Ce,xl='Then load the IP-Adapter weights and add it to the pipeline with the <a href="/docs/diffusers/pr_10095/en/api/loaders/ip_adapter#diffusers.loaders.IPAdapterMixin.load_ip_adapter">load_ip_adapter()</a> method.',Yt,Le,St,xe,Rl="Once loaded, you can use the pipeline with an image and text prompt to guide the image generation process.",Nt,Re,zt,q,kl='    <img src="https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/ip-bear.png"/>',Et,ke,Pt,Xe,Xl='IP-Adapter relies on an image encoder to generate image features. If the IP-Adapter repository contains an <code>image_encoder</code> subfolder, the image encoder is automatically loaded and registered to the pipeline. Otherwise, you’ll need to explicitly load the image encoder with a <a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPVisionModelWithProjection" rel="nofollow">CLIPVisionModelWithProjection</a> model and pass it to the pipeline.',Dt,Ae,Al="This is the case for <em>IP-Adapter Plus</em> checkpoints which use the ViT-H image encoder.",Kt,He,Ot,Ve,el,Qe,Hl=`The IP-Adapter FaceID models are experimental IP Adapters that use image embeddings generated by <code>insightface</code> instead of CLIP image embeddings. Some of these models also use LoRA to improve ID consistency.
You need to install <code>insightface</code> and all its requirements to use these models.`,tl,Y,ll,Fe,sl,qe,Vl="If you want to use one of the two IP-Adapter FaceID Plus models, you must also load the CLIP image encoder, as this models use both <code>insightface</code> and CLIP image embeddings to achieve better photorealism.",al,Ye,il,Se,nl,Pe,ol;return f=new L({props:{title:"Load adapters",local:"load-adapters",headingTag:"h1"}}),U=new as({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/loading_adapters.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/pytorch/loading_adapters.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/tensorflow/loading_adapters.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/loading_adapters.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/pytorch/loading_adapters.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/tensorflow/loading_adapters.ipynb"}]}}),W=new Ne({props:{$$slots:{default:[os]},$$scope:{ctx:T}}}),v=new L({props:{title:"DreamBooth",local:"dreambooth",headingTag:"h2"}}),P=new $({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIyc2QtZHJlYW1ib290aC1saWJyYXJ5JTJGaGVyZ2Utc3R5bGUlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIpJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMGN1dGUlMjBoZXJnZV9zdHlsZSUyMGJyb3duJTIwYmVhciUyMGVhdGluZyUyMGElMjBzbGljZSUyMG9mJTIwcGl6emElMkMlMjBzdHVubmluZyUyMGNvbG9yJTIwc2NoZW1lJTJDJTIwbWFzdGVycGllY2UlMkMlMjBpbGx1c3RyYXRpb24lMjIlMEFpbWFnZSUyMCUzRCUyMHBpcGVsaW5lKHByb21wdCkuaW1hZ2VzJTVCMCU1RCUwQWltYWdl",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch

pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;sd-dreambooth-library/herge-style&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
prompt = <span class="hljs-string">&quot;A cute herge_style brown bear eating a slice of pizza, stunning color scheme, masterpiece, illustration&quot;</span>
image = pipeline(prompt).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),D=new L({props:{title:"Textual inversion",local:"textual-inversion",headingTag:"h2"}}),ee=new $({props:{code:"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 Ne({props:{$$slots:{default:[rs]},$$scope:{ctx:T}}}),ue=new $({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch

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

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

<span class="hljs-comment"># use cnmt in the prompt to trigger the LoRA</span>
prompt = <span class="hljs-string">&quot;A cute cnmt eating a slice of pizza, stunning color scheme, masterpiece, illustration&quot;</span>
image = pipeline(prompt).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),we=new $({props:{code:"cGlwZWxpbmUudW5sb2FkX2xvcmFfd2VpZ2h0cygp",highlighted:"pipeline.unload_lora_weights()",wrap:!1}}),je=new L({props:{title:"Adjust LoRA weight scale",local:"adjust-lora-weight-scale",headingTag:"h3"}}),Te=new $({props:{code:"cGlwZSUyMCUzRCUyMC4uLiUyMCUyMyUyMGNyZWF0ZSUyMHBpcGVsaW5lJTBBcGlwZS5sb2FkX2xvcmFfd2VpZ2h0cyguLi4lMkMlMjBhZGFwdGVyX25hbWUlM0QlMjJteV9hZGFwdGVyJTIyKSUwQXNjYWxlcyUyMCUzRCUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMnRleHRfZW5jb2RlciUyMiUzQSUyMDAuNSUyQyUwQSUyMCUyMCUyMCUyMCUyMnRleHRfZW5jb2Rlcl8yJTIyJTNBJTIwMC41JTJDJTIwJTIwJTIzJTIwb25seSUyMHVzYWJsZSUyMGlmJTIwcGlwZSUyMGhhcyUyMGElMjAybmQlMjB0ZXh0JTIwZW5jb2RlciUwQSUyMCUyMCUyMCUyMCUyMnVuZXQlMjIlM0ElMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJkb3duJTIyJTNBJTIwMC45JTJDJTIwJTIwJTIzJTIwYWxsJTIwdHJhbnNmb3JtZXJzJTIwaW4lMjB0aGUlMjBkb3duLXBhcnQlMjB3aWxsJTIwdXNlJTIwc2NhbGUlMjAwLjklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjAlMjJtaWQlMjIlMjAlMjAlMjMlMjBpbiUyMHRoaXMlMjBleGFtcGxlJTIwJTIybWlkJTIyJTIwaXMlMjBub3QlMjBnaXZlbiUyQyUyMHRoZXJlZm9yZSUyMGFsbCUyMHRyYW5zZm9ybWVycyUyMGluJTIwdGhlJTIwbWlkJTIwcGFydCUyMHdpbGwlMjB1c2UlMjB0aGUlMjBkZWZhdWx0JTIwc2NhbGUlMjAxLjAlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJ1cCUyMiUzQSUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmJsb2NrXzAlMjIlM0ElMjAwLjYlMkMlMjAlMjAlMjMlMjBhbGwlMjAzJTIwdHJhbnNmb3JtZXJzJTIwaW4lMjB0aGUlMjAwdGglMjBibG9jayUyMGluJTIwdGhlJTIwdXAtcGFydCUyMHdpbGwlMjB1c2UlMjBzY2FsZSUyMDAuNiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmJsb2NrXzElMjIlM0ElMjAlNUIwLjQlMkMlMjAwLjglMkMlMjAxLjAlNUQlMkMlMjAlMjAlMjMlMjB0aGUlMjAzJTIwdHJhbnNmb3JtZXJzJTIwaW4lMjB0aGUlMjAxc3QlMjBibG9jayUyMGluJTIwdGhlJTIwdXAtcGFydCUyMHdpbGwlMjB1c2UlMjBzY2FsZXMlMjAwLjQlMkMlMjAwLjglMjBhbmQlMjAxLjAlMjByZXNwZWN0aXZlbHklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0QlMEElMjAlMjAlMjAlMjAlN0QlMEElN0QlMEFwaXBlLnNldF9hZGFwdGVycyglMjJteV9hZGFwdGVyJTIyJTJDJTIwc2NhbGVzKQ==",highlighted:`pipe = ... <span class="hljs-comment"># create pipeline</span>
pipe.load_lora_weights(..., adapter_name=<span class="hljs-string">&quot;my_adapter&quot;</span>)
scales = {
    <span class="hljs-string">&quot;text_encoder&quot;</span>: <span class="hljs-number">0.5</span>,
    <span class="hljs-string">&quot;text_encoder_2&quot;</span>: <span class="hljs-number">0.5</span>,  <span class="hljs-comment"># only usable if pipe has a 2nd text encoder</span>
    <span class="hljs-string">&quot;unet&quot;</span>: {
        <span class="hljs-string">&quot;down&quot;</span>: <span class="hljs-number">0.9</span>,  <span class="hljs-comment"># all transformers in the down-part will use scale 0.9</span>
        <span class="hljs-comment"># &quot;mid&quot;  # in this example &quot;mid&quot; is not given, therefore all transformers in the mid part will use the default scale 1.0</span>
        <span class="hljs-string">&quot;up&quot;</span>: {
            <span class="hljs-string">&quot;block_0&quot;</span>: <span class="hljs-number">0.6</span>,  <span class="hljs-comment"># all 3 transformers in the 0th block in the up-part will use scale 0.6</span>
            <span class="hljs-string">&quot;block_1&quot;</span>: [<span class="hljs-number">0.4</span>, <span class="hljs-number">0.8</span>, <span class="hljs-number">1.0</span>],  <span class="hljs-comment"># the 3 transformers in the 1st block in the up-part will use scales 0.4, 0.8 and 1.0 respectively</span>
        }
    }
}
pipe.set_adapters(<span class="hljs-string">&quot;my_adapter&quot;</span>, scales)`,wrap:!1}}),V=new Ne({props:{warning:!0,$$slots:{default:[ps]},$$scope:{ctx:T}}}),Ze=new L({props:{title:"Kohya and TheLastBen",local:"kohya-and-thelastben",headingTag:"h3"}}),Q=new ns({props:{id:"other-trainers",options:["Kohya","TheLastBen"],$$slots:{default:[hs]},$$scope:{ctx:T}}}),Ge=new L({props:{title:"IP-Adapter",local:"ip-adapter",headingTag:"h2"}}),F=new Ne({props:{warning:!1,$$slots:{default:[fs]},$$scope:{ctx:T}}}),ve=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}}),Le=new $({props:{code:"cGlwZWxpbmUubG9hZF9pcF9hZGFwdGVyKCUyMmg5NCUyRklQLUFkYXB0ZXIlMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJtb2RlbHMlMjIlMkMlMjB3ZWlnaHRfbmFtZSUzRCUyMmlwLWFkYXB0ZXJfc2QxNS5iaW4lMjIp",highlighted:'pipeline.load_ip_adapter(<span class="hljs-string">&quot;h94/IP-Adapter&quot;</span>, subfolder=<span class="hljs-string">&quot;models&quot;</span>, weight_name=<span class="hljs-string">&quot;ip-adapter_sd15.bin&quot;</span>)',wrap:!1}}),Re=new $({props:{code:"aW1hZ2UlMjAlM0QlMjBsb2FkX2ltYWdlKCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRmh1Z2dpbmdmYWNlJTJGZG9jdW1lbnRhdGlvbi1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRmRpZmZ1c2VycyUyRmxvYWRfbmVnX2VtYmVkLnBuZyUyMiklMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5HZW5lcmF0b3IoZGV2aWNlJTNEJTIyY3B1JTIyKS5tYW51YWxfc2VlZCgzMyklMEFpbWFnZXMlMjAlM0QlMjBwaXBlbGluZSglMEElQzIlQTAlMjAlQzIlQTAlMjBwcm9tcHQlM0QnYmVzdCUyMHF1YWxpdHklMkMlMjBoaWdoJTIwcXVhbGl0eSUyQyUyMHdlYXJpbmclMjBzdW5nbGFzc2VzJyUyQyUwQSVDMiVBMCUyMCVDMiVBMCUyMGlwX2FkYXB0ZXJfaW1hZ2UlM0RpbWFnZSUyQyUwQSVDMiVBMCUyMCVDMiVBMCUyMG5lZ2F0aXZlX3Byb21wdCUzRCUyMm1vbm9jaHJvbWUlMkMlMjBsb3dyZXMlMkMlMjBiYWQlMjBhbmF0b215JTJDJTIwd29yc3QlMjBxdWFsaXR5JTJDJTIwbG93JTIwcXVhbGl0eSUyMiUyQyUwQSVDMiVBMCUyMCVDMiVBMCUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q1MCUyQyUwQSVDMiVBMCUyMCVDMiVBMCUyMGdlbmVyYXRvciUzRGdlbmVyYXRvciUyQyUwQSkuaW1hZ2VzJTVCMCU1RCUwQWltYWdlcw==",highlighted:`image = load_image(<span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_neg_embed.png&quot;</span>)
generator = torch.Generator(device=<span class="hljs-string">&quot;cpu&quot;</span>).manual_seed(<span class="hljs-number">33</span>)
images = pipeline(
    prompt=<span class="hljs-string">&#x27;best quality, high quality, wearing sunglasses&#x27;</span>,
    ip_adapter_image=image,
    negative_prompt=<span class="hljs-string">&quot;monochrome, lowres, bad anatomy, worst quality, low quality&quot;</span>,
    num_inference_steps=<span class="hljs-number">50</span>,
    generator=generator,
).images[<span class="hljs-number">0</span>]
images`,wrap:!1}}),ke=new L({props:{title:"IP-Adapter Plus",local:"ip-adapter-plus",headingTag:"h3"}}),He=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"}}),Y=new Ne({props:{warning:!0,$$slots:{default:[cs]},$$scope:{ctx:T}}}),Fe=new $({props:{code:"cGlwZWxpbmUlMjAlM0QlMjBBdXRvUGlwZWxpbmVGb3JUZXh0MkltYWdlLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBJTBBcGlwZWxpbmUubG9hZF9pcF9hZGFwdGVyKCUyMmg5NCUyRklQLUFkYXB0ZXItRmFjZUlEJTIyJTJDJTIwc3ViZm9sZGVyJTNETm9uZSUyQyUyMHdlaWdodF9uYW1lJTNEJTIyaXAtYWRhcHRlci1mYWNlaWRfc2R4bC5iaW4lMjIlMkMlMjBpbWFnZV9lbmNvZGVyX2ZvbGRlciUzRE5vbmUp",highlighted:`pipeline = AutoPipelineForText2Image.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>,
    torch_dtype=torch.float16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)

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