import{S as hi,i as ui,s as gi,e as n,k as c,w as b,t as i,M as _i,c as a,d as t,m as f,a as s,x,h as l,b as p,G as e,g as v,y,q as w,o as M,B as $,v as vi,L as Ho}from"../../chunks/vendor-hf-doc-builder.js";import{T as ls}from"../../chunks/Tip-hf-doc-builder.js";import{D as U}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Xo}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ko}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as zo}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function bi(E){let d,L,u,m,_,r,h,F,A,G,C;return{c(){d=n("p"),L=i("\u{1F9EA} The "),u=n("code"),m=i("LoaderMixins"),_=i(" are highly experimental and prone to future changes. To use private or "),r=n("a"),h=i("gated"),F=i(" models, log-in with "),A=n("code"),G=i("huggingface-cli login"),C=i("."),this.h()},l(Z){d=a(Z,"P",{});var T=s(d);L=l(T,"\u{1F9EA} The "),u=a(T,"CODE",{});var re=s(u);m=l(re,"LoaderMixins"),re.forEach(t),_=l(T," are highly experimental and prone to future changes. To use private or "),r=a(T,"A",{href:!0,rel:!0});var ne=s(r);h=l(ne,"gated"),ne.forEach(t),F=l(T," models, log-in with "),A=a(T,"CODE",{});var z=s(A);G=l(z,"huggingface-cli login"),z.forEach(t),C=l(T,"."),T.forEach(t),this.h()},h(){p(r,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),p(r,"rel","nofollow")},m(Z,T){v(Z,d,T),e(d,L),e(d,u),e(u,m),e(d,_),e(d,r),e(r,h),e(d,F),e(d,A),e(A,G),e(d,C)},d(Z){Z&&t(d)}}}function xi(E){let d,L,u,m,_;return m=new Xo({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNikudG8oJTIyY3VkYSUyMiklMEElMEFwaXBlLmxvYWRfdGV4dHVhbF9pbnZlcnNpb24oJTIyc2QtY29uY2VwdHMtbGlicmFyeSUyRmNhdC10b3klMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMCUzQ2NhdC10b3klM0UlMjBiYWNrcGFjayUyMiUwQSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENTApLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMmNhdC1iYWNrcGFjay5wbmclMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline
<span class="hljs-keyword">import</span> torch

model_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)

pipe.load_textual_inversion(<span class="hljs-string">&quot;sd-concepts-library/cat-toy&quot;</span>)

prompt = <span class="hljs-string">&quot;A &lt;cat-toy&gt; backpack&quot;</span>

image = pipe(prompt, num_inference_steps=<span class="hljs-number">50</span>).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;cat-backpack.png&quot;</span>)`}}),{c(){d=n("p"),L=i("To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),u=c(),b(m.$$.fragment)},l(r){d=a(r,"P",{});var h=s(d);L=l(h,"To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),h.forEach(t),u=f(r),x(m.$$.fragment,r)},m(r,h){v(r,d,h),e(d,L),v(r,u,h),y(m,r,h),_=!0},p:Ho,i(r){_||(w(m.$$.fragment,r),_=!0)},o(r){M(m.$$.fragment,r),_=!1},d(r){r&&t(d),r&&t(u),$(m,r)}}}function yi(E){let d,L,u,m,_;return m=new Xo({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNikudG8oJTIyY3VkYSUyMiklMEElMEFwaXBlLmxvYWRfdGV4dHVhbF9pbnZlcnNpb24oJTIyLiUyRmNoYXJ0dXJuZXJ2Mi5wdCUyMiUyQyUyMHRva2VuJTNEJTIyY2hhcnR1cm5lcnYyJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMmNoYXJ0dXJuZXJ2MiUyQyUyMG11bHRpcGxlJTIwdmlld3MlMjBvZiUyMHRoZSUyMHNhbWUlMjBjaGFyYWN0ZXIlMjBpbiUyMHRoZSUyMHNhbWUlMjBvdXRmaXQlMkMlMjBhJTIwY2hhcmFjdGVyJTIwdHVybmFyb3VuZCUyMG9mJTIwYSUyMHdvbWFuJTIwd2VhcmluZyUyMGElMjBibGFjayUyMGphY2tldCUyMGFuZCUyMHJlZCUyMHNoaXJ0JTJDJTIwYmVzdCUyMHF1YWxpdHklMkMlMjBpbnRyaWNhdGUlMjBkZXRhaWxzLiUyMiUwQSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENTApLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMmNoYXJhY3Rlci5wbmclMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline
<span class="hljs-keyword">import</span> torch

model_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)

pipe.load_textual_inversion(<span class="hljs-string">&quot;./charturnerv2.pt&quot;</span>, token=<span class="hljs-string">&quot;charturnerv2&quot;</span>)

prompt = <span class="hljs-string">&quot;charturnerv2, multiple views of the same character in the same outfit, a character turnaround of a woman wearing a black jacket and red shirt, best quality, intricate details.&quot;</span>

image = pipe(prompt, num_inference_steps=<span class="hljs-number">50</span>).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;character.png&quot;</span>)`}}),{c(){d=n("p"),L=i("locally:"),u=c(),b(m.$$.fragment)},l(r){d=a(r,"P",{});var h=s(d);L=l(h,"locally:"),h.forEach(t),u=f(r),x(m.$$.fragment,r)},m(r,h){v(r,d,h),e(d,L),v(r,u,h),y(m,r,h),_=!0},p:Ho,i(r){_||(w(m.$$.fragment,r),_=!0)},o(r){M(m.$$.fragment,r),_=!1},d(r){r&&t(d),r&&t(u),$(m,r)}}}function wi(E){let d,L,u,m,_;return{c(){d=n("p"),L=i("We support loading A1111 formatted LoRA checkpoints in a limited capacity."),u=c(),m=n("p"),_=i("This function is experimental and might change in the future.")},l(r){d=a(r,"P",{});var h=s(d);L=l(h,"We support loading A1111 formatted LoRA checkpoints in a limited capacity."),h.forEach(t),u=f(r),m=a(r,"P",{});var F=s(m);_=l(F,"This function is experimental and might change in the future."),F.forEach(t)},m(r,h){v(r,d,h),e(d,L),v(r,u,h),v(r,m,h),e(m,_)},d(r){r&&t(d),r&&t(u),r&&t(m)}}}function Mi(E){let d,L,u,m,_;return m=new Xo({props:{code:"JTIzJTIwQXNzdW1pbmclMjAlNjBwaXBlbGluZSU2MCUyMGlzJTIwYWxyZWFkeSUyMGxvYWRlZCUyMHdpdGglMjB0aGUlMjBMb1JBJTIwcGFyYW1ldGVycy4lMEFwaXBlbGluZS51bmxvYWRfbG9yYV93ZWlnaHRzKCklMEEuLi4=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Assuming `pipeline` is already loaded with the LoRA parameters.</span>\n<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline.unload_lora_weights()\n<span class="hljs-meta">&gt;&gt;&gt; </span>...'}}),{c(){d=n("p"),L=i("Examples:"),u=c(),b(m.$$.fragment)},l(r){d=a(r,"P",{});var h=s(d);L=l(h,"Examples:"),h.forEach(t),u=f(r),x(m.$$.fragment,r)},m(r,h){v(r,d,h),e(d,L),v(r,u,h),y(m,r,h),_=!0},p:Ho,i(r){_||(w(m.$$.fragment,r),_=!0)},o(r){M(m.$$.fragment,r),_=!1},d(r){r&&t(d),r&&t(u),$(m,r)}}}function $i(E){let d,L,u,m,_;return m=new Xo({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBJTIzJTIwRG93bmxvYWQlMjBwaXBlbGluZSUyMGZyb20lMjBodWdnaW5nZmFjZS5jbyUyMGFuZCUyMGNhY2hlLiUwQXBpcGVsaW5lJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9zaW5nbGVfZmlsZSglMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGV2Fycmlvck1hbWE3NzclMkZPcmFuZ2VNaXhzJTJGYmxvYiUyRm1haW4lMkZNb2RlbHMlMkZBYnlzc09yYW5nZU1peCUyRkFieXNzT3JhbmdlTWl4LnNhZmV0ZW5zb3JzJTIyJTBBKSUwQSUwQSUyMyUyMERvd25sb2FkJTIwcGlwZWxpbmUlMjBmcm9tJTIwbG9jYWwlMjBmaWxlJTBBJTIzJTIwZmlsZSUyMGlzJTIwZG93bmxvYWRlZCUyMHVuZGVyJTIwLiUyRnYxLTUtcHJ1bmVkLWVtYW9ubHkuY2twdCUwQXBpcGVsaW5lJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9zaW5nbGVfZmlsZSglMjIuJTJGdjEtNS1wcnVuZWQtZW1hb25seSUyMiklMEElMEElMjMlMjBFbmFibGUlMjBmbG9hdDE2JTIwYW5kJTIwbW92ZSUyMHRvJTIwR1BVJTBBcGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25QaXBlbGluZS5mcm9tX3NpbmdsZV9maWxlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyRmJsb2IlMkZtYWluJTJGdjEtNS1wcnVuZWQtZW1hb25seS5ja3B0JTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKSUwQXBpcGVsaW5lLnRvKCUyMmN1ZGElMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download pipeline from huggingface.co and cache.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = StableDiffusionPipeline.from_single_file(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/WarriorMama777/OrangeMixs/blob/main/Models/AbyssOrangeMix/AbyssOrangeMix.safetensors&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download pipeline from local file</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># file is downloaded under ./v1-5-pruned-emaonly.ckpt</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = StableDiffusionPipeline.from_single_file(<span class="hljs-string">&quot;./v1-5-pruned-emaonly&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Enable float16 and move to GPU</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = StableDiffusionPipeline.from_single_file(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned-emaonly.ckpt&quot;</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)`}}),{c(){d=n("p"),L=i("Examples:"),u=c(),b(m.$$.fragment)},l(r){d=a(r,"P",{});var h=s(d);L=l(h,"Examples:"),h.forEach(t),u=f(r),x(m.$$.fragment,r)},m(r,h){v(r,d,h),e(d,L),v(r,u,h),y(m,r,h),_=!0},p:Ho,i(r){_||(w(m.$$.fragment,r),_=!0)},o(r){M(m.$$.fragment,r),_=!1},d(r){r&&t(d),r&&t(u),$(m,r)}}}function Li(E){let d,L,u,m,_;return m=new Xo({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvbkNvbnRyb2xuZXRQaXBlbGluZSUyQyUyMENvbnRyb2xOZXRNb2RlbCUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZsbGx5YXN2aWVsJTJGQ29udHJvbE5ldC12MS0xJTJGYmxvYiUyRm1haW4lMkZjb250cm9sX3YxMXBfc2QxNV9jYW5ueS5wdGglMjIlMjAlMjAlMjMlMjBjYW4lMjBhbHNvJTIwYmUlMjBhJTIwbG9jYWwlMjBwYXRoJTBBbW9kZWwlMjAlM0QlMjBDb250cm9sTmV0TW9kZWwuZnJvbV9zaW5nbGVfZmlsZSh1cmwpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTJGYmxvYiUyRm1haW4lMkZ2MS01LXBydW5lZC5zYWZldGVuc29ycyUyMiUyMCUyMCUyMyUyMGNhbiUyMGFsc28lMjBiZSUyMGElMjBsb2NhbCUyMHBhdGglMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uQ29udHJvbG5ldFBpcGVsaW5lLmZyb21fc2luZ2xlX2ZpbGUodXJsJTJDJTIwY29udHJvbG5ldCUzRGNvbnRyb2xuZXQp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionControlnetPipeline, ControlNetModel

url = <span class="hljs-string">&quot;https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_canny.pth&quot;</span>  <span class="hljs-comment"># can also be a local path</span>
model = ControlNetModel.from_single_file(url)

url = <span class="hljs-string">&quot;https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned.safetensors&quot;</span>  <span class="hljs-comment"># can also be a local path</span>
pipe = StableDiffusionControlnetPipeline.from_single_file(url, controlnet=controlnet)`}}),{c(){d=n("p"),L=i("Examples:"),u=c(),b(m.$$.fragment)},l(r){d=a(r,"P",{});var h=s(d);L=l(h,"Examples:"),h.forEach(t),u=f(r),x(m.$$.fragment,r)},m(r,h){v(r,d,h),e(d,L),v(r,u,h),y(m,r,h),_=!0},p:Ho,i(r){_||(w(m.$$.fragment,r),_=!0)},o(r){M(m.$$.fragment,r),_=!1},d(r){r&&t(d),r&&t(u),$(m,r)}}}function Ti(E){let d,L,u,m,_,r,h,F,A,G,C;return{c(){d=n("p"),L=i("Make sure to pass both "),u=n("code"),m=i("image_size"),_=i(" and "),r=n("code"),h=i("scaling_factor"),F=i(" to "),A=n("code"),G=i("from_single_file()"),C=i(` if you want to load
a VAE that does accompany a stable diffusion model of v2 or higher or SDXL.`)},l(Z){d=a(Z,"P",{});var T=s(d);L=l(T,"Make sure to pass both "),u=a(T,"CODE",{});var re=s(u);m=l(re,"image_size"),re.forEach(t),_=l(T," and "),r=a(T,"CODE",{});var ne=s(r);h=l(ne,"scaling_factor"),ne.forEach(t),F=l(T," to "),A=a(T,"CODE",{});var z=s(A);G=l(z,"from_single_file()"),z.forEach(t),C=l(T,` if you want to load
a VAE that does accompany a stable diffusion model of v2 or higher or SDXL.`),T.forEach(t)},m(Z,T){v(Z,d,T),e(d,L),e(d,u),e(u,m),e(d,_),e(d,r),e(r,h),e(d,F),e(d,A),e(A,G),e(d,C)},d(Z){Z&&t(d)}}}function ki(E){let d,L,u,m,_;return m=new Xo({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9lbmNvZGVyS0wlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGc3RhYmlsaXR5YWklMkZzZC12YWUtZnQtbXNlLW9yaWdpbmFsJTJGYmxvYiUyRm1haW4lMkZ2YWUtZnQtbXNlLTg0MDAwMC1lbWEtcHJ1bmVkLnNhZmV0ZW5zb3JzJTIyJTIwJTIwJTIzJTIwY2FuJTIwYWxzbyUyMGJlJTIwbG9jYWwlMjBmaWxlJTBBbW9kZWwlMjAlM0QlMjBBdXRvZW5jb2RlcktMLmZyb21fc2luZ2xlX2ZpbGUodXJsKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoencoderKL

url = <span class="hljs-string">&quot;https://huggingface.co/stabilityai/sd-vae-ft-mse-original/blob/main/vae-ft-mse-840000-ema-pruned.safetensors&quot;</span>  <span class="hljs-comment"># can also be local file</span>
model = AutoencoderKL.from_single_file(url)`}}),{c(){d=n("p"),L=i("Examples:"),u=c(),b(m.$$.fragment)},l(r){d=a(r,"P",{});var h=s(d);L=l(h,"Examples:"),h.forEach(t),u=f(r),x(m.$$.fragment,r)},m(r,h){v(r,d,h),e(d,L),v(r,u,h),y(m,r,h),_=!0},p:Ho,i(r){_||(w(m.$$.fragment,r),_=!0)},o(r){M(m.$$.fragment,r),_=!1},d(r){r&&t(d),r&&t(u),$(m,r)}}}function Ei(E){let d,L,u,m,_,r,h,F,A,G,C,Z,T,re,ne,z,_e,Yt,ae,ve,Qo,Ve,$r,Ko,Lr,Ot,B,Be,Tr,be,qe,kr,q,Er,Eo,Ur,Fr,Ye,et,Cr,Ir,ot,Jr,Dr,Ar,xe,Oe,Zr,ze,Nr,Uo,Sr,Wr,zt,se,ye,tt,He,jr,rt,Gr,Ht,N,Xe,Pr,nt,Rr,Vr,I,Qe,Br,Ke,qr,Fo,Yr,Or,zr,at,Hr,Xr,we,Qr,eo,Kr,oo,en,on,tn,Me,rn,$e,to,nn,st,an,Xt,ie,Le,it,ro,sn,lt,ln,Qt,k,no,dn,le,cn,Co,fn,mn,ao,dt,pn,hn,un,Te,so,gn,ke,_n,ct,vn,bn,ft,xn,yn,Ee,io,wn,Ue,Mn,mt,$n,Ln,pt,Tn,kn,J,lo,En,Y,Un,ht,Fn,Cn,ut,In,Jn,gt,Dn,An,Zn,co,Nn,_t,Sn,Wn,jn,fo,Gn,Io,Pn,Rn,Vn,de,Bn,Jo,qn,Yn,vt,On,zn,Hn,ce,Xn,Do,Qn,Kn,bt,ea,oa,ta,H,mo,ra,xt,na,aa,Fe,sa,Ce,po,ia,yt,la,da,X,ho,ca,wt,fa,ma,Ie,Kt,fe,Je,Mt,uo,pa,$t,ha,er,O,go,ua,me,ga,Lt,_a,va,Ao,ba,xa,ya,Q,_o,wa,S,Ma,Zo,$a,La,Tt,Ta,ka,kt,Ea,Ua,Et,Fa,Ca,Ia,De,or,pe,Ae,Ut,vo,Ja,Ft,Da,tr,he,bo,Aa,K,xo,Za,W,Na,No,Sa,Wa,Ct,ja,Ga,It,Pa,Ra,Jt,Va,Ba,qa,Ze,rr,ue,Ne,Dt,yo,Ya,At,Oa,nr,ge,wo,za,P,Mo,Ha,j,Xa,So,Qa,Ka,Zt,es,os,Nt,ts,rs,St,ns,as,ss,Se,is,We,ar;return r=new ko({}),_e=new ls({props:{warning:!0,$$slots:{default:[bi]},$$scope:{ctx:E}}}),Ve=new ko({}),Be=new U({props:{name:"class diffusers.loaders.UNet2DConditionLoadersMixin",anchor:"diffusers.loaders.UNet2DConditionLoadersMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L184"}}),qe=new U({props:{name:"load_attn_procs",anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": typing.Union[str, typing.Dict[str, torch.Tensor]]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs.pretrained_model_name_or_path_or_dict",description:`<strong>pretrained_model_name_or_path_or_dict</strong> (<code>str</code> or <code>os.PathLike</code> or <code>dict</code>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the model id (for example <code>google/ddpm-celebahq-256</code>) of a pretrained model hosted on
the Hub.</li>
<li>A path to a directory (for example <code>./my_model_directory</code>) containing the model weights saved
with <a href="/docs/diffusers/v0.19.0/en/api/models/overview#diffusers.ModelMixin.save_pretrained">ModelMixin.save_pretrained()</a>.</li>
<li>A <a href="https://pytorch.org/tutorials/beginner/saving_loading_models.html#what-is-a-state-dict" rel="nofollow">torch state
dict</a>.</li>
</ul>`,name:"pretrained_model_name_or_path_or_dict"},{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"use_auth_token"},{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
The subfolder location of a model file within a larger model repository on the Hub or locally.`,name:"subfolder"},{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to resolve accessibility issues if you&#x2019;re downloading a model in China. We do not
guarantee the timeliness or safety of the source, and you should refer to the mirror site for more
information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L188"}}),Oe=new U({props:{name:"save_attn_procs",anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.save_attn_procs",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.save_attn_procs.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to save an attention processor to. Will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.save_attn_procs.is_main_process",description:`<strong>is_main_process</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the process calling this is the main process or not. Useful during distributed training and you
need to call this function on all processes. In this case, set <code>is_main_process=True</code> only on the main
process to avoid race conditions.`,name:"is_main_process"},{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.save_attn_procs.save_function",description:`<strong>save_function</strong> (<code>Callable</code>) &#x2014;
The function to use to save the state dictionary. Useful during distributed training when you need to
replace <code>torch.save</code> with another method. Can be configured with the environment variable
<code>DIFFUSERS_SAVE_MODE</code>.`,name:"save_function"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L440"}}),He=new ko({}),Xe=new U({props:{name:"class diffusers.loaders.TextualInversionLoaderMixin",anchor:"diffusers.loaders.TextualInversionLoaderMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L523"}}),Qe=new U({props:{name:"load_textual_inversion",anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, typing.List[str], typing.Dict[str, torch.Tensor], typing.List[typing.Dict[str, torch.Tensor]]]"},{name:"token",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code> or <code>List[str or os.PathLike]</code> or <code>Dict</code> or <code>List[Dict]</code>) &#x2014;
Can be either one of the following or a list of them:</p>
<ul>
<li>A string, the <em>model id</em> (for example <code>sd-concepts-library/low-poly-hd-logos-icons</code>) of a
pretrained model hosted on the Hub.</li>
<li>A path to a <em>directory</em> (for example <code>./my_text_inversion_directory/</code>) containing the textual
inversion weights.</li>
<li>A path to a <em>file</em> (for example <code>./my_text_inversions.pt</code>) containing textual inversion weights.</li>
<li>A <a href="https://pytorch.org/tutorials/beginner/saving_loading_models.html#what-is-a-state-dict" rel="nofollow">torch state
dict</a>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.token",description:`<strong>token</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
Override the token to use for the textual inversion weights. If <code>pretrained_model_name_or_path</code> is a
list, then <code>token</code> must also be a list of equal length.`,name:"token"},{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.weight_name",description:`<strong>weight_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Name of a custom weight file. This should be used when:</p>
<ul>
<li>The saved textual inversion file is in &#x1F917; Diffusers format, but was saved under a specific weight
name such as <code>text_inv.bin</code>.</li>
<li>The saved textual inversion file is in the Automatic1111 format.</li>
</ul>`,name:"weight_name"},{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"use_auth_token"},{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
The subfolder location of a model file within a larger model repository on the Hub or locally.`,name:"subfolder"},{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to resolve accessibility issues if you&#x2019;re downloading a model in China. We do not
guarantee the timeliness or safety of the source, and you should refer to the mirror site for more
information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L585"}}),we=new zo({props:{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.example",$$slots:{default:[xi]},$$scope:{ctx:E}}}),Me=new zo({props:{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.example-2",$$slots:{default:[yi]},$$scope:{ctx:E}}}),to=new U({props:{name:"maybe_convert_prompt",anchor:"diffusers.loaders.TextualInversionLoaderMixin.maybe_convert_prompt",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"tokenizer",val:": PreTrainedTokenizer"}],parametersDescription:[{anchor:"diffusers.loaders.TextualInversionLoaderMixin.maybe_convert_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or list of <code>str</code>) &#x2014;
The prompt or prompts to guide the image generation.`,name:"prompt"},{anchor:"diffusers.loaders.TextualInversionLoaderMixin.maybe_convert_prompt.tokenizer",description:`<strong>tokenizer</strong> (<code>PreTrainedTokenizer</code>) &#x2014;
The tokenizer responsible for encoding the prompt into input tokens.`,name:"tokenizer"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L528",returnDescription:`
<p>The converted prompt</p>
`,returnType:`
<p><code>str</code> or list of <code>str</code></p>
`}}),ro=new ko({}),no=new U({props:{name:"class diffusers.loaders.LoraLoaderMixin",anchor:"diffusers.loaders.LoraLoaderMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L854"}}),so=new U({props:{name:"load_lora_into_text_encoder",anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_into_text_encoder",parameters:[{name:"state_dict",val:""},{name:"network_alpha",val:""},{name:"text_encoder",val:""},{name:"prefix",val:" = None"},{name:"lora_scale",val:" = 1.0"}],parametersDescription:[{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_into_text_encoder.state_dict",description:`<strong>state_dict</strong> (<code>dict</code>) &#x2014;
A standard state dict containing the lora layer parameters. The key should be prefixed with an
additional <code>text_encoder</code> to distinguish between unet lora layers.`,name:"state_dict"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_into_text_encoder.network_alpha",description:`<strong>network_alpha</strong> (<code>float</code>) &#x2014;
See <code>LoRALinearLayer</code> for more details.`,name:"network_alpha"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_into_text_encoder.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
The text encoder model to load the LoRA layers into.`,name:"text_encoder"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_into_text_encoder.prefix",description:`<strong>prefix</strong> (<code>str</code>) &#x2014;
Expected prefix of the <code>text_encoder</code> in the <code>state_dict</code>.`,name:"prefix"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_into_text_encoder.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>) &#x2014;
How much to scale the output of the lora linear layer before it is added with the output of the regular
lora layer.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L1066"}}),io=new U({props:{name:"load_lora_into_unet",anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_into_unet",parameters:[{name:"state_dict",val:""},{name:"network_alpha",val:""},{name:"unet",val:""}],parametersDescription:[{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_into_unet.state_dict",description:`<strong>state_dict</strong> (<code>dict</code>) &#x2014;
A standard state dict containing the lora layer parameters. The keys can either be indexed directly
into the unet or prefixed with an additional <code>unet</code> which can be used to distinguish between text
encoder lora layers.`,name:"state_dict"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_into_unet.network_alpha",description:`<strong>network_alpha</strong> (<code>float</code>) &#x2014;
See <code>LoRALinearLayer</code> for more details.`,name:"network_alpha"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_into_unet.unet",description:`<strong>unet</strong> (<code>UNet2DConditionModel</code>) &#x2014;
The UNet model to load the LoRA layers into.`,name:"unet"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L1028"}}),lo=new U({props:{name:"load_lora_weights",anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_weights",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": typing.Union[str, typing.Dict[str, torch.Tensor]]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_weights.pretrained_model_name_or_path_or_dict",description:`<strong>pretrained_model_name_or_path_or_dict</strong> (<code>str</code> or <code>os.PathLike</code> or <code>dict</code>) &#x2014;
See <a href="/docs/diffusers/v0.19.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict">lora_state_dict()</a>.`,name:"pretrained_model_name_or_path_or_dict"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_weights.kwargs",description:`<strong>kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
See <a href="/docs/diffusers/v0.19.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict">lora_state_dict()</a>.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L862"}}),mo=new U({props:{name:"lora_state_dict",anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": typing.Union[str, typing.Dict[str, torch.Tensor]]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.pretrained_model_name_or_path_or_dict",description:`<strong>pretrained_model_name_or_path_or_dict</strong> (<code>str</code> or <code>os.PathLike</code> or <code>dict</code>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> (for example <code>google/ddpm-celebahq-256</code>) of a pretrained model hosted on
the Hub.</li>
<li>A path to a <em>directory</em> (for example <code>./my_model_directory</code>) containing the model weights saved
with <a href="/docs/diffusers/v0.19.0/en/api/models/overview#diffusers.ModelMixin.save_pretrained">ModelMixin.save_pretrained()</a>.</li>
<li>A <a href="https://pytorch.org/tutorials/beginner/saving_loading_models.html#what-is-a-state-dict" rel="nofollow">torch state
dict</a>.</li>
</ul>`,name:"pretrained_model_name_or_path_or_dict"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"use_auth_token"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
The subfolder location of a model file within a larger model repository on the Hub or locally.`,name:"subfolder"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to resolve accessibility issues if you&#x2019;re downloading a model in China. We do not
guarantee the timeliness or safety of the source, and you should refer to the mirror site for more
information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L892"}}),Fe=new ls({props:{warning:!0,$$slots:{default:[wi]},$$scope:{ctx:E}}}),po=new U({props:{name:"save_lora_weights",anchor:"diffusers.loaders.LoraLoaderMixin.save_lora_weights",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"unet_lora_layers",val:": typing.Dict[str, typing.Union[torch.nn.modules.module.Module, torch.Tensor]] = None"},{name:"text_encoder_lora_layers",val:": typing.Dict[str, torch.nn.modules.module.Module] = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.loaders.LoraLoaderMixin.save_lora_weights.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to save LoRA parameters to. Will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"diffusers.loaders.LoraLoaderMixin.save_lora_weights.unet_lora_layers",description:`<strong>unet_lora_layers</strong> (<code>Dict[str, torch.nn.Module]</code> or <code>Dict[str, torch.Tensor]</code>) &#x2014;
State dict of the LoRA layers corresponding to the <code>unet</code>.`,name:"unet_lora_layers"},{anchor:"diffusers.loaders.LoraLoaderMixin.save_lora_weights.text_encoder_lora_layers",description:`<strong>text_encoder_lora_layers</strong> (<code>Dict[str, torch.nn.Module]</code> or <code>Dict[str, torch.Tensor]</code>) &#x2014;
State dict of the LoRA layers corresponding to the <code>text_encoder</code>. Must explicitly pass the text
encoder LoRA state dict because it comes from &#x1F917; Transformers.`,name:"text_encoder_lora_layers"},{anchor:"diffusers.loaders.LoraLoaderMixin.save_lora_weights.is_main_process",description:`<strong>is_main_process</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the process calling this is the main process or not. Useful during distributed training and you
need to call this function on all processes. In this case, set <code>is_main_process=True</code> only on the main
process to avoid race conditions.`,name:"is_main_process"},{anchor:"diffusers.loaders.LoraLoaderMixin.save_lora_weights.save_function",description:`<strong>save_function</strong> (<code>Callable</code>) &#x2014;
The function to use to save the state dictionary. Useful during distributed training when you need to
replace <code>torch.save</code> with another method. Can be configured with the environment variable
<code>DIFFUSERS_SAVE_MODE</code>.`,name:"save_function"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L1235"}}),ho=new U({props:{name:"unload_lora_weights",anchor:"diffusers.loaders.LoraLoaderMixin.unload_lora_weights",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L1408"}}),Ie=new zo({props:{anchor:"diffusers.loaders.LoraLoaderMixin.unload_lora_weights.example",$$slots:{default:[Mi]},$$scope:{ctx:E}}}),uo=new ko({}),go=new U({props:{name:"class diffusers.loaders.FromSingleFileMixin",anchor:"diffusers.loaders.FromSingleFileMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L1455"}}),_o=new U({props:{name:"from_single_file",anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file",parameters:[{name:"pretrained_model_link_or_path",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.pretrained_model_link_or_path",description:`<strong>pretrained_model_link_or_path</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Can be either:<ul>
<li>A link to the <code>.ckpt</code> file (for example
<code>&quot;https://huggingface.co/&lt;repo_id&gt;/blob/main/&lt;path_to_file&gt;.ckpt&quot;</code>) on the Hub.</li>
<li>A path to a <em>file</em> containing all pipeline weights.</li>
</ul>`,name:"pretrained_model_link_or_path"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code> or <code>torch.dtype</code>, <em>optional</em>) &#x2014;
Override the default <code>torch.dtype</code> and load the model with another dtype. If <code>&quot;auto&quot;</code> is passed, the
dtype is automatically derived from the model&#x2019;s weights.`,name:"torch_dtype"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"use_auth_token"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.use_safetensors",description:`<strong>use_safetensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If set to <code>None</code>, the safetensors weights are downloaded if they&#x2019;re available <strong>and</strong> if the
safetensors library is installed. If set to <code>True</code>, the model is forcibly loaded from safetensors
weights. If set to <code>False</code>, safetensors weights are not loaded.`,name:"use_safetensors"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.extract_ema",description:`<strong>extract_ema</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to extract the EMA weights or not. Pass <code>True</code> to extract the EMA weights which usually yield
higher quality images for inference. Non-EMA weights are usually better for continuing finetuning.`,name:"extract_ema"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.upcast_attention",description:`<strong>upcast_attention</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Whether the attention computation should always be upcasted.`,name:"upcast_attention"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The image size the model was trained on. Use 512 for all Stable Diffusion v1 models and the Stable
Diffusion v2 base model. Use 768 for Stable Diffusion v2.`,name:"image_size"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.prediction_type",description:`<strong>prediction_type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The prediction type the model was trained on. Use <code>&apos;epsilon&apos;</code> for all Stable Diffusion v1 models and
the Stable Diffusion v2 base model. Use <code>&apos;v_prediction&apos;</code> for Stable Diffusion v2.`,name:"prediction_type"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.num_in_channels",description:`<strong>num_in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The number of input channels. If <code>None</code>, it is automatically inferred.`,name:"num_in_channels"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.scheduler_type",description:`<strong>scheduler_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pndm&quot;</code>) &#x2014;
Type of scheduler to use. Should be one of <code>[&quot;pndm&quot;, &quot;lms&quot;, &quot;heun&quot;, &quot;euler&quot;, &quot;euler-ancestral&quot;, &quot;dpm&quot;, &quot;ddim&quot;]</code>.`,name:"scheduler_type"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.load_safety_checker",description:`<strong>load_safety_checker</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to load the safety checker or not.`,name:"load_safety_checker"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.text_encoder",description:`<strong>text_encoder</strong> (<a href="https://huggingface.co/docs/transformers/v4.31.0/en/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIPTextModel</a>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
An instance of <code>CLIPTextModel</code> to use, specifically the
<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant. If this
parameter is <code>None</code>, the function loads a new instance of <code>CLIPTextModel</code> by itself if needed.`,name:"text_encoder"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.vae",description:`<strong>vae</strong> (<code>AutoencoderKL</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations. If
this parameter is <code>None</code>, the function will load a new instance of [CLIP] by itself, if needed.`,name:"vae"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/v4.31.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
An instance of <code>CLIPTokenizer</code> to use. If this parameter is <code>None</code>, the function loads a new instance
of <code>CLIPTokenizer</code> by itself if needed.`,name:"tokenizer"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) &#x2014;
Can be used to overwrite load and saveable variables (for example the pipeline components of the
specific pipeline class). The overwritten components are directly passed to the pipelines <code>__init__</code>
method. See example below for more information.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L1466"}}),De=new zo({props:{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.example",$$slots:{default:[$i]},$$scope:{ctx:E}}}),vo=new ko({}),bo=new U({props:{name:"class diffusers.loaders.FromOriginalControlnetMixin",anchor:"diffusers.loaders.FromOriginalControlnetMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L1873"}}),xo=new U({props:{name:"from_single_file",anchor:"diffusers.loaders.FromOriginalControlnetMixin.from_single_file",parameters:[{name:"pretrained_model_link_or_path",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.FromOriginalControlnetMixin.from_single_file.pretrained_model_link_or_path",description:`<strong>pretrained_model_link_or_path</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Can be either:<ul>
<li>A link to the <code>.ckpt</code> file (for example
<code>&quot;https://huggingface.co/&lt;repo_id&gt;/blob/main/&lt;path_to_file&gt;.ckpt&quot;</code>) on the Hub.</li>
<li>A path to a <em>file</em> containing all pipeline weights.</li>
</ul>`,name:"pretrained_model_link_or_path"},{anchor:"diffusers.loaders.FromOriginalControlnetMixin.from_single_file.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code> or <code>torch.dtype</code>, <em>optional</em>) &#x2014;
Override the default <code>torch.dtype</code> and load the model with another dtype. If <code>&quot;auto&quot;</code> is passed, the
dtype is automatically derived from the model&#x2019;s weights.`,name:"torch_dtype"},{anchor:"diffusers.loaders.FromOriginalControlnetMixin.from_single_file.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.loaders.FromOriginalControlnetMixin.from_single_file.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.loaders.FromOriginalControlnetMixin.from_single_file.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.loaders.FromOriginalControlnetMixin.from_single_file.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.loaders.FromOriginalControlnetMixin.from_single_file.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to True, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.loaders.FromOriginalControlnetMixin.from_single_file.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"use_auth_token"},{anchor:"diffusers.loaders.FromOriginalControlnetMixin.from_single_file.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.loaders.FromOriginalControlnetMixin.from_single_file.use_safetensors",description:`<strong>use_safetensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If set to <code>None</code>, the safetensors weights are downloaded if they&#x2019;re available <strong>and</strong> if the
safetensors library is installed. If set to <code>True</code>, the model is forcibly loaded from safetensors
weights. If set to <code>False</code>, safetensors weights are not loaded.`,name:"use_safetensors"},{anchor:"diffusers.loaders.FromOriginalControlnetMixin.from_single_file.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The image size the model was trained on. Use 512 for all Stable Diffusion v1 models and the Stable
Diffusion v2 base model. Use 768 for Stable Diffusion v2.`,name:"image_size"},{anchor:"diffusers.loaders.FromOriginalControlnetMixin.from_single_file.upcast_attention",description:`<strong>upcast_attention</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Whether the attention computation should always be upcasted.`,name:"upcast_attention"},{anchor:"diffusers.loaders.FromOriginalControlnetMixin.from_single_file.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) &#x2014;
Can be used to overwrite load and saveable variables (for example the pipeline components of the
specific pipeline class). The overwritten components are directly passed to the pipelines <code>__init__</code>
method. See example below for more information.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L1874"}}),Ze=new zo({props:{anchor:"diffusers.loaders.FromOriginalControlnetMixin.from_single_file.example",$$slots:{default:[Li]},$$scope:{ctx:E}}}),yo=new ko({}),wo=new U({props:{name:"class diffusers.loaders.FromOriginalVAEMixin",anchor:"diffusers.loaders.FromOriginalVAEMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L1680"}}),Mo=new U({props:{name:"from_single_file",anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file",parameters:[{name:"pretrained_model_link_or_path",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.pretrained_model_link_or_path",description:`<strong>pretrained_model_link_or_path</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Can be either:<ul>
<li>A link to the <code>.ckpt</code> file (for example
<code>&quot;https://huggingface.co/&lt;repo_id&gt;/blob/main/&lt;path_to_file&gt;.ckpt&quot;</code>) on the Hub.</li>
<li>A path to a <em>file</em> containing all pipeline weights.</li>
</ul>`,name:"pretrained_model_link_or_path"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code> or <code>torch.dtype</code>, <em>optional</em>) &#x2014;
Override the default <code>torch.dtype</code> and load the model with another dtype. If <code>&quot;auto&quot;</code> is passed, the
dtype is automatically derived from the model&#x2019;s weights.`,name:"torch_dtype"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to True, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"use_auth_token"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The image size the model was trained on. Use 512 for all Stable Diffusion v1 models and the Stable
Diffusion v2 base model. Use 768 for Stable Diffusion v2.`,name:"image_size"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.use_safetensors",description:`<strong>use_safetensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If set to <code>None</code>, the safetensors weights are downloaded if they&#x2019;re available <strong>and</strong> if the
safetensors library is installed. If set to <code>True</code>, the model is forcibly loaded from safetensors
weights. If set to <code>False</code>, safetensors weights are not loaded.`,name:"use_safetensors"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.upcast_attention",description:`<strong>upcast_attention</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Whether the attention computation should always be upcasted.`,name:"upcast_attention"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.scaling_factor",description:`<strong>scaling_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 0.18215) &#x2014;
The component-wise standard deviation of the trained latent space computed using the first batch of the
training set. This is used to scale the latent space to have unit variance when training the diffusion
model. The latents are scaled with the formula <code>z = z * scaling_factor</code> before being passed to the
diffusion model. When decoding, the latents are scaled back to the original scale with the formula: <code>z = 1 / scaling_factor * z</code>. For more details, refer to sections 4.3.2 and D.1 of the <a href="https://arxiv.org/abs/2112.10752" rel="nofollow">High-Resolution
Image Synthesis with Latent Diffusion Models</a> paper.`,name:"scaling_factor"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) &#x2014;
Can be used to overwrite load and saveable variables (for example the pipeline components of the
specific pipeline class). The overwritten components are directly passed to the pipelines <code>__init__</code>
method. See example below for more information.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/loaders.py#L1681"}}),Se=new ls({props:{warning:!0,$$slots:{default:[Ti]},$$scope:{ctx:E}}}),We=new zo({props:{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.example",$$slots:{default:[ki]},$$scope:{ctx:E}}}),{c(){d=n("meta"),L=c(),u=n("h1"),m=n("a"),_=n("span"),b(r.$$.fragment),h=c(),F=n("span"),A=i("Loaders"),G=c(),C=n("p"),Z=i("Adapters (textual inversion, LoRA, hypernetworks) allow you to modify a diffusion model to generate images in a specific style without training or finetuning the entire model. The adapter weights are typically only a tiny fraction of the pretrained model\u2019s which making them very portable. \u{1F917} Diffusers provides an easy-to-use "),T=n("code"),re=i("LoaderMixin"),ne=i(" API to load adapter weights."),z=c(),b(_e.$$.fragment),Yt=c(),ae=n("h2"),ve=n("a"),Qo=n("span"),b(Ve.$$.fragment),$r=c(),Ko=n("span"),Lr=i("UNet2DConditionLoadersMixin"),Ot=c(),B=n("div"),b(Be.$$.fragment),Tr=c(),be=n("div"),b(qe.$$.fragment),kr=c(),q=n("p"),Er=i("Load pretrained attention processor layers into "),Eo=n("a"),Ur=i("UNet2DConditionModel"),Fr=i(`. Attention processor layers have to be
defined in
`),Ye=n("a"),et=n("code"),Cr=i("cross_attention.py"),Ir=i(`
and be a `),ot=n("code"),Jr=i("torch.nn.Module"),Dr=i(" class."),Ar=c(),xe=n("div"),b(Oe.$$.fragment),Zr=c(),ze=n("p"),Nr=i(`Save an attention processor to a directory so that it can be reloaded using the
`),Uo=n("a"),Sr=i("load_attn_procs()"),Wr=i(" method."),zt=c(),se=n("h2"),ye=n("a"),tt=n("span"),b(He.$$.fragment),jr=c(),rt=n("span"),Gr=i("TextualInversionLoaderMixin"),Ht=c(),N=n("div"),b(Xe.$$.fragment),Pr=c(),nt=n("p"),Rr=i("Load textual inversion tokens and embeddings to the tokenizer and text encoder."),Vr=c(),I=n("div"),b(Qe.$$.fragment),Br=c(),Ke=n("p"),qr=i("Load textual inversion embeddings into the text encoder of "),Fo=n("a"),Yr=i("StableDiffusionPipeline"),Or=i(` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),zr=c(),at=n("p"),Hr=i("Example:"),Xr=c(),b(we.$$.fragment),Qr=c(),eo=n("p"),Kr=i(`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),oo=n("a"),en=i("civitAI"),on=i(") and then load the vector"),tn=c(),b(Me.$$.fragment),rn=c(),$e=n("div"),b(to.$$.fragment),nn=c(),st=n("p"),an=i(`Processes prompts that include a special token corresponding to a multi-vector textual inversion embedding to
be replaced with multiple special tokens each corresponding to one of the vectors. If the prompt has no textual
inversion token or if the textual inversion token is a single vector, the input prompt is returned.`),Xt=c(),ie=n("h2"),Le=n("a"),it=n("span"),b(ro.$$.fragment),sn=c(),lt=n("span"),ln=i("LoraLoaderMixin"),Qt=c(),k=n("div"),b(no.$$.fragment),dn=c(),le=n("p"),cn=i("Load LoRA layers into "),Co=n("a"),fn=i("UNet2DConditionModel"),mn=i(` and
`),ao=n("a"),dt=n("code"),pn=i("CLIPTextModel"),hn=i("."),un=c(),Te=n("div"),b(so.$$.fragment),gn=c(),ke=n("p"),_n=i("This will load the LoRA layers specified in "),ct=n("code"),vn=i("state_dict"),bn=i(" into "),ft=n("code"),xn=i("text_encoder"),yn=c(),Ee=n("div"),b(io.$$.fragment),wn=c(),Ue=n("p"),Mn=i("This will load the LoRA layers specified in "),mt=n("code"),$n=i("state_dict"),Ln=i(" into "),pt=n("code"),Tn=i("unet"),kn=c(),J=n("div"),b(lo.$$.fragment),En=c(),Y=n("p"),Un=i("Load LoRA weights specified in "),ht=n("code"),Fn=i("pretrained_model_name_or_path_or_dict"),Cn=i(" into "),ut=n("code"),In=i("self.unet"),Jn=i(` and
`),gt=n("code"),Dn=i("self.text_encoder"),An=i("."),Zn=c(),co=n("p"),Nn=i("All kwargs are forwarded to "),_t=n("code"),Sn=i("self.lora_state_dict"),Wn=i("."),jn=c(),fo=n("p"),Gn=i("See "),Io=n("a"),Pn=i("lora_state_dict()"),Rn=i(" for more details on how the state dict is loaded."),Vn=c(),de=n("p"),Bn=i("See "),Jo=n("a"),qn=i("load_lora_into_unet()"),Yn=i(` for more details on how the state dict is loaded into
`),vt=n("code"),On=i("self.unet"),zn=i("."),Hn=c(),ce=n("p"),Xn=i("See "),Do=n("a"),Qn=i("load_lora_into_text_encoder()"),Kn=i(` for more details on how the state dict is loaded
into `),bt=n("code"),ea=i("self.text_encoder"),oa=i("."),ta=c(),H=n("div"),b(mo.$$.fragment),ra=c(),xt=n("p"),na=i("Return state dict for lora weights"),aa=c(),b(Fe.$$.fragment),sa=c(),Ce=n("div"),b(po.$$.fragment),ia=c(),yt=n("p"),la=i("Save the LoRA parameters corresponding to the UNet and text encoder."),da=c(),X=n("div"),b(ho.$$.fragment),ca=c(),wt=n("p"),fa=i("Unloads the LoRA parameters."),ma=c(),b(Ie.$$.fragment),Kt=c(),fe=n("h2"),Je=n("a"),Mt=n("span"),b(uo.$$.fragment),pa=c(),$t=n("span"),ha=i("FromSingleFileMixin"),er=c(),O=n("div"),b(go.$$.fragment),ua=c(),me=n("p"),ga=i("Load model weights saved in the "),Lt=n("code"),_a=i(".ckpt"),va=i(" format into a "),Ao=n("a"),ba=i("DiffusionPipeline"),xa=i("."),ya=c(),Q=n("div"),b(_o.$$.fragment),wa=c(),S=n("p"),Ma=i("Instantiate a "),Zo=n("a"),$a=i("DiffusionPipeline"),La=i(" from pretrained pipeline weights saved in the "),Tt=n("code"),Ta=i(".ckpt"),ka=i(" or "),kt=n("code"),Ea=i(".safetensors"),Ua=i(`
format. The pipeline is set in evaluation mode (`),Et=n("code"),Fa=i("model.eval()"),Ca=i(") by default."),Ia=c(),b(De.$$.fragment),or=c(),pe=n("h2"),Ae=n("a"),Ut=n("span"),b(vo.$$.fragment),Ja=c(),Ft=n("span"),Da=i("FromOriginalControlnetMixin"),tr=c(),he=n("div"),b(bo.$$.fragment),Aa=c(),K=n("div"),b(xo.$$.fragment),Za=c(),W=n("p"),Na=i("Instantiate a "),No=n("a"),Sa=i("ControlNetModel"),Wa=i(" from pretrained controlnet weights saved in the original "),Ct=n("code"),ja=i(".ckpt"),Ga=i(` or
`),It=n("code"),Pa=i(".safetensors"),Ra=i(" format. The pipeline is set in evaluation mode ("),Jt=n("code"),Va=i("model.eval()"),Ba=i(") by default."),qa=c(),b(Ze.$$.fragment),rr=c(),ue=n("h2"),Ne=n("a"),Dt=n("span"),b(yo.$$.fragment),Ya=c(),At=n("span"),Oa=i("FromOriginalVAEMixin"),nr=c(),ge=n("div"),b(wo.$$.fragment),za=c(),P=n("div"),b(Mo.$$.fragment),Ha=c(),j=n("p"),Xa=i("Instantiate a "),So=n("a"),Qa=i("AutoencoderKL"),Ka=i(" from pretrained controlnet weights saved in the original "),Zt=n("code"),es=i(".ckpt"),os=i(` or
`),Nt=n("code"),ts=i(".safetensors"),rs=i(" format. The pipeline is format. The pipeline is set in evaluation mode ("),St=n("code"),ns=i("model.eval()"),as=i(`) by
default.`),ss=c(),b(Se.$$.fragment),is=c(),b(We.$$.fragment),this.h()},l(o){const g=_i('[data-svelte="svelte-1phssyn"]',document.head);d=a(g,"META",{name:!0,content:!0}),g.forEach(t),L=f(o),u=a(o,"H1",{class:!0});var $o=s(u);m=a($o,"A",{id:!0,class:!0,href:!0});var Wt=s(m);_=a(Wt,"SPAN",{});var jt=s(_);x(r.$$.fragment,jt),jt.forEach(t),Wt.forEach(t),h=f($o),F=a($o,"SPAN",{});var Gt=s(F);A=l(Gt,"Loaders"),Gt.forEach(t),$o.forEach(t),G=f(o),C=a(o,"P",{});var Lo=s(C);Z=l(Lo,"Adapters (textual inversion, LoRA, hypernetworks) allow you to modify a diffusion model to generate images in a specific style without training or finetuning the entire model. The adapter weights are typically only a tiny fraction of the pretrained model\u2019s which making them very portable. \u{1F917} Diffusers provides an easy-to-use "),T=a(Lo,"CODE",{});var Pt=s(T);re=l(Pt,"LoaderMixin"),Pt.forEach(t),ne=l(Lo," API to load adapter weights."),Lo.forEach(t),z=f(o),x(_e.$$.fragment,o),Yt=f(o),ae=a(o,"H2",{class:!0});var To=s(ae);ve=a(To,"A",{id:!0,class:!0,href:!0});var Rt=s(ve);Qo=a(Rt,"SPAN",{});var Vt=s(Qo);x(Ve.$$.fragment,Vt),Vt.forEach(t),Rt.forEach(t),$r=f(To),Ko=a(To,"SPAN",{});var ds=s(Ko);Lr=l(ds,"UNet2DConditionLoadersMixin"),ds.forEach(t),To.forEach(t),Ot=f(o),B=a(o,"DIV",{class:!0});var Wo=s(B);x(Be.$$.fragment,Wo),Tr=f(Wo),be=a(Wo,"DIV",{class:!0});var sr=s(be);x(qe.$$.fragment,sr),kr=f(sr),q=a(sr,"P",{});var je=s(q);Er=l(je,"Load pretrained attention processor layers into "),Eo=a(je,"A",{href:!0});var cs=s(Eo);Ur=l(cs,"UNet2DConditionModel"),cs.forEach(t),Fr=l(je,`. Attention processor layers have to be
defined in
`),Ye=a(je,"A",{href:!0,rel:!0});var fs=s(Ye);et=a(fs,"CODE",{});var ms=s(et);Cr=l(ms,"cross_attention.py"),ms.forEach(t),fs.forEach(t),Ir=l(je,`
and be a `),ot=a(je,"CODE",{});var ps=s(ot);Jr=l(ps,"torch.nn.Module"),ps.forEach(t),Dr=l(je," class."),je.forEach(t),sr.forEach(t),Ar=f(Wo),xe=a(Wo,"DIV",{class:!0});var ir=s(xe);x(Oe.$$.fragment,ir),Zr=f(ir),ze=a(ir,"P",{});var lr=s(ze);Nr=l(lr,`Save an attention processor to a directory so that it can be reloaded using the
`),Uo=a(lr,"A",{href:!0});var hs=s(Uo);Sr=l(hs,"load_attn_procs()"),hs.forEach(t),Wr=l(lr," method."),lr.forEach(t),ir.forEach(t),Wo.forEach(t),zt=f(o),se=a(o,"H2",{class:!0});var dr=s(se);ye=a(dr,"A",{id:!0,class:!0,href:!0});var us=s(ye);tt=a(us,"SPAN",{});var gs=s(tt);x(He.$$.fragment,gs),gs.forEach(t),us.forEach(t),jr=f(dr),rt=a(dr,"SPAN",{});var _s=s(rt);Gr=l(_s,"TextualInversionLoaderMixin"),_s.forEach(t),dr.forEach(t),Ht=f(o),N=a(o,"DIV",{class:!0});var Ge=s(N);x(Xe.$$.fragment,Ge),Pr=f(Ge),nt=a(Ge,"P",{});var vs=s(nt);Rr=l(vs,"Load textual inversion tokens and embeddings to the tokenizer and text encoder."),vs.forEach(t),Vr=f(Ge),I=a(Ge,"DIV",{class:!0});var R=s(I);x(Qe.$$.fragment,R),Br=f(R),Ke=a(R,"P",{});var cr=s(Ke);qr=l(cr,"Load textual inversion embeddings into the text encoder of "),Fo=a(cr,"A",{href:!0});var bs=s(Fo);Yr=l(bs,"StableDiffusionPipeline"),bs.forEach(t),Or=l(cr,` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),cr.forEach(t),zr=f(R),at=a(R,"P",{});var xs=s(at);Hr=l(xs,"Example:"),xs.forEach(t),Xr=f(R),x(we.$$.fragment,R),Qr=f(R),eo=a(R,"P",{});var fr=s(eo);Kr=l(fr,`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),oo=a(fr,"A",{href:!0,rel:!0});var ys=s(oo);en=l(ys,"civitAI"),ys.forEach(t),on=l(fr,") and then load the vector"),fr.forEach(t),tn=f(R),x(Me.$$.fragment,R),R.forEach(t),rn=f(Ge),$e=a(Ge,"DIV",{class:!0});var mr=s($e);x(to.$$.fragment,mr),nn=f(mr),st=a(mr,"P",{});var ws=s(st);an=l(ws,`Processes prompts that include a special token corresponding to a multi-vector textual inversion embedding to
be replaced with multiple special tokens each corresponding to one of the vectors. If the prompt has no textual
inversion token or if the textual inversion token is a single vector, the input prompt is returned.`),ws.forEach(t),mr.forEach(t),Ge.forEach(t),Xt=f(o),ie=a(o,"H2",{class:!0});var pr=s(ie);Le=a(pr,"A",{id:!0,class:!0,href:!0});var Ms=s(Le);it=a(Ms,"SPAN",{});var $s=s(it);x(ro.$$.fragment,$s),$s.forEach(t),Ms.forEach(t),sn=f(pr),lt=a(pr,"SPAN",{});var Ls=s(lt);ln=l(Ls,"LoraLoaderMixin"),Ls.forEach(t),pr.forEach(t),Qt=f(o),k=a(o,"DIV",{class:!0});var D=s(k);x(no.$$.fragment,D),dn=f(D),le=a(D,"P",{});var jo=s(le);cn=l(jo,"Load LoRA layers into "),Co=a(jo,"A",{href:!0});var Ts=s(Co);fn=l(Ts,"UNet2DConditionModel"),Ts.forEach(t),mn=l(jo,` and
`),ao=a(jo,"A",{href:!0,rel:!0});var ks=s(ao);dt=a(ks,"CODE",{});var Es=s(dt);pn=l(Es,"CLIPTextModel"),Es.forEach(t),ks.forEach(t),hn=l(jo,"."),jo.forEach(t),un=f(D),Te=a(D,"DIV",{class:!0});var hr=s(Te);x(so.$$.fragment,hr),gn=f(hr),ke=a(hr,"P",{});var Bt=s(ke);_n=l(Bt,"This will load the LoRA layers specified in "),ct=a(Bt,"CODE",{});var Us=s(ct);vn=l(Us,"state_dict"),Us.forEach(t),bn=l(Bt," into "),ft=a(Bt,"CODE",{});var Fs=s(ft);xn=l(Fs,"text_encoder"),Fs.forEach(t),Bt.forEach(t),hr.forEach(t),yn=f(D),Ee=a(D,"DIV",{class:!0});var ur=s(Ee);x(io.$$.fragment,ur),wn=f(ur),Ue=a(ur,"P",{});var qt=s(Ue);Mn=l(qt,"This will load the LoRA layers specified in "),mt=a(qt,"CODE",{});var Cs=s(mt);$n=l(Cs,"state_dict"),Cs.forEach(t),Ln=l(qt," into "),pt=a(qt,"CODE",{});var Is=s(pt);Tn=l(Is,"unet"),Is.forEach(t),qt.forEach(t),ur.forEach(t),kn=f(D),J=a(D,"DIV",{class:!0});var V=s(J);x(lo.$$.fragment,V),En=f(V),Y=a(V,"P",{});var Pe=s(Y);Un=l(Pe,"Load LoRA weights specified in "),ht=a(Pe,"CODE",{});var Js=s(ht);Fn=l(Js,"pretrained_model_name_or_path_or_dict"),Js.forEach(t),Cn=l(Pe," into "),ut=a(Pe,"CODE",{});var Ds=s(ut);In=l(Ds,"self.unet"),Ds.forEach(t),Jn=l(Pe,` and
`),gt=a(Pe,"CODE",{});var As=s(gt);Dn=l(As,"self.text_encoder"),As.forEach(t),An=l(Pe,"."),Pe.forEach(t),Zn=f(V),co=a(V,"P",{});var gr=s(co);Nn=l(gr,"All kwargs are forwarded to "),_t=a(gr,"CODE",{});var Zs=s(_t);Sn=l(Zs,"self.lora_state_dict"),Zs.forEach(t),Wn=l(gr,"."),gr.forEach(t),jn=f(V),fo=a(V,"P",{});var _r=s(fo);Gn=l(_r,"See "),Io=a(_r,"A",{href:!0});var Ns=s(Io);Pn=l(Ns,"lora_state_dict()"),Ns.forEach(t),Rn=l(_r," for more details on how the state dict is loaded."),_r.forEach(t),Vn=f(V),de=a(V,"P",{});var Go=s(de);Bn=l(Go,"See "),Jo=a(Go,"A",{href:!0});var Ss=s(Jo);qn=l(Ss,"load_lora_into_unet()"),Ss.forEach(t),Yn=l(Go,` for more details on how the state dict is loaded into
`),vt=a(Go,"CODE",{});var Ws=s(vt);On=l(Ws,"self.unet"),Ws.forEach(t),zn=l(Go,"."),Go.forEach(t),Hn=f(V),ce=a(V,"P",{});var Po=s(ce);Xn=l(Po,"See "),Do=a(Po,"A",{href:!0});var js=s(Do);Qn=l(js,"load_lora_into_text_encoder()"),js.forEach(t),Kn=l(Po,` for more details on how the state dict is loaded
into `),bt=a(Po,"CODE",{});var Gs=s(bt);ea=l(Gs,"self.text_encoder"),Gs.forEach(t),oa=l(Po,"."),Po.forEach(t),V.forEach(t),ta=f(D),H=a(D,"DIV",{class:!0});var Ro=s(H);x(mo.$$.fragment,Ro),ra=f(Ro),xt=a(Ro,"P",{});var Ps=s(xt);na=l(Ps,"Return state dict for lora weights"),Ps.forEach(t),aa=f(Ro),x(Fe.$$.fragment,Ro),Ro.forEach(t),sa=f(D),Ce=a(D,"DIV",{class:!0});var vr=s(Ce);x(po.$$.fragment,vr),ia=f(vr),yt=a(vr,"P",{});var Rs=s(yt);la=l(Rs,"Save the LoRA parameters corresponding to the UNet and text encoder."),Rs.forEach(t),vr.forEach(t),da=f(D),X=a(D,"DIV",{class:!0});var Vo=s(X);x(ho.$$.fragment,Vo),ca=f(Vo),wt=a(Vo,"P",{});var Vs=s(wt);fa=l(Vs,"Unloads the LoRA parameters."),Vs.forEach(t),ma=f(Vo),x(Ie.$$.fragment,Vo),Vo.forEach(t),D.forEach(t),Kt=f(o),fe=a(o,"H2",{class:!0});var br=s(fe);Je=a(br,"A",{id:!0,class:!0,href:!0});var Bs=s(Je);Mt=a(Bs,"SPAN",{});var qs=s(Mt);x(uo.$$.fragment,qs),qs.forEach(t),Bs.forEach(t),pa=f(br),$t=a(br,"SPAN",{});var Ys=s($t);ha=l(Ys,"FromSingleFileMixin"),Ys.forEach(t),br.forEach(t),er=f(o),O=a(o,"DIV",{class:!0});var Bo=s(O);x(go.$$.fragment,Bo),ua=f(Bo),me=a(Bo,"P",{});var qo=s(me);ga=l(qo,"Load model weights saved in the "),Lt=a(qo,"CODE",{});var Os=s(Lt);_a=l(Os,".ckpt"),Os.forEach(t),va=l(qo," format into a "),Ao=a(qo,"A",{href:!0});var zs=s(Ao);ba=l(zs,"DiffusionPipeline"),zs.forEach(t),xa=l(qo,"."),qo.forEach(t),ya=f(Bo),Q=a(Bo,"DIV",{class:!0});var Yo=s(Q);x(_o.$$.fragment,Yo),wa=f(Yo),S=a(Yo,"P",{});var ee=s(S);Ma=l(ee,"Instantiate a "),Zo=a(ee,"A",{href:!0});var Hs=s(Zo);$a=l(Hs,"DiffusionPipeline"),Hs.forEach(t),La=l(ee," from pretrained pipeline weights saved in the "),Tt=a(ee,"CODE",{});var Xs=s(Tt);Ta=l(Xs,".ckpt"),Xs.forEach(t),ka=l(ee," or "),kt=a(ee,"CODE",{});var Qs=s(kt);Ea=l(Qs,".safetensors"),Qs.forEach(t),Ua=l(ee,`
format. The pipeline is set in evaluation mode (`),Et=a(ee,"CODE",{});var Ks=s(Et);Fa=l(Ks,"model.eval()"),Ks.forEach(t),Ca=l(ee,") by default."),ee.forEach(t),Ia=f(Yo),x(De.$$.fragment,Yo),Yo.forEach(t),Bo.forEach(t),or=f(o),pe=a(o,"H2",{class:!0});var xr=s(pe);Ae=a(xr,"A",{id:!0,class:!0,href:!0});var ei=s(Ae);Ut=a(ei,"SPAN",{});var oi=s(Ut);x(vo.$$.fragment,oi),oi.forEach(t),ei.forEach(t),Ja=f(xr),Ft=a(xr,"SPAN",{});var ti=s(Ft);Da=l(ti,"FromOriginalControlnetMixin"),ti.forEach(t),xr.forEach(t),tr=f(o),he=a(o,"DIV",{class:!0});var yr=s(he);x(bo.$$.fragment,yr),Aa=f(yr),K=a(yr,"DIV",{class:!0});var Oo=s(K);x(xo.$$.fragment,Oo),Za=f(Oo),W=a(Oo,"P",{});var oe=s(W);Na=l(oe,"Instantiate a "),No=a(oe,"A",{href:!0});var ri=s(No);Sa=l(ri,"ControlNetModel"),ri.forEach(t),Wa=l(oe," from pretrained controlnet weights saved in the original "),Ct=a(oe,"CODE",{});var ni=s(Ct);ja=l(ni,".ckpt"),ni.forEach(t),Ga=l(oe,` or
`),It=a(oe,"CODE",{});var ai=s(It);Pa=l(ai,".safetensors"),ai.forEach(t),Ra=l(oe," format. The pipeline is set in evaluation mode ("),Jt=a(oe,"CODE",{});var si=s(Jt);Va=l(si,"model.eval()"),si.forEach(t),Ba=l(oe,") by default."),oe.forEach(t),qa=f(Oo),x(Ze.$$.fragment,Oo),Oo.forEach(t),yr.forEach(t),rr=f(o),ue=a(o,"H2",{class:!0});var wr=s(ue);Ne=a(wr,"A",{id:!0,class:!0,href:!0});var ii=s(Ne);Dt=a(ii,"SPAN",{});var li=s(Dt);x(yo.$$.fragment,li),li.forEach(t),ii.forEach(t),Ya=f(wr),At=a(wr,"SPAN",{});var di=s(At);Oa=l(di,"FromOriginalVAEMixin"),di.forEach(t),wr.forEach(t),nr=f(o),ge=a(o,"DIV",{class:!0});var Mr=s(ge);x(wo.$$.fragment,Mr),za=f(Mr),P=a(Mr,"DIV",{class:!0});var Re=s(P);x(Mo.$$.fragment,Re),Ha=f(Re),j=a(Re,"P",{});var te=s(j);Xa=l(te,"Instantiate a "),So=a(te,"A",{href:!0});var ci=s(So);Qa=l(ci,"AutoencoderKL"),ci.forEach(t),Ka=l(te," from pretrained controlnet weights saved in the original "),Zt=a(te,"CODE",{});var fi=s(Zt);es=l(fi,".ckpt"),fi.forEach(t),os=l(te,` or
`),Nt=a(te,"CODE",{});var mi=s(Nt);ts=l(mi,".safetensors"),mi.forEach(t),rs=l(te," format. The pipeline is format. The pipeline is set in evaluation mode ("),St=a(te,"CODE",{});var pi=s(St);ns=l(pi,"model.eval()"),pi.forEach(t),as=l(te,`) by
default.`),te.forEach(t),ss=f(Re),x(Se.$$.fragment,Re),is=f(Re),x(We.$$.fragment,Re),Re.forEach(t),Mr.forEach(t),this.h()},h(){p(d,"name","hf:doc:metadata"),p(d,"content",JSON.stringify(Ui)),p(m,"id","loaders"),p(m,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(m,"href","#loaders"),p(u,"class","relative group"),p(ve,"id","diffusers.loaders.UNet2DConditionLoadersMixin"),p(ve,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(ve,"href","#diffusers.loaders.UNet2DConditionLoadersMixin"),p(ae,"class","relative group"),p(Eo,"href","/docs/diffusers/v0.19.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel"),p(Ye,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py"),p(Ye,"rel","nofollow"),p(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Uo,"href","/docs/diffusers/v0.19.0/en/api/loaders#diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs"),p(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ye,"id","diffusers.loaders.TextualInversionLoaderMixin"),p(ye,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(ye,"href","#diffusers.loaders.TextualInversionLoaderMixin"),p(se,"class","relative group"),p(Fo,"href","/docs/diffusers/v0.19.0/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),p(oo,"href","https://civitai.com/models/3036?modelVersionId=9857"),p(oo,"rel","nofollow"),p(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Le,"id","diffusers.loaders.LoraLoaderMixin"),p(Le,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Le,"href","#diffusers.loaders.LoraLoaderMixin"),p(ie,"class","relative group"),p(Co,"href","/docs/diffusers/v0.19.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel"),p(ao,"href","https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel"),p(ao,"rel","nofollow"),p(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Io,"href","/docs/diffusers/v0.19.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict"),p(Jo,"href","/docs/diffusers/v0.19.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.load_lora_into_unet"),p(Do,"href","/docs/diffusers/v0.19.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.load_lora_into_text_encoder"),p(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Je,"id","diffusers.loaders.FromSingleFileMixin"),p(Je,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Je,"href","#diffusers.loaders.FromSingleFileMixin"),p(fe,"class","relative group"),p(Ao,"href","/docs/diffusers/v0.19.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),p(Zo,"href","/docs/diffusers/v0.19.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),p(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ae,"id","diffusers.loaders.FromOriginalControlnetMixin"),p(Ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Ae,"href","#diffusers.loaders.FromOriginalControlnetMixin"),p(pe,"class","relative group"),p(No,"href","/docs/diffusers/v0.19.0/en/api/models/controlnet#diffusers.ControlNetModel"),p(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ne,"id","diffusers.loaders.FromOriginalVAEMixin"),p(Ne,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Ne,"href","#diffusers.loaders.FromOriginalVAEMixin"),p(ue,"class","relative group"),p(So,"href","/docs/diffusers/v0.19.0/en/api/models/autoencoderkl#diffusers.AutoencoderKL"),p(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,g){e(document.head,d),v(o,L,g),v(o,u,g),e(u,m),e(m,_),y(r,_,null),e(u,h),e(u,F),e(F,A),v(o,G,g),v(o,C,g),e(C,Z),e(C,T),e(T,re),e(C,ne),v(o,z,g),y(_e,o,g),v(o,Yt,g),v(o,ae,g),e(ae,ve),e(ve,Qo),y(Ve,Qo,null),e(ae,$r),e(ae,Ko),e(Ko,Lr),v(o,Ot,g),v(o,B,g),y(Be,B,null),e(B,Tr),e(B,be),y(qe,be,null),e(be,kr),e(be,q),e(q,Er),e(q,Eo),e(Eo,Ur),e(q,Fr),e(q,Ye),e(Ye,et),e(et,Cr),e(q,Ir),e(q,ot),e(ot,Jr),e(q,Dr),e(B,Ar),e(B,xe),y(Oe,xe,null),e(xe,Zr),e(xe,ze),e(ze,Nr),e(ze,Uo),e(Uo,Sr),e(ze,Wr),v(o,zt,g),v(o,se,g),e(se,ye),e(ye,tt),y(He,tt,null),e(se,jr),e(se,rt),e(rt,Gr),v(o,Ht,g),v(o,N,g),y(Xe,N,null),e(N,Pr),e(N,nt),e(nt,Rr),e(N,Vr),e(N,I),y(Qe,I,null),e(I,Br),e(I,Ke),e(Ke,qr),e(Ke,Fo),e(Fo,Yr),e(Ke,Or),e(I,zr),e(I,at),e(at,Hr),e(I,Xr),y(we,I,null),e(I,Qr),e(I,eo),e(eo,Kr),e(eo,oo),e(oo,en),e(eo,on),e(I,tn),y(Me,I,null),e(N,rn),e(N,$e),y(to,$e,null),e($e,nn),e($e,st),e(st,an),v(o,Xt,g),v(o,ie,g),e(ie,Le),e(Le,it),y(ro,it,null),e(ie,sn),e(ie,lt),e(lt,ln),v(o,Qt,g),v(o,k,g),y(no,k,null),e(k,dn),e(k,le),e(le,cn),e(le,Co),e(Co,fn),e(le,mn),e(le,ao),e(ao,dt),e(dt,pn),e(le,hn),e(k,un),e(k,Te),y(so,Te,null),e(Te,gn),e(Te,ke),e(ke,_n),e(ke,ct),e(ct,vn),e(ke,bn),e(ke,ft),e(ft,xn),e(k,yn),e(k,Ee),y(io,Ee,null),e(Ee,wn),e(Ee,Ue),e(Ue,Mn),e(Ue,mt),e(mt,$n),e(Ue,Ln),e(Ue,pt),e(pt,Tn),e(k,kn),e(k,J),y(lo,J,null),e(J,En),e(J,Y),e(Y,Un),e(Y,ht),e(ht,Fn),e(Y,Cn),e(Y,ut),e(ut,In),e(Y,Jn),e(Y,gt),e(gt,Dn),e(Y,An),e(J,Zn),e(J,co),e(co,Nn),e(co,_t),e(_t,Sn),e(co,Wn),e(J,jn),e(J,fo),e(fo,Gn),e(fo,Io),e(Io,Pn),e(fo,Rn),e(J,Vn),e(J,de),e(de,Bn),e(de,Jo),e(Jo,qn),e(de,Yn),e(de,vt),e(vt,On),e(de,zn),e(J,Hn),e(J,ce),e(ce,Xn),e(ce,Do),e(Do,Qn),e(ce,Kn),e(ce,bt),e(bt,ea),e(ce,oa),e(k,ta),e(k,H),y(mo,H,null),e(H,ra),e(H,xt),e(xt,na),e(H,aa),y(Fe,H,null),e(k,sa),e(k,Ce),y(po,Ce,null),e(Ce,ia),e(Ce,yt),e(yt,la),e(k,da),e(k,X),y(ho,X,null),e(X,ca),e(X,wt),e(wt,fa),e(X,ma),y(Ie,X,null),v(o,Kt,g),v(o,fe,g),e(fe,Je),e(Je,Mt),y(uo,Mt,null),e(fe,pa),e(fe,$t),e($t,ha),v(o,er,g),v(o,O,g),y(go,O,null),e(O,ua),e(O,me),e(me,ga),e(me,Lt),e(Lt,_a),e(me,va),e(me,Ao),e(Ao,ba),e(me,xa),e(O,ya),e(O,Q),y(_o,Q,null),e(Q,wa),e(Q,S),e(S,Ma),e(S,Zo),e(Zo,$a),e(S,La),e(S,Tt),e(Tt,Ta),e(S,ka),e(S,kt),e(kt,Ea),e(S,Ua),e(S,Et),e(Et,Fa),e(S,Ca),e(Q,Ia),y(De,Q,null),v(o,or,g),v(o,pe,g),e(pe,Ae),e(Ae,Ut),y(vo,Ut,null),e(pe,Ja),e(pe,Ft),e(Ft,Da),v(o,tr,g),v(o,he,g),y(bo,he,null),e(he,Aa),e(he,K),y(xo,K,null),e(K,Za),e(K,W),e(W,Na),e(W,No),e(No,Sa),e(W,Wa),e(W,Ct),e(Ct,ja),e(W,Ga),e(W,It),e(It,Pa),e(W,Ra),e(W,Jt),e(Jt,Va),e(W,Ba),e(K,qa),y(Ze,K,null),v(o,rr,g),v(o,ue,g),e(ue,Ne),e(Ne,Dt),y(yo,Dt,null),e(ue,Ya),e(ue,At),e(At,Oa),v(o,nr,g),v(o,ge,g),y(wo,ge,null),e(ge,za),e(ge,P),y(Mo,P,null),e(P,Ha),e(P,j),e(j,Xa),e(j,So),e(So,Qa),e(j,Ka),e(j,Zt),e(Zt,es),e(j,os),e(j,Nt),e(Nt,ts),e(j,rs),e(j,St),e(St,ns),e(j,as),e(P,ss),y(Se,P,null),e(P,is),y(We,P,null),ar=!0},p(o,[g]){const $o={};g&2&&($o.$$scope={dirty:g,ctx:o}),_e.$set($o);const Wt={};g&2&&(Wt.$$scope={dirty:g,ctx:o}),we.$set(Wt);const jt={};g&2&&(jt.$$scope={dirty:g,ctx:o}),Me.$set(jt);const Gt={};g&2&&(Gt.$$scope={dirty:g,ctx:o}),Fe.$set(Gt);const Lo={};g&2&&(Lo.$$scope={dirty:g,ctx:o}),Ie.$set(Lo);const Pt={};g&2&&(Pt.$$scope={dirty:g,ctx:o}),De.$set(Pt);const To={};g&2&&(To.$$scope={dirty:g,ctx:o}),Ze.$set(To);const Rt={};g&2&&(Rt.$$scope={dirty:g,ctx:o}),Se.$set(Rt);const Vt={};g&2&&(Vt.$$scope={dirty:g,ctx:o}),We.$set(Vt)},i(o){ar||(w(r.$$.fragment,o),w(_e.$$.fragment,o),w(Ve.$$.fragment,o),w(Be.$$.fragment,o),w(qe.$$.fragment,o),w(Oe.$$.fragment,o),w(He.$$.fragment,o),w(Xe.$$.fragment,o),w(Qe.$$.fragment,o),w(we.$$.fragment,o),w(Me.$$.fragment,o),w(to.$$.fragment,o),w(ro.$$.fragment,o),w(no.$$.fragment,o),w(so.$$.fragment,o),w(io.$$.fragment,o),w(lo.$$.fragment,o),w(mo.$$.fragment,o),w(Fe.$$.fragment,o),w(po.$$.fragment,o),w(ho.$$.fragment,o),w(Ie.$$.fragment,o),w(uo.$$.fragment,o),w(go.$$.fragment,o),w(_o.$$.fragment,o),w(De.$$.fragment,o),w(vo.$$.fragment,o),w(bo.$$.fragment,o),w(xo.$$.fragment,o),w(Ze.$$.fragment,o),w(yo.$$.fragment,o),w(wo.$$.fragment,o),w(Mo.$$.fragment,o),w(Se.$$.fragment,o),w(We.$$.fragment,o),ar=!0)},o(o){M(r.$$.fragment,o),M(_e.$$.fragment,o),M(Ve.$$.fragment,o),M(Be.$$.fragment,o),M(qe.$$.fragment,o),M(Oe.$$.fragment,o),M(He.$$.fragment,o),M(Xe.$$.fragment,o),M(Qe.$$.fragment,o),M(we.$$.fragment,o),M(Me.$$.fragment,o),M(to.$$.fragment,o),M(ro.$$.fragment,o),M(no.$$.fragment,o),M(so.$$.fragment,o),M(io.$$.fragment,o),M(lo.$$.fragment,o),M(mo.$$.fragment,o),M(Fe.$$.fragment,o),M(po.$$.fragment,o),M(ho.$$.fragment,o),M(Ie.$$.fragment,o),M(uo.$$.fragment,o),M(go.$$.fragment,o),M(_o.$$.fragment,o),M(De.$$.fragment,o),M(vo.$$.fragment,o),M(bo.$$.fragment,o),M(xo.$$.fragment,o),M(Ze.$$.fragment,o),M(yo.$$.fragment,o),M(wo.$$.fragment,o),M(Mo.$$.fragment,o),M(Se.$$.fragment,o),M(We.$$.fragment,o),ar=!1},d(o){t(d),o&&t(L),o&&t(u),$(r),o&&t(G),o&&t(C),o&&t(z),$(_e,o),o&&t(Yt),o&&t(ae),$(Ve),o&&t(Ot),o&&t(B),$(Be),$(qe),$(Oe),o&&t(zt),o&&t(se),$(He),o&&t(Ht),o&&t(N),$(Xe),$(Qe),$(we),$(Me),$(to),o&&t(Xt),o&&t(ie),$(ro),o&&t(Qt),o&&t(k),$(no),$(so),$(io),$(lo),$(mo),$(Fe),$(po),$(ho),$(Ie),o&&t(Kt),o&&t(fe),$(uo),o&&t(er),o&&t(O),$(go),$(_o),$(De),o&&t(or),o&&t(pe),$(vo),o&&t(tr),o&&t(he),$(bo),$(xo),$(Ze),o&&t(rr),o&&t(ue),$(yo),o&&t(nr),o&&t(ge),$(wo),$(Mo),$(Se),$(We)}}}const Ui={local:"loaders",sections:[{local:"diffusers.loaders.UNet2DConditionLoadersMixin",title:"UNet2DConditionLoadersMixin"},{local:"diffusers.loaders.TextualInversionLoaderMixin",title:"TextualInversionLoaderMixin"},{local:"diffusers.loaders.LoraLoaderMixin",title:"LoraLoaderMixin"},{local:"diffusers.loaders.FromSingleFileMixin",title:"FromSingleFileMixin"},{local:"diffusers.loaders.FromOriginalControlnetMixin",title:"FromOriginalControlnetMixin"},{local:"diffusers.loaders.FromOriginalVAEMixin",title:"FromOriginalVAEMixin"}],title:"Loaders"};function Fi(E){return vi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ni extends hi{constructor(d){super();ui(this,d,Fi,Ei,gi,{})}}export{Ni as default,Ui as metadata};
