import{S as ji,i as Ri,s as Gi,e as r,k as f,w as b,t as i,M as Vi,c as n,d as t,m,a,x as y,h as l,b as p,G as e,g as v,y as w,q as M,o as $,B as T,v as zi,L as it}from"../../chunks/vendor-hf-doc-builder.js";import{T as sr}from"../../chunks/Tip-hf-doc-builder.js";import{D as U}from"../../chunks/Docstring-hf-doc-builder.js";import{C as lt}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as No}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as st}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Bi(E){let d,_,h,c,x,s,u,F,A,j,C;return{c(){d=r("p"),_=i("\u{1F9EA} The "),h=r("code"),c=i("LoaderMixins"),x=i(" are highly experimental and prone to future changes. To use private or "),s=r("a"),u=i("gated"),F=i(" models, log-in with "),A=r("code"),j=i("huggingface-cli login"),C=i("."),this.h()},l(N){d=n(N,"P",{});var L=a(d);_=l(L,"\u{1F9EA} The "),h=n(L,"CODE",{});var ae=a(h);c=l(ae,"LoaderMixins"),ae.forEach(t),x=l(L," are highly experimental and prone to future changes. To use private or "),s=n(L,"A",{href:!0,rel:!0});var se=a(s);u=l(se,"gated"),se.forEach(t),F=l(L," models, log-in with "),A=n(L,"CODE",{});var O=a(A);j=l(O,"huggingface-cli login"),O.forEach(t),C=l(L,"."),L.forEach(t),this.h()},h(){p(s,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),p(s,"rel","nofollow")},m(N,L){v(N,d,L),e(d,_),e(d,h),e(h,c),e(d,x),e(d,s),e(s,u),e(d,F),e(d,A),e(A,j),e(d,C)},d(N){N&&t(d)}}}function qi(E){let d,_,h,c,x;return c=new lt({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=r("p"),_=i("To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),h=f(),b(c.$$.fragment)},l(s){d=n(s,"P",{});var u=a(d);_=l(u,"To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),u.forEach(t),h=m(s),y(c.$$.fragment,s)},m(s,u){v(s,d,u),e(d,_),v(s,h,u),w(c,s,u),x=!0},p:it,i(s){x||(M(c.$$.fragment,s),x=!0)},o(s){$(c.$$.fragment,s),x=!1},d(s){s&&t(d),s&&t(h),T(c,s)}}}function Yi(E){let d,_,h,c,x;return c=new lt({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=r("p"),_=i("locally:"),h=f(),b(c.$$.fragment)},l(s){d=n(s,"P",{});var u=a(d);_=l(u,"locally:"),u.forEach(t),h=m(s),y(c.$$.fragment,s)},m(s,u){v(s,d,u),e(d,_),v(s,h,u),w(c,s,u),x=!0},p:it,i(s){x||(M(c.$$.fragment,s),x=!0)},o(s){$(c.$$.fragment,s),x=!1},d(s){s&&t(d),s&&t(h),T(c,s)}}}function Oi(E){let d,_;return{c(){d=r("p"),_=i("This is an experimental API.")},l(h){d=n(h,"P",{});var c=a(d);_=l(c,"This is an experimental API."),c.forEach(t)},m(h,c){v(h,d,c),e(d,_)},d(h){h&&t(d)}}}function Hi(E){let d,_,h,c,x;return{c(){d=r("p"),_=i("We support loading A1111 formatted LoRA checkpoints in a limited capacity."),h=f(),c=r("p"),x=i("This function is experimental and might change in the future.")},l(s){d=n(s,"P",{});var u=a(d);_=l(u,"We support loading A1111 formatted LoRA checkpoints in a limited capacity."),u.forEach(t),h=m(s),c=n(s,"P",{});var F=a(c);x=l(F,"This function is experimental and might change in the future."),F.forEach(t)},m(s,u){v(s,d,u),e(d,_),v(s,h,u),v(s,c,u),e(c,x)},d(s){s&&t(d),s&&t(h),s&&t(c)}}}function Xi(E){let d,_;return{c(){d=r("p"),_=i("This is an experimental API.")},l(h){d=n(h,"P",{});var c=a(d);_=l(c,"This is an experimental API."),c.forEach(t)},m(h,c){v(h,d,c),e(d,_)},d(h){h&&t(d)}}}function Qi(E){let d,_,h,c,x;return c=new lt({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=r("p"),_=i("Examples:"),h=f(),b(c.$$.fragment)},l(s){d=n(s,"P",{});var u=a(d);_=l(u,"Examples:"),u.forEach(t),h=m(s),y(c.$$.fragment,s)},m(s,u){v(s,d,u),e(d,_),v(s,h,u),w(c,s,u),x=!0},p:it,i(s){x||(M(c.$$.fragment,s),x=!0)},o(s){$(c.$$.fragment,s),x=!1},d(s){s&&t(d),s&&t(h),T(c,s)}}}function Ki(E){let d,_,h,c,x;return c=new lt({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=r("p"),_=i("Examples:"),h=f(),b(c.$$.fragment)},l(s){d=n(s,"P",{});var u=a(d);_=l(u,"Examples:"),u.forEach(t),h=m(s),y(c.$$.fragment,s)},m(s,u){v(s,d,u),e(d,_),v(s,h,u),w(c,s,u),x=!0},p:it,i(s){x||(M(c.$$.fragment,s),x=!0)},o(s){$(c.$$.fragment,s),x=!1},d(s){s&&t(d),s&&t(h),T(c,s)}}}function el(E){let d,_,h,c,x;return c=new lt({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=r("p"),_=i("Examples:"),h=f(),b(c.$$.fragment)},l(s){d=n(s,"P",{});var u=a(d);_=l(u,"Examples:"),u.forEach(t),h=m(s),y(c.$$.fragment,s)},m(s,u){v(s,d,u),e(d,_),v(s,h,u),w(c,s,u),x=!0},p:it,i(s){x||(M(c.$$.fragment,s),x=!0)},o(s){$(c.$$.fragment,s),x=!1},d(s){s&&t(d),s&&t(h),T(c,s)}}}function ol(E){let d,_,h,c,x,s,u,F,A,j,C;return{c(){d=r("p"),_=i("Make sure to pass both "),h=r("code"),c=i("image_size"),x=i(" and "),s=r("code"),u=i("scaling_factor"),F=i(" to "),A=r("code"),j=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(N){d=n(N,"P",{});var L=a(d);_=l(L,"Make sure to pass both "),h=n(L,"CODE",{});var ae=a(h);c=l(ae,"image_size"),ae.forEach(t),x=l(L," and "),s=n(L,"CODE",{});var se=a(s);u=l(se,"scaling_factor"),se.forEach(t),F=l(L," to "),A=n(L,"CODE",{});var O=a(A);j=l(O,"from_single_file()"),O.forEach(t),C=l(L,` if you want to load
a VAE that does accompany a stable diffusion model of v2 or higher or SDXL.`),L.forEach(t)},m(N,L){v(N,d,L),e(d,_),e(d,h),e(h,c),e(d,x),e(d,s),e(s,u),e(d,F),e(d,A),e(A,j),e(d,C)},d(N){N&&t(d)}}}function tl(E){let d,_,h,c,x;return c=new lt({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=r("p"),_=i("Examples:"),h=f(),b(c.$$.fragment)},l(s){d=n(s,"P",{});var u=a(d);_=l(u,"Examples:"),u.forEach(t),h=m(s),y(c.$$.fragment,s)},m(s,u){v(s,d,u),e(d,_),v(s,h,u),w(c,s,u),x=!0},p:it,i(s){x||(M(c.$$.fragment,s),x=!0)},o(s){$(c.$$.fragment,s),x=!1},d(s){s&&t(d),s&&t(h),T(c,s)}}}function rl(E){let d,_,h,c,x,s,u,F,A,j,C,N,L,ae,se,O,ye,ir,ie,we,dt,Oe,Wr,ct,Pr,lr,z,He,jr,Me,Xe,Rr,B,Gr,So,Vr,zr,Qe,ft,Br,qr,mt,Yr,Or,Hr,$e,Ke,Xr,eo,Qr,Zo,Kr,en,dr,le,Te,pt,oo,on,ht,tn,cr,S,to,rn,ut,nn,an,J,ro,sn,no,ln,Wo,dn,cn,fn,gt,mn,pn,Le,hn,ao,un,so,gn,_n,vn,ke,xn,Ee,io,bn,_t,yn,fr,de,Ue,vt,lo,wn,xt,Mn,mr,k,co,$n,ce,Tn,Po,Ln,kn,fo,bt,En,Un,In,H,mo,Fn,yt,Cn,Jn,Ie,Dn,Fe,po,An,Ce,Nn,wt,Sn,Zn,Mt,Wn,Pn,Je,ho,jn,fe,Rn,$t,Gn,Vn,Tt,zn,Bn,qn,D,uo,Yn,q,On,Lt,Hn,Xn,kt,Qn,Kn,Et,ea,oa,ta,go,ra,Ut,na,aa,sa,_o,ia,jo,la,da,ca,me,fa,Ro,ma,pa,It,ha,ua,ga,pe,_a,Go,va,xa,Ft,ba,ya,wa,X,vo,Ma,Ct,$a,Ta,De,La,Ae,xo,ka,Jt,Ea,Ua,Q,bo,Ia,yo,Fa,wo,Dt,Ca,Ja,Da,Ne,Aa,K,Mo,Na,At,Sa,Za,Se,pr,he,Ze,Nt,$o,Wa,St,Pa,hr,Y,To,ja,ue,Ra,Zt,Ga,Va,Vo,za,Ba,qa,ee,Lo,Ya,Z,Oa,zo,Ha,Xa,Wt,Qa,Ka,Pt,es,os,jt,ts,rs,ns,We,ur,ge,Pe,Rt,ko,as,Gt,ss,gr,_e,Eo,is,oe,Uo,ls,W,ds,Bo,cs,fs,Vt,ms,ps,zt,hs,us,Bt,gs,_s,vs,je,_r,ve,Re,qt,Io,xs,Yt,bs,vr,xe,Fo,ys,R,Co,ws,P,Ms,qo,$s,Ts,Ot,Ls,ks,Ht,Es,Us,Xt,Is,Fs,Cs,Ge,Js,Ve,xr;return s=new No({}),ye=new sr({props:{warning:!0,$$slots:{default:[Bi]},$$scope:{ctx:E}}}),Oe=new No({}),He=new U({props:{name:"class diffusers.loaders.UNet2DConditionLoadersMixin",anchor:"diffusers.loaders.UNet2DConditionLoadersMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L235"}}),Xe=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.21.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.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code> if torch version &gt;= 1.9.0 else <code>False</code>) &#x2014;
Speed up model loading only loading the pretrained weights and not initializing the weights. This also
tries to not use more than 1x model size in CPU memory (including peak memory) while loading the model.
Only supported for PyTorch &gt;= 1.9.0. If you are using an older version of PyTorch, setting this
argument to <code>True</code> will raise an error.`,name:"low_cpu_mem_usage"},{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.21.0/src/diffusers/loaders.py#L239"}}),Ke=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 = True"},{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"},{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.save_attn_procs.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to save the model using <code>safetensors</code> or the traditional PyTorch way with <code>pickle</code>.`,name:"safe_serialization"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L532"}}),oo=new No({}),to=new U({props:{name:"class diffusers.loaders.TextualInversionLoaderMixin",anchor:"diffusers.loaders.TextualInversionLoaderMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L625"}}),ro=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:"tokenizer",val:": typing.Optional[transformers.tokenization_utils.PreTrainedTokenizer] = None"},{name:"text_encoder",val:": typing.Optional[transformers.modeling_utils.PreTrainedModel] = 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.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>, <em>optional</em>) &#x2014;
Frozen text-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).
If not specified, function will take self.tokenizer.`,name:"text_encoder"},{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>, <em>optional</em>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text. If not specified, function will take self.tokenizer.`,name:"tokenizer"},{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.21.0/src/diffusers/loaders.py#L687"}}),Le=new st({props:{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.example",$$slots:{default:[qi]},$$scope:{ctx:E}}}),ke=new st({props:{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.example-2",$$slots:{default:[Yi]},$$scope:{ctx:E}}}),io=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.21.0/src/diffusers/loaders.py#L630",returnDescription:`
<p>The converted prompt</p>
`,returnType:`
<p><code>str</code> or list of <code>str</code></p>
`}}),lo=new No({}),co=new U({props:{name:"class diffusers.loaders.LoraLoaderMixin",anchor:"diffusers.loaders.LoraLoaderMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L982"}}),mo=new U({props:{name:"fuse_lora",anchor:"diffusers.loaders.LoraLoaderMixin.fuse_lora",parameters:[{name:"fuse_unet",val:": bool = True"},{name:"fuse_text_encoder",val:": bool = True"},{name:"lora_scale",val:": float = 1.0"}],parametersDescription:[{anchor:"diffusers.loaders.LoraLoaderMixin.fuse_lora.fuse_unet",description:"<strong>fuse_unet</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014; Whether to fuse the UNet LoRA parameters.",name:"fuse_unet"},{anchor:"diffusers.loaders.LoraLoaderMixin.fuse_lora.fuse_text_encoder",description:`<strong>fuse_text_encoder</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to fuse the text encoder LoRA parameters. If the text encoder wasn&#x2019;t monkey-patched with the
LoRA parameters then it won&#x2019;t have any effect.`,name:"fuse_text_encoder"},{anchor:"diffusers.loaders.LoraLoaderMixin.fuse_lora.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, defaults to 1.0) &#x2014;
Controls how much to influence the outputs with the LoRA parameters.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L1899"}}),Ie=new sr({props:{warning:!0,$$slots:{default:[Oi]},$$scope:{ctx:E}}}),po=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_alphas",val:""},{name:"text_encoder",val:""},{name:"prefix",val:" = None"},{name:"lora_scale",val:" = 1.0"},{name:"low_cpu_mem_usage",val:" = None"}],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_alphas",description:`<strong>network_alphas</strong> (<code>Dict[str, float]</code>) &#x2014;
See <code>LoRALinearLayer</code> for more details.`,name:"network_alphas"},{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"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_into_text_encoder.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code> if torch version &gt;= 1.9.0 else <code>False</code>) &#x2014;
Speed up model loading only loading the pretrained weights and not initializing the weights. This also
tries to not use more than 1x model size in CPU memory (including peak memory) while loading the model.
Only supported for PyTorch &gt;= 1.9.0. If you are using an older version of PyTorch, setting this
argument to <code>True</code> will raise an error.`,name:"low_cpu_mem_usage"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L1389"}}),ho=new U({props:{name:"load_lora_into_unet",anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_into_unet",parameters:[{name:"state_dict",val:""},{name:"network_alphas",val:""},{name:"unet",val:""},{name:"low_cpu_mem_usage",val:" = None"}],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_alphas",description:`<strong>network_alphas</strong> (<code>Dict[str, float]</code>) &#x2014;
See <code>LoRALinearLayer</code> for more details.`,name:"network_alphas"},{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"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_into_unet.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code> if torch version &gt;= 1.9.0 else <code>False</code>) &#x2014;
Speed up model loading only loading the pretrained weights and not initializing the weights. This also
tries to not use more than 1x model size in CPU memory (including peak memory) while loading the model.
Only supported for PyTorch &gt;= 1.9.0. If you are using an older version of PyTorch, setting this
argument to <code>True</code> will raise an error.`,name:"low_cpu_mem_usage"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L1342"}}),uo=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.21.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.21.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict">lora_state_dict()</a>.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L991"}}),vo=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.21.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.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code> if torch version &gt;= 1.9.0 else <code>False</code>) &#x2014;
Speed up model loading only loading the pretrained weights and not initializing the weights. This also
tries to not use more than 1x model size in CPU memory (including peak memory) while loading the model.
Only supported for PyTorch &gt;= 1.9.0. If you are using an older version of PyTorch, setting this
argument to <code>True</code> will raise an error.`,name:"low_cpu_mem_usage"},{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.21.0/src/diffusers/loaders.py#L1047"}}),De=new sr({props:{warning:!0,$$slots:{default:[Hi]},$$scope:{ctx:E}}}),xo=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 = True"}],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"},{anchor:"diffusers.loaders.LoraLoaderMixin.save_lora_weights.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to save the model using <code>safetensors</code> or the traditional PyTorch way with <code>pickle</code>.`,name:"safe_serialization"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L1623"}}),bo=new U({props:{name:"unfuse_lora",anchor:"diffusers.loaders.LoraLoaderMixin.unfuse_lora",parameters:[{name:"unfuse_unet",val:": bool = True"},{name:"unfuse_text_encoder",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.loaders.LoraLoaderMixin.unfuse_lora.unfuse_unet",description:"<strong>unfuse_unet</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014; Whether to unfuse the UNet LoRA parameters.",name:"unfuse_unet"},{anchor:"diffusers.loaders.LoraLoaderMixin.unfuse_lora.unfuse_text_encoder",description:`<strong>unfuse_text_encoder</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to unfuse the text encoder LoRA parameters. If the text encoder wasn&#x2019;t monkey-patched with the
LoRA parameters then it won&#x2019;t have any effect.`,name:"unfuse_text_encoder"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L1946"}}),Ne=new sr({props:{warning:!0,$$slots:{default:[Xi]},$$scope:{ctx:E}}}),Mo=new U({props:{name:"unload_lora_weights",anchor:"diffusers.loaders.LoraLoaderMixin.unload_lora_weights",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L1880"}}),Se=new st({props:{anchor:"diffusers.loaders.LoraLoaderMixin.unload_lora_weights.example",$$slots:{default:[Qi]},$$scope:{ctx:E}}}),$o=new No({}),To=new U({props:{name:"class diffusers.loaders.FromSingleFileMixin",anchor:"diffusers.loaders.FromSingleFileMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L1988"}}),Lo=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> (<code>CLIPTextModel</code>, <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> (<code>CLIPTokenizer</code>, <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.original_config_file",description:`<strong>original_config_file</strong> (<code>str</code>) &#x2014;
Path to <code>.yaml</code> config file corresponding to the original architecture. If <code>None</code>, will be
automatically inferred by looking for a key that only exists in SD2.0 models.`,name:"original_config_file"},{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.21.0/src/diffusers/loaders.py#L1999"}}),We=new st({props:{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.example",$$slots:{default:[Ki]},$$scope:{ctx:E}}}),ko=new No({}),Eo=new U({props:{name:"class diffusers.loaders.FromOriginalControlnetMixin",anchor:"diffusers.loaders.FromOriginalControlnetMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L2418"}}),Uo=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.21.0/src/diffusers/loaders.py#L2419"}}),je=new st({props:{anchor:"diffusers.loaders.FromOriginalControlnetMixin.from_single_file.example",$$slots:{default:[el]},$$scope:{ctx:E}}}),Io=new No({}),Fo=new U({props:{name:"class diffusers.loaders.FromOriginalVAEMixin",anchor:"diffusers.loaders.FromOriginalVAEMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L2226"}}),Co=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.21.0/src/diffusers/loaders.py#L2227"}}),Ge=new sr({props:{warning:!0,$$slots:{default:[ol]},$$scope:{ctx:E}}}),Ve=new st({props:{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.example",$$slots:{default:[tl]},$$scope:{ctx:E}}}),{c(){d=r("meta"),_=f(),h=r("h1"),c=r("a"),x=r("span"),b(s.$$.fragment),u=f(),F=r("span"),A=i("Loaders"),j=f(),C=r("p"),N=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 "),L=r("code"),ae=i("LoaderMixin"),se=i(" API to load adapter weights."),O=f(),b(ye.$$.fragment),ir=f(),ie=r("h2"),we=r("a"),dt=r("span"),b(Oe.$$.fragment),Wr=f(),ct=r("span"),Pr=i("UNet2DConditionLoadersMixin"),lr=f(),z=r("div"),b(He.$$.fragment),jr=f(),Me=r("div"),b(Xe.$$.fragment),Rr=f(),B=r("p"),Gr=i("Load pretrained attention processor layers into "),So=r("a"),Vr=i("UNet2DConditionModel"),zr=i(`. Attention processor layers have to be
defined in
`),Qe=r("a"),ft=r("code"),Br=i("attention_processor.py"),qr=i(`
and be a `),mt=r("code"),Yr=i("torch.nn.Module"),Or=i(" class."),Hr=f(),$e=r("div"),b(Ke.$$.fragment),Xr=f(),eo=r("p"),Qr=i(`Save an attention processor to a directory so that it can be reloaded using the
`),Zo=r("a"),Kr=i("load_attn_procs()"),en=i(" method."),dr=f(),le=r("h2"),Te=r("a"),pt=r("span"),b(oo.$$.fragment),on=f(),ht=r("span"),tn=i("TextualInversionLoaderMixin"),cr=f(),S=r("div"),b(to.$$.fragment),rn=f(),ut=r("p"),nn=i("Load textual inversion tokens and embeddings to the tokenizer and text encoder."),an=f(),J=r("div"),b(ro.$$.fragment),sn=f(),no=r("p"),ln=i("Load textual inversion embeddings into the text encoder of "),Wo=r("a"),dn=i("StableDiffusionPipeline"),cn=i(` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),fn=f(),gt=r("p"),mn=i("Example:"),pn=f(),b(Le.$$.fragment),hn=f(),ao=r("p"),un=i(`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),so=r("a"),gn=i("civitAI"),_n=i(") and then load the vector"),vn=f(),b(ke.$$.fragment),xn=f(),Ee=r("div"),b(io.$$.fragment),bn=f(),_t=r("p"),yn=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.`),fr=f(),de=r("h2"),Ue=r("a"),vt=r("span"),b(lo.$$.fragment),wn=f(),xt=r("span"),Mn=i("LoraLoaderMixin"),mr=f(),k=r("div"),b(co.$$.fragment),$n=f(),ce=r("p"),Tn=i("Load LoRA layers into "),Po=r("a"),Ln=i("UNet2DConditionModel"),kn=i(` and
`),fo=r("a"),bt=r("code"),En=i("CLIPTextModel"),Un=i("."),In=f(),H=r("div"),b(mo.$$.fragment),Fn=f(),yt=r("p"),Cn=i("Fuses the LoRA parameters into the original parameters of the corresponding blocks."),Jn=f(),b(Ie.$$.fragment),Dn=f(),Fe=r("div"),b(po.$$.fragment),An=f(),Ce=r("p"),Nn=i("This will load the LoRA layers specified in "),wt=r("code"),Sn=i("state_dict"),Zn=i(" into "),Mt=r("code"),Wn=i("text_encoder"),Pn=f(),Je=r("div"),b(ho.$$.fragment),jn=f(),fe=r("p"),Rn=i("This will load the LoRA layers specified in "),$t=r("code"),Gn=i("state_dict"),Vn=i(" into "),Tt=r("code"),zn=i("unet"),Bn=i("."),qn=f(),D=r("div"),b(uo.$$.fragment),Yn=f(),q=r("p"),On=i("Load LoRA weights specified in "),Lt=r("code"),Hn=i("pretrained_model_name_or_path_or_dict"),Xn=i(" into "),kt=r("code"),Qn=i("self.unet"),Kn=i(` and
`),Et=r("code"),ea=i("self.text_encoder"),oa=i("."),ta=f(),go=r("p"),ra=i("All kwargs are forwarded to "),Ut=r("code"),na=i("self.lora_state_dict"),aa=i("."),sa=f(),_o=r("p"),ia=i("See "),jo=r("a"),la=i("lora_state_dict()"),da=i(" for more details on how the state dict is loaded."),ca=f(),me=r("p"),fa=i("See "),Ro=r("a"),ma=i("load_lora_into_unet()"),pa=i(` for more details on how the state dict is loaded into
`),It=r("code"),ha=i("self.unet"),ua=i("."),ga=f(),pe=r("p"),_a=i("See "),Go=r("a"),va=i("load_lora_into_text_encoder()"),xa=i(` for more details on how the state dict is loaded
into `),Ft=r("code"),ba=i("self.text_encoder"),ya=i("."),wa=f(),X=r("div"),b(vo.$$.fragment),Ma=f(),Ct=r("p"),$a=i("Return state dict for lora weights and the network alphas."),Ta=f(),b(De.$$.fragment),La=f(),Ae=r("div"),b(xo.$$.fragment),ka=f(),Jt=r("p"),Ea=i("Save the LoRA parameters corresponding to the UNet and text encoder."),Ua=f(),Q=r("div"),b(bo.$$.fragment),Ia=f(),yo=r("p"),Fa=i(`Reverses the effect of
`),wo=r("a"),Dt=r("code"),Ca=i("pipe.fuse_lora()"),Ja=i("."),Da=f(),b(Ne.$$.fragment),Aa=f(),K=r("div"),b(Mo.$$.fragment),Na=f(),At=r("p"),Sa=i("Unloads the LoRA parameters."),Za=f(),b(Se.$$.fragment),pr=f(),he=r("h2"),Ze=r("a"),Nt=r("span"),b($o.$$.fragment),Wa=f(),St=r("span"),Pa=i("FromSingleFileMixin"),hr=f(),Y=r("div"),b(To.$$.fragment),ja=f(),ue=r("p"),Ra=i("Load model weights saved in the "),Zt=r("code"),Ga=i(".ckpt"),Va=i(" format into a "),Vo=r("a"),za=i("DiffusionPipeline"),Ba=i("."),qa=f(),ee=r("div"),b(Lo.$$.fragment),Ya=f(),Z=r("p"),Oa=i("Instantiate a "),zo=r("a"),Ha=i("DiffusionPipeline"),Xa=i(" from pretrained pipeline weights saved in the "),Wt=r("code"),Qa=i(".ckpt"),Ka=i(" or "),Pt=r("code"),es=i(".safetensors"),os=i(`
format. The pipeline is set in evaluation mode (`),jt=r("code"),ts=i("model.eval()"),rs=i(") by default."),ns=f(),b(We.$$.fragment),ur=f(),ge=r("h2"),Pe=r("a"),Rt=r("span"),b(ko.$$.fragment),as=f(),Gt=r("span"),ss=i("FromOriginalControlnetMixin"),gr=f(),_e=r("div"),b(Eo.$$.fragment),is=f(),oe=r("div"),b(Uo.$$.fragment),ls=f(),W=r("p"),ds=i("Instantiate a "),Bo=r("a"),cs=i("ControlNetModel"),fs=i(" from pretrained controlnet weights saved in the original "),Vt=r("code"),ms=i(".ckpt"),ps=i(` or
`),zt=r("code"),hs=i(".safetensors"),us=i(" format. The pipeline is set in evaluation mode ("),Bt=r("code"),gs=i("model.eval()"),_s=i(") by default."),vs=f(),b(je.$$.fragment),_r=f(),ve=r("h2"),Re=r("a"),qt=r("span"),b(Io.$$.fragment),xs=f(),Yt=r("span"),bs=i("FromOriginalVAEMixin"),vr=f(),xe=r("div"),b(Fo.$$.fragment),ys=f(),R=r("div"),b(Co.$$.fragment),ws=f(),P=r("p"),Ms=i("Instantiate a "),qo=r("a"),$s=i("AutoencoderKL"),Ts=i(" from pretrained controlnet weights saved in the original "),Ot=r("code"),Ls=i(".ckpt"),ks=i(` or
`),Ht=r("code"),Es=i(".safetensors"),Us=i(" format. The pipeline is format. The pipeline is set in evaluation mode ("),Xt=r("code"),Is=i("model.eval()"),Fs=i(`) by
default.`),Cs=f(),b(Ge.$$.fragment),Js=f(),b(Ve.$$.fragment),this.h()},l(o){const g=Vi('[data-svelte="svelte-1phssyn"]',document.head);d=n(g,"META",{name:!0,content:!0}),g.forEach(t),_=m(o),h=n(o,"H1",{class:!0});var Jo=a(h);c=n(Jo,"A",{id:!0,class:!0,href:!0});var Qt=a(c);x=n(Qt,"SPAN",{});var Kt=a(x);y(s.$$.fragment,Kt),Kt.forEach(t),Qt.forEach(t),u=m(Jo),F=n(Jo,"SPAN",{});var er=a(F);A=l(er,"Loaders"),er.forEach(t),Jo.forEach(t),j=m(o),C=n(o,"P",{});var Do=a(C);N=l(Do,"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 "),L=n(Do,"CODE",{});var or=a(L);ae=l(or,"LoaderMixin"),or.forEach(t),se=l(Do," API to load adapter weights."),Do.forEach(t),O=m(o),y(ye.$$.fragment,o),ir=m(o),ie=n(o,"H2",{class:!0});var Ao=a(ie);we=n(Ao,"A",{id:!0,class:!0,href:!0});var tr=a(we);dt=n(tr,"SPAN",{});var rr=a(dt);y(Oe.$$.fragment,rr),rr.forEach(t),tr.forEach(t),Wr=m(Ao),ct=n(Ao,"SPAN",{});var nr=a(ct);Pr=l(nr,"UNet2DConditionLoadersMixin"),nr.forEach(t),Ao.forEach(t),lr=m(o),z=n(o,"DIV",{class:!0});var be=a(z);y(He.$$.fragment,be),jr=m(be),Me=n(be,"DIV",{class:!0});var br=a(Me);y(Xe.$$.fragment,br),Rr=m(br),B=n(br,"P",{});var ze=a(B);Gr=l(ze,"Load pretrained attention processor layers into "),So=n(ze,"A",{href:!0});var Ds=a(So);Vr=l(Ds,"UNet2DConditionModel"),Ds.forEach(t),zr=l(ze,`. Attention processor layers have to be
defined in
`),Qe=n(ze,"A",{href:!0,rel:!0});var As=a(Qe);ft=n(As,"CODE",{});var Ns=a(ft);Br=l(Ns,"attention_processor.py"),Ns.forEach(t),As.forEach(t),qr=l(ze,`
and be a `),mt=n(ze,"CODE",{});var Ss=a(mt);Yr=l(Ss,"torch.nn.Module"),Ss.forEach(t),Or=l(ze," class."),ze.forEach(t),br.forEach(t),Hr=m(be),$e=n(be,"DIV",{class:!0});var yr=a($e);y(Ke.$$.fragment,yr),Xr=m(yr),eo=n(yr,"P",{});var wr=a(eo);Qr=l(wr,`Save an attention processor to a directory so that it can be reloaded using the
`),Zo=n(wr,"A",{href:!0});var Zs=a(Zo);Kr=l(Zs,"load_attn_procs()"),Zs.forEach(t),en=l(wr," method."),wr.forEach(t),yr.forEach(t),be.forEach(t),dr=m(o),le=n(o,"H2",{class:!0});var Mr=a(le);Te=n(Mr,"A",{id:!0,class:!0,href:!0});var Ws=a(Te);pt=n(Ws,"SPAN",{});var Ps=a(pt);y(oo.$$.fragment,Ps),Ps.forEach(t),Ws.forEach(t),on=m(Mr),ht=n(Mr,"SPAN",{});var js=a(ht);tn=l(js,"TextualInversionLoaderMixin"),js.forEach(t),Mr.forEach(t),cr=m(o),S=n(o,"DIV",{class:!0});var Be=a(S);y(to.$$.fragment,Be),rn=m(Be),ut=n(Be,"P",{});var Rs=a(ut);nn=l(Rs,"Load textual inversion tokens and embeddings to the tokenizer and text encoder."),Rs.forEach(t),an=m(Be),J=n(Be,"DIV",{class:!0});var G=a(J);y(ro.$$.fragment,G),sn=m(G),no=n(G,"P",{});var $r=a(no);ln=l($r,"Load textual inversion embeddings into the text encoder of "),Wo=n($r,"A",{href:!0});var Gs=a(Wo);dn=l(Gs,"StableDiffusionPipeline"),Gs.forEach(t),cn=l($r,` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),$r.forEach(t),fn=m(G),gt=n(G,"P",{});var Vs=a(gt);mn=l(Vs,"Example:"),Vs.forEach(t),pn=m(G),y(Le.$$.fragment,G),hn=m(G),ao=n(G,"P",{});var Tr=a(ao);un=l(Tr,`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),so=n(Tr,"A",{href:!0,rel:!0});var zs=a(so);gn=l(zs,"civitAI"),zs.forEach(t),_n=l(Tr,") and then load the vector"),Tr.forEach(t),vn=m(G),y(ke.$$.fragment,G),G.forEach(t),xn=m(Be),Ee=n(Be,"DIV",{class:!0});var Lr=a(Ee);y(io.$$.fragment,Lr),bn=m(Lr),_t=n(Lr,"P",{});var Bs=a(_t);yn=l(Bs,`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.`),Bs.forEach(t),Lr.forEach(t),Be.forEach(t),fr=m(o),de=n(o,"H2",{class:!0});var kr=a(de);Ue=n(kr,"A",{id:!0,class:!0,href:!0});var qs=a(Ue);vt=n(qs,"SPAN",{});var Ys=a(vt);y(lo.$$.fragment,Ys),Ys.forEach(t),qs.forEach(t),wn=m(kr),xt=n(kr,"SPAN",{});var Os=a(xt);Mn=l(Os,"LoraLoaderMixin"),Os.forEach(t),kr.forEach(t),mr=m(o),k=n(o,"DIV",{class:!0});var I=a(k);y(co.$$.fragment,I),$n=m(I),ce=n(I,"P",{});var Yo=a(ce);Tn=l(Yo,"Load LoRA layers into "),Po=n(Yo,"A",{href:!0});var Hs=a(Po);Ln=l(Hs,"UNet2DConditionModel"),Hs.forEach(t),kn=l(Yo,` and
`),fo=n(Yo,"A",{href:!0,rel:!0});var Xs=a(fo);bt=n(Xs,"CODE",{});var Qs=a(bt);En=l(Qs,"CLIPTextModel"),Qs.forEach(t),Xs.forEach(t),Un=l(Yo,"."),Yo.forEach(t),In=m(I),H=n(I,"DIV",{class:!0});var Oo=a(H);y(mo.$$.fragment,Oo),Fn=m(Oo),yt=n(Oo,"P",{});var Ks=a(yt);Cn=l(Ks,"Fuses the LoRA parameters into the original parameters of the corresponding blocks."),Ks.forEach(t),Jn=m(Oo),y(Ie.$$.fragment,Oo),Oo.forEach(t),Dn=m(I),Fe=n(I,"DIV",{class:!0});var Er=a(Fe);y(po.$$.fragment,Er),An=m(Er),Ce=n(Er,"P",{});var ar=a(Ce);Nn=l(ar,"This will load the LoRA layers specified in "),wt=n(ar,"CODE",{});var ei=a(wt);Sn=l(ei,"state_dict"),ei.forEach(t),Zn=l(ar," into "),Mt=n(ar,"CODE",{});var oi=a(Mt);Wn=l(oi,"text_encoder"),oi.forEach(t),ar.forEach(t),Er.forEach(t),Pn=m(I),Je=n(I,"DIV",{class:!0});var Ur=a(Je);y(ho.$$.fragment,Ur),jn=m(Ur),fe=n(Ur,"P",{});var Ho=a(fe);Rn=l(Ho,"This will load the LoRA layers specified in "),$t=n(Ho,"CODE",{});var ti=a($t);Gn=l(ti,"state_dict"),ti.forEach(t),Vn=l(Ho," into "),Tt=n(Ho,"CODE",{});var ri=a(Tt);zn=l(ri,"unet"),ri.forEach(t),Bn=l(Ho,"."),Ho.forEach(t),Ur.forEach(t),qn=m(I),D=n(I,"DIV",{class:!0});var V=a(D);y(uo.$$.fragment,V),Yn=m(V),q=n(V,"P",{});var qe=a(q);On=l(qe,"Load LoRA weights specified in "),Lt=n(qe,"CODE",{});var ni=a(Lt);Hn=l(ni,"pretrained_model_name_or_path_or_dict"),ni.forEach(t),Xn=l(qe," into "),kt=n(qe,"CODE",{});var ai=a(kt);Qn=l(ai,"self.unet"),ai.forEach(t),Kn=l(qe,` and
`),Et=n(qe,"CODE",{});var si=a(Et);ea=l(si,"self.text_encoder"),si.forEach(t),oa=l(qe,"."),qe.forEach(t),ta=m(V),go=n(V,"P",{});var Ir=a(go);ra=l(Ir,"All kwargs are forwarded to "),Ut=n(Ir,"CODE",{});var ii=a(Ut);na=l(ii,"self.lora_state_dict"),ii.forEach(t),aa=l(Ir,"."),Ir.forEach(t),sa=m(V),_o=n(V,"P",{});var Fr=a(_o);ia=l(Fr,"See "),jo=n(Fr,"A",{href:!0});var li=a(jo);la=l(li,"lora_state_dict()"),li.forEach(t),da=l(Fr," for more details on how the state dict is loaded."),Fr.forEach(t),ca=m(V),me=n(V,"P",{});var Xo=a(me);fa=l(Xo,"See "),Ro=n(Xo,"A",{href:!0});var di=a(Ro);ma=l(di,"load_lora_into_unet()"),di.forEach(t),pa=l(Xo,` for more details on how the state dict is loaded into
`),It=n(Xo,"CODE",{});var ci=a(It);ha=l(ci,"self.unet"),ci.forEach(t),ua=l(Xo,"."),Xo.forEach(t),ga=m(V),pe=n(V,"P",{});var Qo=a(pe);_a=l(Qo,"See "),Go=n(Qo,"A",{href:!0});var fi=a(Go);va=l(fi,"load_lora_into_text_encoder()"),fi.forEach(t),xa=l(Qo,` for more details on how the state dict is loaded
into `),Ft=n(Qo,"CODE",{});var mi=a(Ft);ba=l(mi,"self.text_encoder"),mi.forEach(t),ya=l(Qo,"."),Qo.forEach(t),V.forEach(t),wa=m(I),X=n(I,"DIV",{class:!0});var Ko=a(X);y(vo.$$.fragment,Ko),Ma=m(Ko),Ct=n(Ko,"P",{});var pi=a(Ct);$a=l(pi,"Return state dict for lora weights and the network alphas."),pi.forEach(t),Ta=m(Ko),y(De.$$.fragment,Ko),Ko.forEach(t),La=m(I),Ae=n(I,"DIV",{class:!0});var Cr=a(Ae);y(xo.$$.fragment,Cr),ka=m(Cr),Jt=n(Cr,"P",{});var hi=a(Jt);Ea=l(hi,"Save the LoRA parameters corresponding to the UNet and text encoder."),hi.forEach(t),Cr.forEach(t),Ua=m(I),Q=n(I,"DIV",{class:!0});var et=a(Q);y(bo.$$.fragment,et),Ia=m(et),yo=n(et,"P",{});var Jr=a(yo);Fa=l(Jr,`Reverses the effect of
`),wo=n(Jr,"A",{href:!0,rel:!0});var ui=a(wo);Dt=n(ui,"CODE",{});var gi=a(Dt);Ca=l(gi,"pipe.fuse_lora()"),gi.forEach(t),ui.forEach(t),Ja=l(Jr,"."),Jr.forEach(t),Da=m(et),y(Ne.$$.fragment,et),et.forEach(t),Aa=m(I),K=n(I,"DIV",{class:!0});var ot=a(K);y(Mo.$$.fragment,ot),Na=m(ot),At=n(ot,"P",{});var _i=a(At);Sa=l(_i,"Unloads the LoRA parameters."),_i.forEach(t),Za=m(ot),y(Se.$$.fragment,ot),ot.forEach(t),I.forEach(t),pr=m(o),he=n(o,"H2",{class:!0});var Dr=a(he);Ze=n(Dr,"A",{id:!0,class:!0,href:!0});var vi=a(Ze);Nt=n(vi,"SPAN",{});var xi=a(Nt);y($o.$$.fragment,xi),xi.forEach(t),vi.forEach(t),Wa=m(Dr),St=n(Dr,"SPAN",{});var bi=a(St);Pa=l(bi,"FromSingleFileMixin"),bi.forEach(t),Dr.forEach(t),hr=m(o),Y=n(o,"DIV",{class:!0});var tt=a(Y);y(To.$$.fragment,tt),ja=m(tt),ue=n(tt,"P",{});var rt=a(ue);Ra=l(rt,"Load model weights saved in the "),Zt=n(rt,"CODE",{});var yi=a(Zt);Ga=l(yi,".ckpt"),yi.forEach(t),Va=l(rt," format into a "),Vo=n(rt,"A",{href:!0});var wi=a(Vo);za=l(wi,"DiffusionPipeline"),wi.forEach(t),Ba=l(rt,"."),rt.forEach(t),qa=m(tt),ee=n(tt,"DIV",{class:!0});var nt=a(ee);y(Lo.$$.fragment,nt),Ya=m(nt),Z=n(nt,"P",{});var te=a(Z);Oa=l(te,"Instantiate a "),zo=n(te,"A",{href:!0});var Mi=a(zo);Ha=l(Mi,"DiffusionPipeline"),Mi.forEach(t),Xa=l(te," from pretrained pipeline weights saved in the "),Wt=n(te,"CODE",{});var $i=a(Wt);Qa=l($i,".ckpt"),$i.forEach(t),Ka=l(te," or "),Pt=n(te,"CODE",{});var Ti=a(Pt);es=l(Ti,".safetensors"),Ti.forEach(t),os=l(te,`
format. The pipeline is set in evaluation mode (`),jt=n(te,"CODE",{});var Li=a(jt);ts=l(Li,"model.eval()"),Li.forEach(t),rs=l(te,") by default."),te.forEach(t),ns=m(nt),y(We.$$.fragment,nt),nt.forEach(t),tt.forEach(t),ur=m(o),ge=n(o,"H2",{class:!0});var Ar=a(ge);Pe=n(Ar,"A",{id:!0,class:!0,href:!0});var ki=a(Pe);Rt=n(ki,"SPAN",{});var Ei=a(Rt);y(ko.$$.fragment,Ei),Ei.forEach(t),ki.forEach(t),as=m(Ar),Gt=n(Ar,"SPAN",{});var Ui=a(Gt);ss=l(Ui,"FromOriginalControlnetMixin"),Ui.forEach(t),Ar.forEach(t),gr=m(o),_e=n(o,"DIV",{class:!0});var Nr=a(_e);y(Eo.$$.fragment,Nr),is=m(Nr),oe=n(Nr,"DIV",{class:!0});var at=a(oe);y(Uo.$$.fragment,at),ls=m(at),W=n(at,"P",{});var re=a(W);ds=l(re,"Instantiate a "),Bo=n(re,"A",{href:!0});var Ii=a(Bo);cs=l(Ii,"ControlNetModel"),Ii.forEach(t),fs=l(re," from pretrained controlnet weights saved in the original "),Vt=n(re,"CODE",{});var Fi=a(Vt);ms=l(Fi,".ckpt"),Fi.forEach(t),ps=l(re,` or
`),zt=n(re,"CODE",{});var Ci=a(zt);hs=l(Ci,".safetensors"),Ci.forEach(t),us=l(re," format. The pipeline is set in evaluation mode ("),Bt=n(re,"CODE",{});var Ji=a(Bt);gs=l(Ji,"model.eval()"),Ji.forEach(t),_s=l(re,") by default."),re.forEach(t),vs=m(at),y(je.$$.fragment,at),at.forEach(t),Nr.forEach(t),_r=m(o),ve=n(o,"H2",{class:!0});var Sr=a(ve);Re=n(Sr,"A",{id:!0,class:!0,href:!0});var Di=a(Re);qt=n(Di,"SPAN",{});var Ai=a(qt);y(Io.$$.fragment,Ai),Ai.forEach(t),Di.forEach(t),xs=m(Sr),Yt=n(Sr,"SPAN",{});var Ni=a(Yt);bs=l(Ni,"FromOriginalVAEMixin"),Ni.forEach(t),Sr.forEach(t),vr=m(o),xe=n(o,"DIV",{class:!0});var Zr=a(xe);y(Fo.$$.fragment,Zr),ys=m(Zr),R=n(Zr,"DIV",{class:!0});var Ye=a(R);y(Co.$$.fragment,Ye),ws=m(Ye),P=n(Ye,"P",{});var ne=a(P);Ms=l(ne,"Instantiate a "),qo=n(ne,"A",{href:!0});var Si=a(qo);$s=l(Si,"AutoencoderKL"),Si.forEach(t),Ts=l(ne," from pretrained controlnet weights saved in the original "),Ot=n(ne,"CODE",{});var Zi=a(Ot);Ls=l(Zi,".ckpt"),Zi.forEach(t),ks=l(ne,` or
`),Ht=n(ne,"CODE",{});var Wi=a(Ht);Es=l(Wi,".safetensors"),Wi.forEach(t),Us=l(ne," format. The pipeline is format. The pipeline is set in evaluation mode ("),Xt=n(ne,"CODE",{});var Pi=a(Xt);Is=l(Pi,"model.eval()"),Pi.forEach(t),Fs=l(ne,`) by
default.`),ne.forEach(t),Cs=m(Ye),y(Ge.$$.fragment,Ye),Js=m(Ye),y(Ve.$$.fragment,Ye),Ye.forEach(t),Zr.forEach(t),this.h()},h(){p(d,"name","hf:doc:metadata"),p(d,"content",JSON.stringify(nl)),p(c,"id","loaders"),p(c,"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(c,"href","#loaders"),p(h,"class","relative group"),p(we,"id","diffusers.loaders.UNet2DConditionLoadersMixin"),p(we,"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(we,"href","#diffusers.loaders.UNet2DConditionLoadersMixin"),p(ie,"class","relative group"),p(So,"href","/docs/diffusers/v0.21.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel"),p(Qe,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py"),p(Qe,"rel","nofollow"),p(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Zo,"href","/docs/diffusers/v0.21.0/en/api/loaders#diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs"),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(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Te,"id","diffusers.loaders.TextualInversionLoaderMixin"),p(Te,"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(Te,"href","#diffusers.loaders.TextualInversionLoaderMixin"),p(le,"class","relative group"),p(Wo,"href","/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),p(so,"href","https://civitai.com/models/3036?modelVersionId=9857"),p(so,"rel","nofollow"),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(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(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ue,"id","diffusers.loaders.LoraLoaderMixin"),p(Ue,"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(Ue,"href","#diffusers.loaders.LoraLoaderMixin"),p(de,"class","relative group"),p(Po,"href","/docs/diffusers/v0.21.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel"),p(fo,"href","https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel"),p(fo,"rel","nofollow"),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(Fe,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(jo,"href","/docs/diffusers/v0.21.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict"),p(Ro,"href","/docs/diffusers/v0.21.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.load_lora_into_unet"),p(Go,"href","/docs/diffusers/v0.21.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.load_lora_into_text_encoder"),p(D,"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(Ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(wo,"href","https://huggingface.co/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraLoaderMixin.fuse_lora"),p(wo,"rel","nofollow"),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(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(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(Ze,"id","diffusers.loaders.FromSingleFileMixin"),p(Ze,"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(Ze,"href","#diffusers.loaders.FromSingleFileMixin"),p(he,"class","relative group"),p(Vo,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),p(zo,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),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(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Pe,"id","diffusers.loaders.FromOriginalControlnetMixin"),p(Pe,"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(Pe,"href","#diffusers.loaders.FromOriginalControlnetMixin"),p(ge,"class","relative group"),p(Bo,"href","/docs/diffusers/v0.21.0/en/api/models/controlnet#diffusers.ControlNetModel"),p(oe,"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(Re,"id","diffusers.loaders.FromOriginalVAEMixin"),p(Re,"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(Re,"href","#diffusers.loaders.FromOriginalVAEMixin"),p(ve,"class","relative group"),p(qo,"href","/docs/diffusers/v0.21.0/en/api/models/autoencoderkl#diffusers.AutoencoderKL"),p(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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")},m(o,g){e(document.head,d),v(o,_,g),v(o,h,g),e(h,c),e(c,x),w(s,x,null),e(h,u),e(h,F),e(F,A),v(o,j,g),v(o,C,g),e(C,N),e(C,L),e(L,ae),e(C,se),v(o,O,g),w(ye,o,g),v(o,ir,g),v(o,ie,g),e(ie,we),e(we,dt),w(Oe,dt,null),e(ie,Wr),e(ie,ct),e(ct,Pr),v(o,lr,g),v(o,z,g),w(He,z,null),e(z,jr),e(z,Me),w(Xe,Me,null),e(Me,Rr),e(Me,B),e(B,Gr),e(B,So),e(So,Vr),e(B,zr),e(B,Qe),e(Qe,ft),e(ft,Br),e(B,qr),e(B,mt),e(mt,Yr),e(B,Or),e(z,Hr),e(z,$e),w(Ke,$e,null),e($e,Xr),e($e,eo),e(eo,Qr),e(eo,Zo),e(Zo,Kr),e(eo,en),v(o,dr,g),v(o,le,g),e(le,Te),e(Te,pt),w(oo,pt,null),e(le,on),e(le,ht),e(ht,tn),v(o,cr,g),v(o,S,g),w(to,S,null),e(S,rn),e(S,ut),e(ut,nn),e(S,an),e(S,J),w(ro,J,null),e(J,sn),e(J,no),e(no,ln),e(no,Wo),e(Wo,dn),e(no,cn),e(J,fn),e(J,gt),e(gt,mn),e(J,pn),w(Le,J,null),e(J,hn),e(J,ao),e(ao,un),e(ao,so),e(so,gn),e(ao,_n),e(J,vn),w(ke,J,null),e(S,xn),e(S,Ee),w(io,Ee,null),e(Ee,bn),e(Ee,_t),e(_t,yn),v(o,fr,g),v(o,de,g),e(de,Ue),e(Ue,vt),w(lo,vt,null),e(de,wn),e(de,xt),e(xt,Mn),v(o,mr,g),v(o,k,g),w(co,k,null),e(k,$n),e(k,ce),e(ce,Tn),e(ce,Po),e(Po,Ln),e(ce,kn),e(ce,fo),e(fo,bt),e(bt,En),e(ce,Un),e(k,In),e(k,H),w(mo,H,null),e(H,Fn),e(H,yt),e(yt,Cn),e(H,Jn),w(Ie,H,null),e(k,Dn),e(k,Fe),w(po,Fe,null),e(Fe,An),e(Fe,Ce),e(Ce,Nn),e(Ce,wt),e(wt,Sn),e(Ce,Zn),e(Ce,Mt),e(Mt,Wn),e(k,Pn),e(k,Je),w(ho,Je,null),e(Je,jn),e(Je,fe),e(fe,Rn),e(fe,$t),e($t,Gn),e(fe,Vn),e(fe,Tt),e(Tt,zn),e(fe,Bn),e(k,qn),e(k,D),w(uo,D,null),e(D,Yn),e(D,q),e(q,On),e(q,Lt),e(Lt,Hn),e(q,Xn),e(q,kt),e(kt,Qn),e(q,Kn),e(q,Et),e(Et,ea),e(q,oa),e(D,ta),e(D,go),e(go,ra),e(go,Ut),e(Ut,na),e(go,aa),e(D,sa),e(D,_o),e(_o,ia),e(_o,jo),e(jo,la),e(_o,da),e(D,ca),e(D,me),e(me,fa),e(me,Ro),e(Ro,ma),e(me,pa),e(me,It),e(It,ha),e(me,ua),e(D,ga),e(D,pe),e(pe,_a),e(pe,Go),e(Go,va),e(pe,xa),e(pe,Ft),e(Ft,ba),e(pe,ya),e(k,wa),e(k,X),w(vo,X,null),e(X,Ma),e(X,Ct),e(Ct,$a),e(X,Ta),w(De,X,null),e(k,La),e(k,Ae),w(xo,Ae,null),e(Ae,ka),e(Ae,Jt),e(Jt,Ea),e(k,Ua),e(k,Q),w(bo,Q,null),e(Q,Ia),e(Q,yo),e(yo,Fa),e(yo,wo),e(wo,Dt),e(Dt,Ca),e(yo,Ja),e(Q,Da),w(Ne,Q,null),e(k,Aa),e(k,K),w(Mo,K,null),e(K,Na),e(K,At),e(At,Sa),e(K,Za),w(Se,K,null),v(o,pr,g),v(o,he,g),e(he,Ze),e(Ze,Nt),w($o,Nt,null),e(he,Wa),e(he,St),e(St,Pa),v(o,hr,g),v(o,Y,g),w(To,Y,null),e(Y,ja),e(Y,ue),e(ue,Ra),e(ue,Zt),e(Zt,Ga),e(ue,Va),e(ue,Vo),e(Vo,za),e(ue,Ba),e(Y,qa),e(Y,ee),w(Lo,ee,null),e(ee,Ya),e(ee,Z),e(Z,Oa),e(Z,zo),e(zo,Ha),e(Z,Xa),e(Z,Wt),e(Wt,Qa),e(Z,Ka),e(Z,Pt),e(Pt,es),e(Z,os),e(Z,jt),e(jt,ts),e(Z,rs),e(ee,ns),w(We,ee,null),v(o,ur,g),v(o,ge,g),e(ge,Pe),e(Pe,Rt),w(ko,Rt,null),e(ge,as),e(ge,Gt),e(Gt,ss),v(o,gr,g),v(o,_e,g),w(Eo,_e,null),e(_e,is),e(_e,oe),w(Uo,oe,null),e(oe,ls),e(oe,W),e(W,ds),e(W,Bo),e(Bo,cs),e(W,fs),e(W,Vt),e(Vt,ms),e(W,ps),e(W,zt),e(zt,hs),e(W,us),e(W,Bt),e(Bt,gs),e(W,_s),e(oe,vs),w(je,oe,null),v(o,_r,g),v(o,ve,g),e(ve,Re),e(Re,qt),w(Io,qt,null),e(ve,xs),e(ve,Yt),e(Yt,bs),v(o,vr,g),v(o,xe,g),w(Fo,xe,null),e(xe,ys),e(xe,R),w(Co,R,null),e(R,ws),e(R,P),e(P,Ms),e(P,qo),e(qo,$s),e(P,Ts),e(P,Ot),e(Ot,Ls),e(P,ks),e(P,Ht),e(Ht,Es),e(P,Us),e(P,Xt),e(Xt,Is),e(P,Fs),e(R,Cs),w(Ge,R,null),e(R,Js),w(Ve,R,null),xr=!0},p(o,[g]){const Jo={};g&2&&(Jo.$$scope={dirty:g,ctx:o}),ye.$set(Jo);const Qt={};g&2&&(Qt.$$scope={dirty:g,ctx:o}),Le.$set(Qt);const Kt={};g&2&&(Kt.$$scope={dirty:g,ctx:o}),ke.$set(Kt);const er={};g&2&&(er.$$scope={dirty:g,ctx:o}),Ie.$set(er);const Do={};g&2&&(Do.$$scope={dirty:g,ctx:o}),De.$set(Do);const or={};g&2&&(or.$$scope={dirty:g,ctx:o}),Ne.$set(or);const Ao={};g&2&&(Ao.$$scope={dirty:g,ctx:o}),Se.$set(Ao);const tr={};g&2&&(tr.$$scope={dirty:g,ctx:o}),We.$set(tr);const rr={};g&2&&(rr.$$scope={dirty:g,ctx:o}),je.$set(rr);const nr={};g&2&&(nr.$$scope={dirty:g,ctx:o}),Ge.$set(nr);const be={};g&2&&(be.$$scope={dirty:g,ctx:o}),Ve.$set(be)},i(o){xr||(M(s.$$.fragment,o),M(ye.$$.fragment,o),M(Oe.$$.fragment,o),M(He.$$.fragment,o),M(Xe.$$.fragment,o),M(Ke.$$.fragment,o),M(oo.$$.fragment,o),M(to.$$.fragment,o),M(ro.$$.fragment,o),M(Le.$$.fragment,o),M(ke.$$.fragment,o),M(io.$$.fragment,o),M(lo.$$.fragment,o),M(co.$$.fragment,o),M(mo.$$.fragment,o),M(Ie.$$.fragment,o),M(po.$$.fragment,o),M(ho.$$.fragment,o),M(uo.$$.fragment,o),M(vo.$$.fragment,o),M(De.$$.fragment,o),M(xo.$$.fragment,o),M(bo.$$.fragment,o),M(Ne.$$.fragment,o),M(Mo.$$.fragment,o),M(Se.$$.fragment,o),M($o.$$.fragment,o),M(To.$$.fragment,o),M(Lo.$$.fragment,o),M(We.$$.fragment,o),M(ko.$$.fragment,o),M(Eo.$$.fragment,o),M(Uo.$$.fragment,o),M(je.$$.fragment,o),M(Io.$$.fragment,o),M(Fo.$$.fragment,o),M(Co.$$.fragment,o),M(Ge.$$.fragment,o),M(Ve.$$.fragment,o),xr=!0)},o(o){$(s.$$.fragment,o),$(ye.$$.fragment,o),$(Oe.$$.fragment,o),$(He.$$.fragment,o),$(Xe.$$.fragment,o),$(Ke.$$.fragment,o),$(oo.$$.fragment,o),$(to.$$.fragment,o),$(ro.$$.fragment,o),$(Le.$$.fragment,o),$(ke.$$.fragment,o),$(io.$$.fragment,o),$(lo.$$.fragment,o),$(co.$$.fragment,o),$(mo.$$.fragment,o),$(Ie.$$.fragment,o),$(po.$$.fragment,o),$(ho.$$.fragment,o),$(uo.$$.fragment,o),$(vo.$$.fragment,o),$(De.$$.fragment,o),$(xo.$$.fragment,o),$(bo.$$.fragment,o),$(Ne.$$.fragment,o),$(Mo.$$.fragment,o),$(Se.$$.fragment,o),$($o.$$.fragment,o),$(To.$$.fragment,o),$(Lo.$$.fragment,o),$(We.$$.fragment,o),$(ko.$$.fragment,o),$(Eo.$$.fragment,o),$(Uo.$$.fragment,o),$(je.$$.fragment,o),$(Io.$$.fragment,o),$(Fo.$$.fragment,o),$(Co.$$.fragment,o),$(Ge.$$.fragment,o),$(Ve.$$.fragment,o),xr=!1},d(o){t(d),o&&t(_),o&&t(h),T(s),o&&t(j),o&&t(C),o&&t(O),T(ye,o),o&&t(ir),o&&t(ie),T(Oe),o&&t(lr),o&&t(z),T(He),T(Xe),T(Ke),o&&t(dr),o&&t(le),T(oo),o&&t(cr),o&&t(S),T(to),T(ro),T(Le),T(ke),T(io),o&&t(fr),o&&t(de),T(lo),o&&t(mr),o&&t(k),T(co),T(mo),T(Ie),T(po),T(ho),T(uo),T(vo),T(De),T(xo),T(bo),T(Ne),T(Mo),T(Se),o&&t(pr),o&&t(he),T($o),o&&t(hr),o&&t(Y),T(To),T(Lo),T(We),o&&t(ur),o&&t(ge),T(ko),o&&t(gr),o&&t(_e),T(Eo),T(Uo),T(je),o&&t(_r),o&&t(ve),T(Io),o&&t(vr),o&&t(xe),T(Fo),T(Co),T(Ge),T(Ve)}}}const nl={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 al(E){return zi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ml extends ji{constructor(d){super();Ri(this,d,al,rl,Gi,{})}}export{ml as default,nl as metadata};
