import{S as na,i as aa,s as sa,e as n,k as m,w,t as i,M as ia,c as a,d as t,m as u,a as s,x as y,h as d,b as c,G as e,g as b,y as k,q as L,o as M,B as E,v as da,L as gn}from"../../chunks/vendor-hf-doc-builder.js";import{T as oe}from"../../chunks/Tip-hf-doc-builder.js";import{D as O}from"../../chunks/Docstring-hf-doc-builder.js";import{C as _n}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as mo}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as un}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function la(D){let r,v;return{c(){r=n("p"),v=i("This function is experimental and might change in the future.")},l(l){r=a(l,"P",{});var f=s(r);v=d(f,"This function is experimental and might change in the future."),f.forEach(t)},m(l,f){b(l,r,f),e(r,v)},d(l){l&&t(r)}}}function ca(D){let r,v,l,f,$,p,x,T;return{c(){r=n("p"),v=i("It is required to be logged in ("),l=n("code"),f=i("huggingface-cli login"),$=i(") when you want to use private or "),p=n("a"),x=i(`gated
models`),T=i("."),this.h()},l(h){r=a(h,"P",{});var g=s(r);v=d(g,"It is required to be logged in ("),l=a(g,"CODE",{});var P=s(l);f=d(P,"huggingface-cli login"),P.forEach(t),$=d(g,") when you want to use private or "),p=a(g,"A",{href:!0,rel:!0});var q=s(p);x=d(q,`gated
models`),q.forEach(t),T=d(g,"."),g.forEach(t),this.h()},h(){c(p,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),c(p,"rel","nofollow")},m(h,g){b(h,r,g),e(r,v),e(r,l),e(l,f),e(r,$),e(r,p),e(p,x),e(r,T)},d(h){h&&t(r)}}}function fa(D){let r,v;return{c(){r=n("p"),v=i("This function is experimental and might change in the future.")},l(l){r=a(l,"P",{});var f=s(r);v=d(f,"This function is experimental and might change in the future."),f.forEach(t)},m(l,f){b(l,r,f),e(r,v)},d(l){l&&t(r)}}}function pa(D){let r,v,l,f,$,p,x,T;return{c(){r=n("p"),v=i("It is required to be logged in ("),l=n("code"),f=i("huggingface-cli login"),$=i(") when you want to use private or "),p=n("a"),x=i(`gated
models`),T=i("."),this.h()},l(h){r=a(h,"P",{});var g=s(r);v=d(g,"It is required to be logged in ("),l=a(g,"CODE",{});var P=s(l);f=d(P,"huggingface-cli login"),P.forEach(t),$=d(g,") when you want to use private or "),p=a(g,"A",{href:!0,rel:!0});var q=s(p);x=d(q,`gated
models`),q.forEach(t),T=d(g,"."),g.forEach(t),this.h()},h(){c(p,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),c(p,"rel","nofollow")},m(h,g){b(h,r,g),e(r,v),e(r,l),e(l,f),e(r,$),e(r,p),e(p,x),e(r,T)},d(h){h&&t(r)}}}function ha(D){let r,v,l,f,$,p,x,T;return x=new _n({props:{code:`from diffusers import StableDiffusionPipeline
import torch

model_id = "runwayml/stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to("cuda")

pipe.load_textual_inversion("sd-concepts-library/cat-toy")

prompt = "A <cat-toy> backpack"

image = pipe(prompt, num_inference_steps=50).images[0]
image.save("cat-backpack.png")`,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(){r=n("p"),v=i("To load a textual inversion embedding vector in "),l=n("code"),f=i("diffusers"),$=i(" format:"),p=m(),w(x.$$.fragment)},l(h){r=a(h,"P",{});var g=s(r);v=d(g,"To load a textual inversion embedding vector in "),l=a(g,"CODE",{});var P=s(l);f=d(P,"diffusers"),P.forEach(t),$=d(g," format:"),g.forEach(t),p=u(h),y(x.$$.fragment,h)},m(h,g){b(h,r,g),e(r,v),e(r,l),e(l,f),e(r,$),b(h,p,g),k(x,h,g),T=!0},p:gn,i(h){T||(L(x.$$.fragment,h),T=!0)},o(h){M(x.$$.fragment,h),T=!1},d(h){h&&t(r),h&&t(p),E(x,h)}}}function ma(D){let r,v,l,f,$,p,x,T;return x=new _n({props:{code:`from diffusers import StableDiffusionPipeline
import torch

model_id = "runwayml/stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to("cuda")

pipe.load_textual_inversion("./charturnerv2.pt", token="charturnerv2")

prompt = "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."

image = pipe(prompt, num_inference_steps=50).images[0]
image.save("character.png")`,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(){r=n("p"),v=i("e.g. from "),l=n("a"),f=i("civitAI"),$=i(" and then load the vector locally:"),p=m(),w(x.$$.fragment),this.h()},l(h){r=a(h,"P",{});var g=s(r);v=d(g,"e.g. from "),l=a(g,"A",{href:!0,rel:!0});var P=s(l);f=d(P,"civitAI"),P.forEach(t),$=d(g," and then load the vector locally:"),g.forEach(t),p=u(h),y(x.$$.fragment,h),this.h()},h(){c(l,"href","https://civitai.com/models/3036?modelVersionId=9857"),c(l,"rel","nofollow")},m(h,g){b(h,r,g),e(r,v),e(r,l),e(l,f),e(r,$),b(h,p,g),k(x,h,g),T=!0},p:gn,i(h){T||(L(x.$$.fragment,h),T=!0)},o(h){M(x.$$.fragment,h),T=!1},d(h){h&&t(r),h&&t(p),E(x,h)}}}function ua(D){let r,v;return{c(){r=n("p"),v=i("This function is experimental and might change in the future.")},l(l){r=a(l,"P",{});var f=s(r);v=d(f,"This function is experimental and might change in the future."),f.forEach(t)},m(l,f){b(l,r,f),e(r,v)},d(l){l&&t(r)}}}function ga(D){let r,v;return{c(){r=n("p"),v=i("This function is experimental and might change in the future.")},l(l){r=a(l,"P",{});var f=s(r);v=d(f,"This function is experimental and might change in the future."),f.forEach(t)},m(l,f){b(l,r,f),e(r,v)},d(l){l&&t(r)}}}function _a(D){let r,v,l,f,$,p,x,T;return{c(){r=n("p"),v=i("It is required to be logged in ("),l=n("code"),f=i("huggingface-cli login"),$=i(") when you want to use private or "),p=n("a"),x=i(`gated
models`),T=i("."),this.h()},l(h){r=a(h,"P",{});var g=s(r);v=d(g,"It is required to be logged in ("),l=a(g,"CODE",{});var P=s(l);f=d(P,"huggingface-cli login"),P.forEach(t),$=d(g,") when you want to use private or "),p=a(g,"A",{href:!0,rel:!0});var q=s(p);x=d(q,`gated
models`),q.forEach(t),T=d(g,"."),g.forEach(t),this.h()},h(){c(p,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),c(p,"rel","nofollow")},m(h,g){b(h,r,g),e(r,v),e(r,l),e(l,f),e(r,$),e(r,p),e(p,x),e(r,T)},d(h){h&&t(r)}}}function va(D){let r,v;return{c(){r=n("p"),v=i("This function is experimental and might change in the future.")},l(l){r=a(l,"P",{});var f=s(r);v=d(f,"This function is experimental and might change in the future."),f.forEach(t)},m(l,f){b(l,r,f),e(r,v)},d(l){l&&t(r)}}}function ba(D){let r,v,l,f,$,p,x,T;return{c(){r=n("p"),v=i("It is required to be logged in ("),l=n("code"),f=i("huggingface-cli login"),$=i(") when you want to use private or "),p=n("a"),x=i(`gated
models`),T=i("."),this.h()},l(h){r=a(h,"P",{});var g=s(r);v=d(g,"It is required to be logged in ("),l=a(g,"CODE",{});var P=s(l);f=d(P,"huggingface-cli login"),P.forEach(t),$=d(g,") when you want to use private or "),p=a(g,"A",{href:!0,rel:!0});var q=s(p);x=d(q,`gated
models`),q.forEach(t),T=d(g,"."),g.forEach(t),this.h()},h(){c(p,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),c(p,"rel","nofollow")},m(h,g){b(h,r,g),e(r,v),e(r,l),e(l,f),e(r,$),e(r,p),e(p,x),e(r,T)},d(h){h&&t(r)}}}function xa(D){let r,v,l,f,$;return f=new _n({props:{code:`from diffusers import StableDiffusionPipeline

# Download pipeline from huggingface.co and cache.
pipeline = StableDiffusionPipeline.from_ckpt(
    "https://huggingface.co/WarriorMama777/OrangeMixs/blob/main/Models/AbyssOrangeMix/AbyssOrangeMix.safetensors"
)

# Download pipeline from local file
# file is downloaded under ./v1-5-pruned-emaonly.ckpt
pipeline = StableDiffusionPipeline.from_ckpt("./v1-5-pruned-emaonly")

# Enable float16 and move to GPU
pipeline = StableDiffusionPipeline.from_ckpt(
    "https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned-emaonly.ckpt",
    torch_dtype=torch.float16,
)
pipeline.to("cuda")`,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_ckpt(
<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_ckpt(<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_ckpt(
<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(){r=n("p"),v=i("Examples:"),l=m(),w(f.$$.fragment)},l(p){r=a(p,"P",{});var x=s(r);v=d(x,"Examples:"),x.forEach(t),l=u(p),y(f.$$.fragment,p)},m(p,x){b(p,r,x),e(r,v),b(p,l,x),k(f,p,x),$=!0},p:gn,i(p){$||(L(f.$$.fragment,p),$=!0)},o(p){M(f.$$.fragment,p),$=!1},d(p){p&&t(r),p&&t(l),E(f,p)}}}function $a(D){let r,v,l,f,$,p,x,T,h,g,P,q,tt,H,uo,no,Et,Tt,go,Pe,Dt,Pt,_o,Ce,Ct,rt,te,It,re,vo,At,qt,Nt,nt,Ie,bo,Ut,St,at,B,ne,xo,Ae,Ft,$o,jt,st,G,ae,wo,qe,Wt,yo,Ot,it,z,Ne,zt,U,Ue,Vt,V,Rt,ko,Ht,Bt,Se,Lo,Gt,Xt,Mo,Jt,Kt,Qt,se,Yt,ie,Zt,de,Fe,er,je,or,ao,tr,rr,dt,X,le,Eo,We,nr,To,ar,lt,N,Oe,sr,Do,ir,dr,C,ze,lr,J,cr,Po,fr,pr,Co,hr,mr,ur,ce,gr,fe,_r,Io,vr,br,pe,xr,Ao,$r,wr,he,yr,me,Ve,kr,qo,Lr,ct,K,ue,No,Re,Mr,Uo,Er,ft,I,He,Tr,Q,Dr,so,Pr,Cr,Be,So,Ir,Ar,qr,ge,Nr,S,Ge,Ur,Xe,Sr,Je,Fo,Fr,jr,Wr,_e,Or,ve,zr,F,Ke,Vr,Y,Rr,io,Hr,Br,Qe,jo,Gr,Xr,Jr,be,Kr,xe,Qr,$e,Ye,Yr,Wo,Zr,pt,Z,we,Oo,Ze,en,zo,on,ht,R,eo,tn,Vo,rn,nn,j,oo,an,Ro,sn,dn,to,ln,Ho,cn,fn,pn,ye,mt;return p=new mo({}),Ae=new mo({}),qe=new mo({}),Ne=new O({props:{name:"class diffusers.loaders.UNet2DConditionLoadersMixin",anchor:"diffusers.loaders.UNet2DConditionLoadersMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/loaders.py#L89"}}),Ue=new O({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 <em>model id</em> of a pretrained model hosted inside a model repo on huggingface.co.
Valid model ids should have an organization name, like <code>google/ddpm-celebahq-256</code>.</li>
<li>A path to a <em>directory</em> containing model weights saved using <code>~ModelMixin.save_config</code>, e.g.,
<code>./my_model_directory/</code>.</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 in which a downloaded pretrained model configuration should be cached if the
standard cache should not be 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 delete incompletely received files. Will attempt to resume the download if such a
file exists.`,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, e.g., <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(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only(bool,"},{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>, will use the token generated
when running <code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"use_auth_token"},{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be 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;
In case the relevant files are located inside a subfolder of the model repo (either remote in
huggingface.co or downloaded locally), you can specify the folder name here.`,name:"subfolder"},{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/loaders.py#L90"}}),se=new oe({props:{warning:!0,$$slots:{default:[la]},$$scope:{ctx:D}}}),ie=new oe({props:{$$slots:{default:[ca]},$$scope:{ctx:D}}}),Fe=new O({props:{name:"save_attn_procs",anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.save_attn_procs",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.UNet2DConditionLoadersMixin.save_attn_procs.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to which to save. 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 when in distributed training like
TPUs and 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 on distributed training like TPUs when one
need to replace <code>torch.save</code> by another method. Can be configured with the environment variable
<code>DIFFUSERS_SAVE_MODE</code>.`,name:"save_function"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/loaders.py#L281"}}),We=new mo({}),Oe=new O({props:{name:"class diffusers.loaders.TextualInversionLoaderMixin",anchor:"diffusers.loaders.TextualInversionLoaderMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/loaders.py#L358"}}),ze=new O({props:{name:"load_textual_inversion",anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, typing.Dict[str, torch.Tensor]]"},{name:"token",val:": typing.Optional[str] = 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>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> of a pretrained model hosted inside a model repo on huggingface.co.
Valid model ids should have an organization name, like
<code>&quot;sd-concepts-library/low-poly-hd-logos-icons&quot;</code>.</li>
<li>A path to a <em>directory</em> containing textual inversion weights, e.g.
<code>./my_text_inversion_directory/</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{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 in two cases:</p>
<ul>
<li>The saved textual inversion file is in <code>diffusers</code> 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 &#x201C;Automatic1111&#x201D; form.</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 in which a downloaded pretrained model configuration should be cached if the
standard cache should not be 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 delete incompletely received files. Will attempt to resume the download if such a
file exists.`,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, e.g., <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(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only(bool,"},{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>, will use the token generated
when running <code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>).`,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, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be 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;
In case the relevant files are located inside a subfolder of the model repo (either remote in
huggingface.co or downloaded locally), you can specify the folder name here.`,name:"subfolder"},{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/loaders.py#L420"}}),ce=new oe({props:{warning:!0,$$slots:{default:[fa]},$$scope:{ctx:D}}}),fe=new oe({props:{$$slots:{default:[pa]},$$scope:{ctx:D}}}),pe=new un({props:{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.example",$$slots:{default:[ha]},$$scope:{ctx:D}}}),he=new un({props:{anchor:"diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion.example-2",$$slots:{default:[ma]},$$scope:{ctx:D}}}),Ve=new O({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.16.0/src/diffusers/loaders.py#L363",returnDescription:`
<p>The converted prompt</p>
`,returnType:`
<p><code>str</code> or list of <code>str</code></p>
`}}),Re=new mo({}),He=new O({props:{name:"class diffusers.loaders.LoraLoaderMixin",anchor:"diffusers.loaders.LoraLoaderMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/loaders.py#L664"}}),ge=new oe({props:{warning:!0,$$slots:{default:[ua]},$$scope:{ctx:D}}}),Ge=new O({props:{name:"load_attn_procs",anchor:"diffusers.loaders.LoraLoaderMixin.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.LoraLoaderMixin.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 <em>model id</em> of a pretrained model hosted inside a model repo on huggingface.co.
Valid model ids should have an organization name, like <code>google/ddpm-celebahq-256</code>.</li>
<li>A path to a <em>directory</em> containing model weights saved using <code>~ModelMixin.save_config</code>, e.g.,
<code>./my_model_directory/</code>.</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.load_attn_procs.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory in which a downloaded pretrained model configuration should be cached if the
standard cache should not be used.`,name:"cache_dir"},{anchor:"diffusers.loaders.LoraLoaderMixin.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.LoraLoaderMixin.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 delete incompletely received files. Will attempt to resume the download if such a
file exists.`,name:"resume_download"},{anchor:"diffusers.loaders.LoraLoaderMixin.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, e.g., <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.load_attn_procs.local_files_only(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only(bool,"},{anchor:"diffusers.loaders.LoraLoaderMixin.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>, will use the token generated
when running <code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"use_auth_token"},{anchor:"diffusers.loaders.LoraLoaderMixin.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, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be any
identifier allowed by git.`,name:"revision"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_attn_procs.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
In case the relevant files are located inside a subfolder of the model repo (either remote in
huggingface.co or downloaded locally), you can specify the folder name here.`,name:"subfolder"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_attn_procs.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/loaders.py#L875",returnDescription:`
<p>Mapping between the module names and their corresponding
<code>LoRAAttnProcessor</code>.</p>
`,returnType:`
<p><code>Dict[name, LoRAAttnProcessor]</code></p>
`}}),_e=new oe({props:{warning:!0,$$slots:{default:[ga]},$$scope:{ctx:D}}}),ve=new oe({props:{$$slots:{default:[_a]},$$scope:{ctx:D}}}),Ke=new O({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;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> of a pretrained model hosted inside a model repo on huggingface.co.
Valid model ids should have an organization name, like <code>google/ddpm-celebahq-256</code>.</li>
<li>A path to a <em>directory</em> containing model weights saved using <code>~ModelMixin.save_config</code>, e.g.,
<code>./my_model_directory/</code>.</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.load_lora_weights.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory in which a downloaded pretrained model configuration should be cached if the
standard cache should not be used.`,name:"cache_dir"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_weights.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.load_lora_weights.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to delete incompletely received files. Will attempt to resume the download if such a
file exists.`,name:"resume_download"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_weights.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, e.g., <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.load_lora_weights.local_files_only(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only(bool,"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_weights.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>, will use the token generated
when running <code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"use_auth_token"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_weights.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, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be any
identifier allowed by git.`,name:"revision"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_weights.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
In case the relevant files are located inside a subfolder of the model repo (either remote in
huggingface.co or downloaded locally), you can specify the folder name here.`,name:"subfolder"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_weights.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/loaders.py#L678"}}),be=new oe({props:{warning:!0,$$slots:{default:[va]},$$scope:{ctx:D}}}),xe=new oe({props:{$$slots:{default:[ba]},$$scope:{ctx:D}}}),Ye=new O({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, torch.nn.modules.module.Module] = None"},{name:"text_encoder_lora_layers",val:": typing.Dict[str, torch.nn.modules.module.Module] = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.loaders.LoraLoaderMixin.save_lora_weights.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to which to save. 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>]) &#x2014;
State dict of the LoRA layers corresponding to the UNet. Specifying this helps to make the
serialization process easier and cleaner.`,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>]) &#x2014;
State dict of the LoRA layers corresponding to the <code>text_encoder</code>. Since the <code>text_encoder</code> comes from
<code>transformers</code>, we cannot rejig it. That is why we have to explicitly pass the text encoder LoRA state
dict.`,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 when in distributed training like
TPUs and 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 on distributed training like TPUs when one
need to replace <code>torch.save</code> by another method. Can be configured with the environment variable
<code>DIFFUSERS_SAVE_MODE</code>.`,name:"save_function"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/loaders.py#L1038"}}),Ze=new mo({}),eo=new O({props:{name:"class diffusers.loaders.FromCkptMixin",anchor:"diffusers.loaders.FromCkptMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/loaders.py#L1112"}}),oo=new O({props:{name:"from_ckpt",anchor:"diffusers.loaders.FromCkptMixin.from_ckpt",parameters:[{name:"pretrained_model_link_or_path",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.FromCkptMixin.from_ckpt.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 .ckpt file on the Hub. Should be in the format
<code>&quot;https://huggingface.co/&lt;repo_id&gt;/blob/main/&lt;path_to_file&gt;&quot;</code></li>
<li>A path to a <em>file</em> containing all pipeline weights.</li>
</ul>`,name:"pretrained_model_link_or_path"},{anchor:"diffusers.loaders.FromCkptMixin.from_ckpt.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 under this dtype. If <code>&quot;auto&quot;</code> is passed the dtype
will be automatically derived from the model&#x2019;s weights.`,name:"torch_dtype"},{anchor:"diffusers.loaders.FromCkptMixin.from_ckpt.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.FromCkptMixin.from_ckpt.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory in which a downloaded pretrained model configuration should be cached if the
standard cache should not be used.`,name:"cache_dir"},{anchor:"diffusers.loaders.FromCkptMixin.from_ckpt.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to delete incompletely received files. Will attempt to resume the download if such a
file exists.`,name:"resume_download"},{anchor:"diffusers.loaders.FromCkptMixin.from_ckpt.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, e.g., <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.FromCkptMixin.from_ckpt.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only"},{anchor:"diffusers.loaders.FromCkptMixin.from_ckpt.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>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"use_auth_token"},{anchor:"diffusers.loaders.FromCkptMixin.from_ckpt.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, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be any
identifier allowed by git.`,name:"revision"},{anchor:"diffusers.loaders.FromCkptMixin.from_ckpt.use_safetensors",description:`<strong>use_safetensors</strong> (<code>bool</code>, <em>optional</em> ) &#x2014;
If set to <code>True</code>, the pipeline will be loaded from <code>safetensors</code> weights. If set to <code>None</code> (the
default). The pipeline will load using <code>safetensors</code> if the safetensors weights are available <em>and</em> if
<code>safetensors</code> is installed. If the to <code>False</code> the pipeline will <em>not</em> use <code>safetensors</code>.`,name:"use_safetensors"},{anchor:"diffusers.loaders.FromCkptMixin.from_ckpt.extract_ema",description:`<strong>extract_ema</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014; Only relevant for
checkpoints that have both EMA and non-EMA weights. Whether to extract the EMA weights or not. Defaults
to <code>False</code>. Pass <code>True</code> to extract the EMA weights. EMA weights usually yield higher quality images for
inference. Non-EMA weights are usually better to continue fine-tuning.`,name:"extract_ema"},{anchor:"diffusers.loaders.FromCkptMixin.from_ckpt.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. This is necessary when running stable`,name:"upcast_attention"},{anchor:"diffusers.loaders.FromCkptMixin.from_ckpt.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The image size that the model was trained on. Use 512 for Stable Diffusion v1.X and Stable Diffusion v2
Base. Use 768 for Stable Diffusion v2.`,name:"image_size"},{anchor:"diffusers.loaders.FromCkptMixin.from_ckpt.prediction_type",description:`<strong>prediction_type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The prediction type that the model was trained on. Use <code>&apos;epsilon&apos;</code> for Stable Diffusion v1.X and Stable
Diffusion v2 Base. Use <code>&apos;v_prediction&apos;</code> for Stable Diffusion v2.`,name:"prediction_type"},{anchor:"diffusers.loaders.FromCkptMixin.from_ckpt.num_in_channels",description:`<strong>num_in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
The number of input channels. If <code>None</code>, it will be automatically inferred.`,name:"num_in_channels"},{anchor:"diffusers.loaders.FromCkptMixin.from_ckpt.scheduler_type",description:`<strong>scheduler_type</strong> (<code>str</code>, <em>optional</em>, defaults to &#x2018;pndm&#x2019;) &#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.FromCkptMixin.from_ckpt.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. Defaults to <code>True</code>.`,name:"load_safety_checker"},{anchor:"diffusers.loaders.FromCkptMixin.from_ckpt.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) &#x2014;
Can be used to overwrite load - and saveable variables - <em>i.e.</em> the pipeline components - of the
specific pipeline class. The overwritten components are then 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.16.0/src/diffusers/loaders.py#L1116"}}),ye=new un({props:{anchor:"diffusers.loaders.FromCkptMixin.from_ckpt.example",$$slots:{default:[xa]},$$scope:{ctx:D}}}),{c(){r=n("meta"),v=m(),l=n("h1"),f=n("a"),$=n("span"),w(p.$$.fragment),x=m(),T=n("span"),h=i("Loaders"),g=m(),P=n("p"),q=i("There are many ways to train adapter neural networks for diffusion models, such as"),tt=m(),H=n("ul"),uo=n("li"),no=n("a"),Et=i("Textual Inversion"),Tt=m(),go=n("li"),Pe=n("a"),Dt=i("LoRA"),Pt=m(),_o=n("li"),Ce=n("a"),Ct=i("Hypernetworks"),rt=m(),te=n("p"),It=i(`Such adapter neural networks often only consist of a fraction of the number of weights compared
to the pretrained model and as such are very portable. The Diffusers library offers an easy-to-use
API to load such adapter neural networks via the `),re=n("a"),vo=n("code"),At=i("loaders.py"),qt=i(" module"),Nt=i("."),nt=m(),Ie=n("p"),bo=n("strong"),Ut=i("Note"),St=i(": This module is still highly experimental and prone to future changes."),at=m(),B=n("h2"),ne=n("a"),xo=n("span"),w(Ae.$$.fragment),Ft=m(),$o=n("span"),jt=i("LoaderMixins"),st=m(),G=n("h3"),ae=n("a"),wo=n("span"),w(qe.$$.fragment),Wt=m(),yo=n("span"),Ot=i("UNet2DConditionLoadersMixin"),it=m(),z=n("div"),w(Ne.$$.fragment),zt=m(),U=n("div"),w(Ue.$$.fragment),Vt=m(),V=n("p"),Rt=i("Load pretrained attention processor layers into "),ko=n("code"),Ht=i("UNet2DConditionModel"),Bt=i(`. Attention processor layers have to be
defined in
`),Se=n("a"),Lo=n("code"),Gt=i("cross_attention.py"),Xt=i(`
and be a `),Mo=n("code"),Jt=i("torch.nn.Module"),Kt=i(" class."),Qt=m(),w(se.$$.fragment),Yt=m(),w(ie.$$.fragment),Zt=m(),de=n("div"),w(Fe.$$.fragment),er=m(),je=n("p"),or=i(`Save an attention processor to a directory, so that it can be re-loaded using the
`),ao=n("a"),tr=i("load_attn_procs()"),rr=i(" method."),dt=m(),X=n("h3"),le=n("a"),Eo=n("span"),w(We.$$.fragment),nr=m(),To=n("span"),ar=i("TextualInversionLoaderMixin"),lt=m(),N=n("div"),w(Oe.$$.fragment),sr=m(),Do=n("p"),ir=i("Mixin class for loading textual inversion tokens and embeddings to the tokenizer and text encoder."),dr=m(),C=n("div"),w(ze.$$.fragment),lr=m(),J=n("p"),cr=i("Load textual inversion embeddings into the text encoder of stable diffusion pipelines. Both "),Po=n("code"),fr=i("diffusers"),pr=i(` and
`),Co=n("code"),hr=i("Automatic1111"),mr=i(" formats are supported (see example below)."),ur=m(),w(ce.$$.fragment),gr=m(),w(fe.$$.fragment),_r=m(),Io=n("p"),vr=i("Example:"),br=m(),w(pe.$$.fragment),xr=m(),Ao=n("p"),$r=i("To load a textual inversion embedding vector in Automatic1111 format, make sure to first download the vector,"),wr=m(),w(he.$$.fragment),yr=m(),me=n("div"),w(Ve.$$.fragment),kr=m(),qo=n("p"),Lr=i(`Maybe convert a prompt into a \u201Cmulti vector\u201D-compatible prompt. If the prompt includes a token that corresponds
to a multi-vector textual inversion embedding, this function will process the prompt so that the special token
is replaced with multiple special tokens each corresponding to one of the vectors. If the prompt has no textual
inversion token or a textual inversion token that is a single vector, the input prompt is simply returned.`),ct=m(),K=n("h3"),ue=n("a"),No=n("span"),w(Re.$$.fragment),Mr=m(),Uo=n("span"),Er=i("LoraLoaderMixin"),ft=m(),I=n("div"),w(He.$$.fragment),Tr=m(),Q=n("p"),Dr=i("Utility class for handling the loading LoRA layers into UNet (of class "),so=n("a"),Pr=i("UNet2DConditionModel"),Cr=i(`) and Text Encoder
(of class `),Be=n("a"),So=n("code"),Ir=i("CLIPTextModel"),Ar=i(")."),qr=m(),w(ge.$$.fragment),Nr=m(),S=n("div"),w(Ge.$$.fragment),Ur=m(),Xe=n("p"),Sr=i(`Load pretrained attention processor layers for
`),Je=n("a"),Fo=n("code"),Fr=i("CLIPTextModel"),jr=i("."),Wr=m(),w(_e.$$.fragment),Or=m(),w(ve.$$.fragment),zr=m(),F=n("div"),w(Ke.$$.fragment),Vr=m(),Y=n("p"),Rr=i("Load pretrained attention processor layers (such as LoRA) into "),io=n("a"),Hr=i("UNet2DConditionModel"),Br=i(` and
`),Qe=n("a"),jo=n("code"),Gr=i("CLIPTextModel"),Xr=i(")."),Jr=m(),w(be.$$.fragment),Kr=m(),w(xe.$$.fragment),Qr=m(),$e=n("div"),w(Ye.$$.fragment),Yr=m(),Wo=n("p"),Zr=i("Save the LoRA parameters corresponding to the UNet and the text encoder."),pt=m(),Z=n("h3"),we=n("a"),Oo=n("span"),w(Ze.$$.fragment),en=m(),zo=n("span"),on=i("FromCkptMixin"),ht=m(),R=n("div"),w(eo.$$.fragment),tn=m(),Vo=n("p"),rn=i(`This helper class allows to directly load .ckpt stable diffusion file_extension
into the respective classes.`),nn=m(),j=n("div"),w(oo.$$.fragment),an=m(),Ro=n("p"),sn=i("Instantiate a PyTorch diffusion pipeline from pre-trained pipeline weights saved in the original .ckpt format."),dn=m(),to=n("p"),ln=i("The pipeline is set in evaluation mode by default using "),Ho=n("code"),cn=i("model.eval()"),fn=i(" (Dropout modules are deactivated)."),pn=m(),w(ye.$$.fragment),this.h()},l(o){const _=ia('[data-svelte="svelte-1phssyn"]',document.head);r=a(_,"META",{name:!0,content:!0}),_.forEach(t),v=u(o),l=a(o,"H1",{class:!0});var ro=s(l);f=a(ro,"A",{id:!0,class:!0,href:!0});var Bo=s(f);$=a(Bo,"SPAN",{});var Go=s($);y(p.$$.fragment,Go),Go.forEach(t),Bo.forEach(t),x=u(ro),T=a(ro,"SPAN",{});var Xo=s(T);h=d(Xo,"Loaders"),Xo.forEach(t),ro.forEach(t),g=u(o),P=a(o,"P",{});var Jo=s(P);q=d(Jo,"There are many ways to train adapter neural networks for diffusion models, such as"),Jo.forEach(t),tt=u(o),H=a(o,"UL",{});var ee=s(H);uo=a(ee,"LI",{});var Ko=s(uo);no=a(Ko,"A",{href:!0});var Qo=s(no);Et=d(Qo,"Textual Inversion"),Qo.forEach(t),Ko.forEach(t),Tt=u(ee),go=a(ee,"LI",{});var Yo=s(go);Pe=a(Yo,"A",{href:!0,rel:!0});var Zo=s(Pe);Dt=d(Zo,"LoRA"),Zo.forEach(t),Yo.forEach(t),Pt=u(ee),_o=a(ee,"LI",{});var et=s(_o);Ce=a(et,"A",{href:!0,rel:!0});var ot=s(Ce);Ct=d(ot,"Hypernetworks"),ot.forEach(t),et.forEach(t),ee.forEach(t),rt=u(o),te=a(o,"P",{});var ut=s(te);It=d(ut,`Such adapter neural networks often only consist of a fraction of the number of weights compared
to the pretrained model and as such are very portable. The Diffusers library offers an easy-to-use
API to load such adapter neural networks via the `),re=a(ut,"A",{href:!0,rel:!0});var hn=s(re);vo=a(hn,"CODE",{});var vn=s(vo);At=d(vn,"loaders.py"),vn.forEach(t),qt=d(hn," module"),hn.forEach(t),Nt=d(ut,"."),ut.forEach(t),nt=u(o),Ie=a(o,"P",{});var mn=s(Ie);bo=a(mn,"STRONG",{});var bn=s(bo);Ut=d(bn,"Note"),bn.forEach(t),St=d(mn,": This module is still highly experimental and prone to future changes."),mn.forEach(t),at=u(o),B=a(o,"H2",{class:!0});var gt=s(B);ne=a(gt,"A",{id:!0,class:!0,href:!0});var xn=s(ne);xo=a(xn,"SPAN",{});var $n=s(xo);y(Ae.$$.fragment,$n),$n.forEach(t),xn.forEach(t),Ft=u(gt),$o=a(gt,"SPAN",{});var wn=s($o);jt=d(wn,"LoaderMixins"),wn.forEach(t),gt.forEach(t),st=u(o),G=a(o,"H3",{class:!0});var _t=s(G);ae=a(_t,"A",{id:!0,class:!0,href:!0});var yn=s(ae);wo=a(yn,"SPAN",{});var kn=s(wo);y(qe.$$.fragment,kn),kn.forEach(t),yn.forEach(t),Wt=u(_t),yo=a(_t,"SPAN",{});var Ln=s(yo);Ot=d(Ln,"UNet2DConditionLoadersMixin"),Ln.forEach(t),_t.forEach(t),it=u(o),z=a(o,"DIV",{class:!0});var lo=s(z);y(Ne.$$.fragment,lo),zt=u(lo),U=a(lo,"DIV",{class:!0});var ke=s(U);y(Ue.$$.fragment,ke),Vt=u(ke),V=a(ke,"P",{});var Le=s(V);Rt=d(Le,"Load pretrained attention processor layers into "),ko=a(Le,"CODE",{});var Mn=s(ko);Ht=d(Mn,"UNet2DConditionModel"),Mn.forEach(t),Bt=d(Le,`. Attention processor layers have to be
defined in
`),Se=a(Le,"A",{href:!0,rel:!0});var En=s(Se);Lo=a(En,"CODE",{});var Tn=s(Lo);Gt=d(Tn,"cross_attention.py"),Tn.forEach(t),En.forEach(t),Xt=d(Le,`
and be a `),Mo=a(Le,"CODE",{});var Dn=s(Mo);Jt=d(Dn,"torch.nn.Module"),Dn.forEach(t),Kt=d(Le," class."),Le.forEach(t),Qt=u(ke),y(se.$$.fragment,ke),Yt=u(ke),y(ie.$$.fragment,ke),ke.forEach(t),Zt=u(lo),de=a(lo,"DIV",{class:!0});var vt=s(de);y(Fe.$$.fragment,vt),er=u(vt),je=a(vt,"P",{});var bt=s(je);or=d(bt,`Save an attention processor to a directory, so that it can be re-loaded using the
`),ao=a(bt,"A",{href:!0});var Pn=s(ao);tr=d(Pn,"load_attn_procs()"),Pn.forEach(t),rr=d(bt," method."),bt.forEach(t),vt.forEach(t),lo.forEach(t),dt=u(o),X=a(o,"H3",{class:!0});var xt=s(X);le=a(xt,"A",{id:!0,class:!0,href:!0});var Cn=s(le);Eo=a(Cn,"SPAN",{});var In=s(Eo);y(We.$$.fragment,In),In.forEach(t),Cn.forEach(t),nr=u(xt),To=a(xt,"SPAN",{});var An=s(To);ar=d(An,"TextualInversionLoaderMixin"),An.forEach(t),xt.forEach(t),lt=u(o),N=a(o,"DIV",{class:!0});var Me=s(N);y(Oe.$$.fragment,Me),sr=u(Me),Do=a(Me,"P",{});var qn=s(Do);ir=d(qn,"Mixin class for loading textual inversion tokens and embeddings to the tokenizer and text encoder."),qn.forEach(t),dr=u(Me),C=a(Me,"DIV",{class:!0});var A=s(C);y(ze.$$.fragment,A),lr=u(A),J=a(A,"P",{});var co=s(J);cr=d(co,"Load textual inversion embeddings into the text encoder of stable diffusion pipelines. Both "),Po=a(co,"CODE",{});var Nn=s(Po);fr=d(Nn,"diffusers"),Nn.forEach(t),pr=d(co,` and
`),Co=a(co,"CODE",{});var Un=s(Co);hr=d(Un,"Automatic1111"),Un.forEach(t),mr=d(co," formats are supported (see example below)."),co.forEach(t),ur=u(A),y(ce.$$.fragment,A),gr=u(A),y(fe.$$.fragment,A),_r=u(A),Io=a(A,"P",{});var Sn=s(Io);vr=d(Sn,"Example:"),Sn.forEach(t),br=u(A),y(pe.$$.fragment,A),xr=u(A),Ao=a(A,"P",{});var Fn=s(Ao);$r=d(Fn,"To load a textual inversion embedding vector in Automatic1111 format, make sure to first download the vector,"),Fn.forEach(t),wr=u(A),y(he.$$.fragment,A),A.forEach(t),yr=u(Me),me=a(Me,"DIV",{class:!0});var $t=s(me);y(Ve.$$.fragment,$t),kr=u($t),qo=a($t,"P",{});var jn=s(qo);Lr=d(jn,`Maybe convert a prompt into a \u201Cmulti vector\u201D-compatible prompt. If the prompt includes a token that corresponds
to a multi-vector textual inversion embedding, this function will process the prompt so that the special token
is replaced with multiple special tokens each corresponding to one of the vectors. If the prompt has no textual
inversion token or a textual inversion token that is a single vector, the input prompt is simply returned.`),jn.forEach(t),$t.forEach(t),Me.forEach(t),ct=u(o),K=a(o,"H3",{class:!0});var wt=s(K);ue=a(wt,"A",{id:!0,class:!0,href:!0});var Wn=s(ue);No=a(Wn,"SPAN",{});var On=s(No);y(Re.$$.fragment,On),On.forEach(t),Wn.forEach(t),Mr=u(wt),Uo=a(wt,"SPAN",{});var zn=s(Uo);Er=d(zn,"LoraLoaderMixin"),zn.forEach(t),wt.forEach(t),ft=u(o),I=a(o,"DIV",{class:!0});var W=s(I);y(He.$$.fragment,W),Tr=u(W),Q=a(W,"P",{});var fo=s(Q);Dr=d(fo,"Utility class for handling the loading LoRA layers into UNet (of class "),so=a(fo,"A",{href:!0});var Vn=s(so);Pr=d(Vn,"UNet2DConditionModel"),Vn.forEach(t),Cr=d(fo,`) and Text Encoder
(of class `),Be=a(fo,"A",{href:!0,rel:!0});var Rn=s(Be);So=a(Rn,"CODE",{});var Hn=s(So);Ir=d(Hn,"CLIPTextModel"),Hn.forEach(t),Rn.forEach(t),Ar=d(fo,")."),fo.forEach(t),qr=u(W),y(ge.$$.fragment,W),Nr=u(W),S=a(W,"DIV",{class:!0});var Ee=s(S);y(Ge.$$.fragment,Ee),Ur=u(Ee),Xe=a(Ee,"P",{});var yt=s(Xe);Sr=d(yt,`Load pretrained attention processor layers for
`),Je=a(yt,"A",{href:!0,rel:!0});var Bn=s(Je);Fo=a(Bn,"CODE",{});var Gn=s(Fo);Fr=d(Gn,"CLIPTextModel"),Gn.forEach(t),Bn.forEach(t),jr=d(yt,"."),yt.forEach(t),Wr=u(Ee),y(_e.$$.fragment,Ee),Or=u(Ee),y(ve.$$.fragment,Ee),Ee.forEach(t),zr=u(W),F=a(W,"DIV",{class:!0});var Te=s(F);y(Ke.$$.fragment,Te),Vr=u(Te),Y=a(Te,"P",{});var po=s(Y);Rr=d(po,"Load pretrained attention processor layers (such as LoRA) into "),io=a(po,"A",{href:!0});var Xn=s(io);Hr=d(Xn,"UNet2DConditionModel"),Xn.forEach(t),Br=d(po,` and
`),Qe=a(po,"A",{href:!0,rel:!0});var Jn=s(Qe);jo=a(Jn,"CODE",{});var Kn=s(jo);Gr=d(Kn,"CLIPTextModel"),Kn.forEach(t),Jn.forEach(t),Xr=d(po,")."),po.forEach(t),Jr=u(Te),y(be.$$.fragment,Te),Kr=u(Te),y(xe.$$.fragment,Te),Te.forEach(t),Qr=u(W),$e=a(W,"DIV",{class:!0});var kt=s($e);y(Ye.$$.fragment,kt),Yr=u(kt),Wo=a(kt,"P",{});var Qn=s(Wo);Zr=d(Qn,"Save the LoRA parameters corresponding to the UNet and the text encoder."),Qn.forEach(t),kt.forEach(t),W.forEach(t),pt=u(o),Z=a(o,"H3",{class:!0});var Lt=s(Z);we=a(Lt,"A",{id:!0,class:!0,href:!0});var Yn=s(we);Oo=a(Yn,"SPAN",{});var Zn=s(Oo);y(Ze.$$.fragment,Zn),Zn.forEach(t),Yn.forEach(t),en=u(Lt),zo=a(Lt,"SPAN",{});var ea=s(zo);on=d(ea,"FromCkptMixin"),ea.forEach(t),Lt.forEach(t),ht=u(o),R=a(o,"DIV",{class:!0});var ho=s(R);y(eo.$$.fragment,ho),tn=u(ho),Vo=a(ho,"P",{});var oa=s(Vo);rn=d(oa,`This helper class allows to directly load .ckpt stable diffusion file_extension
into the respective classes.`),oa.forEach(t),nn=u(ho),j=a(ho,"DIV",{class:!0});var De=s(j);y(oo.$$.fragment,De),an=u(De),Ro=a(De,"P",{});var ta=s(Ro);sn=d(ta,"Instantiate a PyTorch diffusion pipeline from pre-trained pipeline weights saved in the original .ckpt format."),ta.forEach(t),dn=u(De),to=a(De,"P",{});var Mt=s(to);ln=d(Mt,"The pipeline is set in evaluation mode by default using "),Ho=a(Mt,"CODE",{});var ra=s(Ho);cn=d(ra,"model.eval()"),ra.forEach(t),fn=d(Mt," (Dropout modules are deactivated)."),Mt.forEach(t),pn=u(De),y(ye.$$.fragment,De),De.forEach(t),ho.forEach(t),this.h()},h(){c(r,"name","hf:doc:metadata"),c(r,"content",JSON.stringify(wa)),c(f,"id","loaders"),c(f,"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"),c(f,"href","#loaders"),c(l,"class","relative group"),c(no,"href","./training/text_inversion.mdx"),c(Pe,"href","https://github.com/cloneofsimo/lora"),c(Pe,"rel","nofollow"),c(Ce,"href","https://arxiv.org/abs/1609.09106"),c(Ce,"rel","nofollow"),c(re,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders.py"),c(re,"rel","nofollow"),c(ne,"id","loadermixins"),c(ne,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ne,"href","#loadermixins"),c(B,"class","relative group"),c(ae,"id","diffusers.loaders.UNet2DConditionLoadersMixin"),c(ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ae,"href","#diffusers.loaders.UNet2DConditionLoadersMixin"),c(G,"class","relative group"),c(Se,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py"),c(Se,"rel","nofollow"),c(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ao,"href","/docs/diffusers/v0.16.0/en/api/loaders#diffusers.loaders.UNet2DConditionLoadersMixin.load_attn_procs"),c(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(le,"id","diffusers.loaders.TextualInversionLoaderMixin"),c(le,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(le,"href","#diffusers.loaders.TextualInversionLoaderMixin"),c(X,"class","relative group"),c(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ue,"id","diffusers.loaders.LoraLoaderMixin"),c(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"),c(ue,"href","#diffusers.loaders.LoraLoaderMixin"),c(K,"class","relative group"),c(so,"href","/docs/diffusers/v0.16.0/en/api/models#diffusers.UNet2DConditionModel"),c(Be,"href","https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel"),c(Be,"rel","nofollow"),c(Je,"href","https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel"),c(Je,"rel","nofollow"),c(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(io,"href","/docs/diffusers/v0.16.0/en/api/models#diffusers.UNet2DConditionModel"),c(Qe,"href","https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel"),c(Qe,"rel","nofollow"),c(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(we,"id","diffusers.loaders.FromCkptMixin"),c(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"),c(we,"href","#diffusers.loaders.FromCkptMixin"),c(Z,"class","relative group"),c(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(R,"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,_){e(document.head,r),b(o,v,_),b(o,l,_),e(l,f),e(f,$),k(p,$,null),e(l,x),e(l,T),e(T,h),b(o,g,_),b(o,P,_),e(P,q),b(o,tt,_),b(o,H,_),e(H,uo),e(uo,no),e(no,Et),e(H,Tt),e(H,go),e(go,Pe),e(Pe,Dt),e(H,Pt),e(H,_o),e(_o,Ce),e(Ce,Ct),b(o,rt,_),b(o,te,_),e(te,It),e(te,re),e(re,vo),e(vo,At),e(re,qt),e(te,Nt),b(o,nt,_),b(o,Ie,_),e(Ie,bo),e(bo,Ut),e(Ie,St),b(o,at,_),b(o,B,_),e(B,ne),e(ne,xo),k(Ae,xo,null),e(B,Ft),e(B,$o),e($o,jt),b(o,st,_),b(o,G,_),e(G,ae),e(ae,wo),k(qe,wo,null),e(G,Wt),e(G,yo),e(yo,Ot),b(o,it,_),b(o,z,_),k(Ne,z,null),e(z,zt),e(z,U),k(Ue,U,null),e(U,Vt),e(U,V),e(V,Rt),e(V,ko),e(ko,Ht),e(V,Bt),e(V,Se),e(Se,Lo),e(Lo,Gt),e(V,Xt),e(V,Mo),e(Mo,Jt),e(V,Kt),e(U,Qt),k(se,U,null),e(U,Yt),k(ie,U,null),e(z,Zt),e(z,de),k(Fe,de,null),e(de,er),e(de,je),e(je,or),e(je,ao),e(ao,tr),e(je,rr),b(o,dt,_),b(o,X,_),e(X,le),e(le,Eo),k(We,Eo,null),e(X,nr),e(X,To),e(To,ar),b(o,lt,_),b(o,N,_),k(Oe,N,null),e(N,sr),e(N,Do),e(Do,ir),e(N,dr),e(N,C),k(ze,C,null),e(C,lr),e(C,J),e(J,cr),e(J,Po),e(Po,fr),e(J,pr),e(J,Co),e(Co,hr),e(J,mr),e(C,ur),k(ce,C,null),e(C,gr),k(fe,C,null),e(C,_r),e(C,Io),e(Io,vr),e(C,br),k(pe,C,null),e(C,xr),e(C,Ao),e(Ao,$r),e(C,wr),k(he,C,null),e(N,yr),e(N,me),k(Ve,me,null),e(me,kr),e(me,qo),e(qo,Lr),b(o,ct,_),b(o,K,_),e(K,ue),e(ue,No),k(Re,No,null),e(K,Mr),e(K,Uo),e(Uo,Er),b(o,ft,_),b(o,I,_),k(He,I,null),e(I,Tr),e(I,Q),e(Q,Dr),e(Q,so),e(so,Pr),e(Q,Cr),e(Q,Be),e(Be,So),e(So,Ir),e(Q,Ar),e(I,qr),k(ge,I,null),e(I,Nr),e(I,S),k(Ge,S,null),e(S,Ur),e(S,Xe),e(Xe,Sr),e(Xe,Je),e(Je,Fo),e(Fo,Fr),e(Xe,jr),e(S,Wr),k(_e,S,null),e(S,Or),k(ve,S,null),e(I,zr),e(I,F),k(Ke,F,null),e(F,Vr),e(F,Y),e(Y,Rr),e(Y,io),e(io,Hr),e(Y,Br),e(Y,Qe),e(Qe,jo),e(jo,Gr),e(Y,Xr),e(F,Jr),k(be,F,null),e(F,Kr),k(xe,F,null),e(I,Qr),e(I,$e),k(Ye,$e,null),e($e,Yr),e($e,Wo),e(Wo,Zr),b(o,pt,_),b(o,Z,_),e(Z,we),e(we,Oo),k(Ze,Oo,null),e(Z,en),e(Z,zo),e(zo,on),b(o,ht,_),b(o,R,_),k(eo,R,null),e(R,tn),e(R,Vo),e(Vo,rn),e(R,nn),e(R,j),k(oo,j,null),e(j,an),e(j,Ro),e(Ro,sn),e(j,dn),e(j,to),e(to,ln),e(to,Ho),e(Ho,cn),e(to,fn),e(j,pn),k(ye,j,null),mt=!0},p(o,[_]){const ro={};_&2&&(ro.$$scope={dirty:_,ctx:o}),se.$set(ro);const Bo={};_&2&&(Bo.$$scope={dirty:_,ctx:o}),ie.$set(Bo);const Go={};_&2&&(Go.$$scope={dirty:_,ctx:o}),ce.$set(Go);const Xo={};_&2&&(Xo.$$scope={dirty:_,ctx:o}),fe.$set(Xo);const Jo={};_&2&&(Jo.$$scope={dirty:_,ctx:o}),pe.$set(Jo);const ee={};_&2&&(ee.$$scope={dirty:_,ctx:o}),he.$set(ee);const Ko={};_&2&&(Ko.$$scope={dirty:_,ctx:o}),ge.$set(Ko);const Qo={};_&2&&(Qo.$$scope={dirty:_,ctx:o}),_e.$set(Qo);const Yo={};_&2&&(Yo.$$scope={dirty:_,ctx:o}),ve.$set(Yo);const Zo={};_&2&&(Zo.$$scope={dirty:_,ctx:o}),be.$set(Zo);const et={};_&2&&(et.$$scope={dirty:_,ctx:o}),xe.$set(et);const ot={};_&2&&(ot.$$scope={dirty:_,ctx:o}),ye.$set(ot)},i(o){mt||(L(p.$$.fragment,o),L(Ae.$$.fragment,o),L(qe.$$.fragment,o),L(Ne.$$.fragment,o),L(Ue.$$.fragment,o),L(se.$$.fragment,o),L(ie.$$.fragment,o),L(Fe.$$.fragment,o),L(We.$$.fragment,o),L(Oe.$$.fragment,o),L(ze.$$.fragment,o),L(ce.$$.fragment,o),L(fe.$$.fragment,o),L(pe.$$.fragment,o),L(he.$$.fragment,o),L(Ve.$$.fragment,o),L(Re.$$.fragment,o),L(He.$$.fragment,o),L(ge.$$.fragment,o),L(Ge.$$.fragment,o),L(_e.$$.fragment,o),L(ve.$$.fragment,o),L(Ke.$$.fragment,o),L(be.$$.fragment,o),L(xe.$$.fragment,o),L(Ye.$$.fragment,o),L(Ze.$$.fragment,o),L(eo.$$.fragment,o),L(oo.$$.fragment,o),L(ye.$$.fragment,o),mt=!0)},o(o){M(p.$$.fragment,o),M(Ae.$$.fragment,o),M(qe.$$.fragment,o),M(Ne.$$.fragment,o),M(Ue.$$.fragment,o),M(se.$$.fragment,o),M(ie.$$.fragment,o),M(Fe.$$.fragment,o),M(We.$$.fragment,o),M(Oe.$$.fragment,o),M(ze.$$.fragment,o),M(ce.$$.fragment,o),M(fe.$$.fragment,o),M(pe.$$.fragment,o),M(he.$$.fragment,o),M(Ve.$$.fragment,o),M(Re.$$.fragment,o),M(He.$$.fragment,o),M(ge.$$.fragment,o),M(Ge.$$.fragment,o),M(_e.$$.fragment,o),M(ve.$$.fragment,o),M(Ke.$$.fragment,o),M(be.$$.fragment,o),M(xe.$$.fragment,o),M(Ye.$$.fragment,o),M(Ze.$$.fragment,o),M(eo.$$.fragment,o),M(oo.$$.fragment,o),M(ye.$$.fragment,o),mt=!1},d(o){t(r),o&&t(v),o&&t(l),E(p),o&&t(g),o&&t(P),o&&t(tt),o&&t(H),o&&t(rt),o&&t(te),o&&t(nt),o&&t(Ie),o&&t(at),o&&t(B),E(Ae),o&&t(st),o&&t(G),E(qe),o&&t(it),o&&t(z),E(Ne),E(Ue),E(se),E(ie),E(Fe),o&&t(dt),o&&t(X),E(We),o&&t(lt),o&&t(N),E(Oe),E(ze),E(ce),E(fe),E(pe),E(he),E(Ve),o&&t(ct),o&&t(K),E(Re),o&&t(ft),o&&t(I),E(He),E(ge),E(Ge),E(_e),E(ve),E(Ke),E(be),E(xe),E(Ye),o&&t(pt),o&&t(Z),E(Ze),o&&t(ht),o&&t(R),E(eo),E(oo),E(ye)}}}const wa={local:"loaders",sections:[{local:"loadermixins",sections:[{local:"diffusers.loaders.UNet2DConditionLoadersMixin",title:"UNet2DConditionLoadersMixin"},{local:"diffusers.loaders.TextualInversionLoaderMixin",title:"TextualInversionLoaderMixin"},{local:"diffusers.loaders.LoraLoaderMixin",title:"LoraLoaderMixin"},{local:"diffusers.loaders.FromCkptMixin",title:"FromCkptMixin"}],title:"LoaderMixins"}],title:"Loaders"};function ya(D){return da(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Pa extends na{constructor(r){super();aa(this,r,ya,$a,sa,{})}}export{Pa as default,wa as metadata};
