import{s as Vo,o as jo,n as et}from"../chunks/scheduler.182ea377.js";import{S as zo,i as Go,g as n,s as o,r as _,A as Xo,h as s,f as d,c as r,j as y,u as h,x as u,k as M,y as t,a as $,v as g,d as x,t as L,w as v}from"../chunks/index.abf12888.js";import{T as gt}from"../chunks/Tip.230e2334.js";import{D as C}from"../chunks/Docstring.93f6f462.js";import{C as Jo}from"../chunks/CodeBlock.57fe6e13.js";import{E as Eo}from"../chunks/ExampleCodeBlock.658f5cd6.js";import{H as fo}from"../chunks/Heading.16916d63.js";function qo(R){let a,b='To learn more about how to load LoRA weights, see the <a href="../../using-diffusers/loading_adapters#lora">LoRA</a> loading guide.';return{c(){a=n("p"),a.innerHTML=b},l(c){a=s(c,"P",{"data-svelte-h":!0}),u(a)!=="svelte-1fw6lx1"&&(a.innerHTML=b)},m(c,p){$(c,a,p)},p:et,d(c){c&&d(a)}}}function Zo(R){let a,b="This is an experimental API.";return{c(){a=n("p"),a.textContent=b},l(c){a=s(c,"P",{"data-svelte-h":!0}),u(a)!=="svelte-8w79b9"&&(a.textContent=b)},m(c,p){$(c,a,p)},p:et,d(c){c&&d(a)}}}function Bo(R){let a,b="Example:",c,p,w;return p=new Jo({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUyMkNpcm9OMjAyMiUyRnRveS1mYWNlJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJ0b3lfZmFjZV9zZHhsLnNhZmV0ZW5zb3JzJTIyJTJDJTIwYWRhcHRlcl9uYW1lJTNEJTIydG95JTIyKSUwQXBpcGVsaW5lLmdldF9hY3RpdmVfYWRhcHRlcnMoKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

pipeline = DiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>,
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline.load_lora_weights(<span class="hljs-string">&quot;CiroN2022/toy-face&quot;</span>, weight_name=<span class="hljs-string">&quot;toy_face_sdxl.safetensors&quot;</span>, adapter_name=<span class="hljs-string">&quot;toy&quot;</span>)
pipeline.get_active_adapters()`,wrap:!1}}),{c(){a=n("p"),a.textContent=b,c=o(),_(p.$$.fragment)},l(i){a=s(i,"P",{"data-svelte-h":!0}),u(a)!=="svelte-11lpom8"&&(a.textContent=b),c=r(i),h(p.$$.fragment,i)},m(i,T){$(i,a,T),$(i,c,T),g(p,i,T),w=!0},p:et,i(i){w||(x(p.$$.fragment,i),w=!0)},o(i){L(p.$$.fragment,i),w=!1},d(i){i&&(d(a),d(c)),v(p,i)}}}function Fo(R){let a,b="We support loading A1111 formatted LoRA checkpoints in a limited capacity.",c,p,w="This function is experimental and might change in the future.";return{c(){a=n("p"),a.textContent=b,c=o(),p=n("p"),p.textContent=w},l(i){a=s(i,"P",{"data-svelte-h":!0}),u(a)!=="svelte-15l1sdn"&&(a.textContent=b),c=r(i),p=s(i,"P",{"data-svelte-h":!0}),u(p)!=="svelte-3fufvn"&&(p.textContent=w)},m(i,T){$(i,a,T),$(i,c,T),$(i,p,T)},p:et,d(i){i&&(d(a),d(c),d(p))}}}function Yo(R){let a,b="This is an experimental API.";return{c(){a=n("p"),a.textContent=b},l(c){a=s(c,"P",{"data-svelte-h":!0}),u(a)!=="svelte-8w79b9"&&(a.textContent=b)},m(c,p){$(c,a,p)},p:et,d(c){c&&d(a)}}}function Oo(R){let a,b="Examples:",c,p,w;return p=new Jo({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>...',wrap:!1}}),{c(){a=n("p"),a.textContent=b,c=o(),_(p.$$.fragment)},l(i){a=s(i,"P",{"data-svelte-h":!0}),u(a)!=="svelte-kvfsh7"&&(a.textContent=b),c=r(i),h(p.$$.fragment,i)},m(i,T){$(i,a,T),$(i,c,T),g(p,i,T),w=!0},p:et,i(i){w||(x(p.$$.fragment,i),w=!0)},o(i){L(p.$$.fragment,i),w=!1},d(i){i&&(d(a),d(c)),v(p,i)}}}function Qo(R){let a,b,c,p,w,i,T,mo="LoRA is a fast and lightweight training method that inserts and trains a significantly smaller number of parameters instead of all the model parameters. This produces a smaller file (~100 MBs) and makes it easier to quickly train a model to learn a new concept. LoRA weights are typically loaded into the UNet, text encoder or both. There are two classes for loading LoRA weights:",rt,te,po='<li><code>LoraLoaderMixin</code> provides functions for loading and unloading, fusing and unfusing, enabling and disabling, and more functions for managing LoRA weights. This class can be used with any model.</li> <li><code>StableDiffusionXLLoraLoaderMixin</code> is a <a href="../../api/pipelines/stable_diffusion/stable_diffusion_xl">Stable Diffusion (SDXL)</a> version of the <code>LoraLoaderMixin</code> class for loading and saving LoRA weights. It can only be used with the SDXL model.</li>',at,V,nt,oe,st,l,re,xt,ye,uo=`Load LoRA layers into <a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a> and
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow"><code>CLIPTextModel</code></a>.`,Lt,Me,ae,vt,j,ne,$t,Te,_o="Disables the LoRA layers for the text encoder.",bt,z,se,wt,Ce,ho="Enables the LoRA layers for the text encoder.",yt,S,de,Mt,De,go="Fuses the LoRA parameters into the original parameters of the corresponding blocks.",Tt,G,Ct,H,ie,Dt,Pe,xo="Gets the list of the current active adapters.",Pt,X,Rt,q,le,kt,Re,Lo="Gets the current list of all available adapters in the pipeline.",At,Z,ce,It,ke,vo="This will load the LoRA layers specified in <code>state_dict</code> into <code>text_encoder</code>",St,B,fe,Ht,Ae,$o="This will load the LoRA layers specified in <code>state_dict</code> into <code>unet</code>.",Ut,D,me,Nt,Ie,bo=`Load LoRA weights specified in <code>pretrained_model_name_or_path_or_dict</code> into <code>self.unet</code> and
<code>self.text_encoder</code>.`,Wt,Se,wo="All kwargs are forwarded to <code>self.lora_state_dict</code>.",Et,He,yo='See <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details on how the state dict is loaded.',Jt,Ue,Mo=`See <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details on how the state dict is loaded into
<code>self.unet</code>.`,Vt,Ne,To=`See <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.load_lora_into_text_encoder">load_lora_into_text_encoder()</a> for more details on how the state dict is loaded
into <code>self.text_encoder</code>.`,jt,U,pe,zt,We,Co="Return state dict for lora weights and the network alphas.",Gt,F,Xt,Y,ue,qt,Ee,Do="Save the LoRA parameters corresponding to the UNet and text encoder.",Zt,O,_e,Bt,Je,Po="Sets the adapter layers for the text encoder.",Ft,Q,he,Yt,Ve,Ro=`Moves the LoRAs listed in <code>adapter_names</code> to a target device. Useful for offloading the LoRA to the CPU in case
you want to load multiple adapters and free some GPU memory.`,Ot,N,ge,Qt,je,ko=`Reverses the effect of
<a href="https://huggingface.co/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraLoaderMixin.fuse_lora" rel="nofollow"><code>pipe.fuse_lora()</code></a>.`,Kt,K,eo,W,xe,to,ze,Ao="Unloads the LoRA parameters.",oo,ee,dt,Le,it,I,ve,ro,Ge,Io="This class overrides <code>LoraLoaderMixin</code> with LoRA loading/saving code that’s specific to SDXL",ao,P,$e,no,Xe,So=`Load LoRA weights specified in <code>pretrained_model_name_or_path_or_dict</code> into <code>self.unet</code> and
<code>self.text_encoder</code>.`,so,qe,Ho="All kwargs are forwarded to <code>self.lora_state_dict</code>.",io,Ze,Uo='See <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details on how the state dict is loaded.',lo,Be,No=`See <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details on how the state dict is loaded into
<code>self.unet</code>.`,co,Fe,Wo=`See <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.load_lora_into_text_encoder">load_lora_into_text_encoder()</a> for more details on how the state dict is loaded
into <code>self.text_encoder</code>.`,lt,tt,ct;return w=new fo({props:{title:"LoRA",local:"lora",headingTag:"h1"}}),V=new gt({props:{$$slots:{default:[qo]},$$scope:{ctx:R}}}),oe=new fo({props:{title:"LoraLoaderMixin",local:"diffusers.loaders.LoraLoaderMixin",headingTag:"h2"}}),re=new C({props:{name:"class diffusers.loaders.LoraLoaderMixin",anchor:"diffusers.loaders.LoraLoaderMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora.py#L68"}}),ae=new C({props:{name:"delete_adapters",anchor:"diffusers.loaders.LoraLoaderMixin.delete_adapters",parameters:[{name:"adapter_names",val:": typing.Union[typing.List[str], str]"}],parametersDescription:[{anchor:"diffusers.loaders.LoraLoaderMixin.delete_adapters.Deletes",description:`<strong>Deletes</strong> the LoRA layers of <code>adapter_name</code> for the unet and text-encoder(s). &#x2014;
adapter_names (<code>Union[List[str], str]</code>):
The names of the adapter to delete. Can be a single string or a list of strings`,name:"Deletes"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora.py#L1141"}}),ne=new C({props:{name:"disable_lora_for_text_encoder",anchor:"diffusers.loaders.LoraLoaderMixin.disable_lora_for_text_encoder",parameters:[{name:"text_encoder",val:": typing.Optional[ForwardRef('PreTrainedModel')] = None"}],parametersDescription:[{anchor:"diffusers.loaders.LoraLoaderMixin.disable_lora_for_text_encoder.text_encoder",description:`<strong>text_encoder</strong> (<code>torch.nn.Module</code>, <em>optional</em>) &#x2014;
The text encoder module to disable the LoRA layers for. If <code>None</code>, it will try to get the
<code>text_encoder</code> attribute.`,name:"text_encoder"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora.py#L1068"}}),se=new C({props:{name:"enable_lora_for_text_encoder",anchor:"diffusers.loaders.LoraLoaderMixin.enable_lora_for_text_encoder",parameters:[{name:"text_encoder",val:": typing.Optional[ForwardRef('PreTrainedModel')] = None"}],parametersDescription:[{anchor:"diffusers.loaders.LoraLoaderMixin.enable_lora_for_text_encoder.text_encoder",description:`<strong>text_encoder</strong> (<code>torch.nn.Module</code>, <em>optional</em>) &#x2014;
The text encoder module to enable the LoRA layers for. If <code>None</code>, it will try to get the <code>text_encoder</code>
attribute.`,name:"text_encoder"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora.py#L1085"}}),de=new C({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"},{name:"safe_fusing",val:": bool = False"}],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"},{anchor:"diffusers.loaders.LoraLoaderMixin.fuse_lora.safe_fusing",description:`<strong>safe_fusing</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to check fused weights for NaN values before fusing and if values are NaN not fusing them.`,name:"safe_fusing"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora.py#L897"}}),G=new gt({props:{warning:!0,$$slots:{default:[Zo]},$$scope:{ctx:R}}}),ie=new C({props:{name:"get_active_adapters",anchor:"diffusers.loaders.LoraLoaderMixin.get_active_adapters",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora.py#L1164"}}),X=new Eo({props:{anchor:"diffusers.loaders.LoraLoaderMixin.get_active_adapters.example",$$slots:{default:[Bo]},$$scope:{ctx:R}}}),le=new C({props:{name:"get_list_adapters",anchor:"diffusers.loaders.LoraLoaderMixin.get_list_adapters",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora.py#L1196"}}),ce=new C({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"},{name:"adapter_name",val:" = None"},{name:"_pipeline",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"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_into_text_encoder.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Adapter name to be used for referencing the loaded adapter model. If not specified, it will use
<code>default_{i}</code> where i is the total number of adapters being loaded.`,name:"adapter_name"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora.py#L472"}}),fe=new C({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"},{name:"adapter_name",val:" = None"},{name:"_pipeline",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"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_into_unet.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Adapter name to be used for referencing the loaded adapter model. If not specified, it will use
<code>default_{i}</code> where i is the total number of adapters being loaded.`,name:"adapter_name"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora.py#L363"}}),me=new C({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:"adapter_name",val:" = None"},{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/main/en/api/loaders/lora#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/main/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.lora_state_dict">lora_state_dict()</a>.`,name:"kwargs"},{anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_weights.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Adapter name to be used for referencing the loaded adapter model. If not specified, it will use
<code>default_{i}</code> where i is the total number of adapters being loaded.`,name:"adapter_name"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora.py#L78"}}),pe=new C({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/main/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.token",description:`<strong>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:"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/main/src/diffusers/loaders/lora.py#L133"}}),F=new gt({props:{warning:!0,$$slots:{default:[Fo]},$$scope:{ctx:R}}}),ue=new C({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/main/src/diffusers/loaders/lora.py#L775"}}),_e=new C({props:{name:"set_adapters_for_text_encoder",anchor:"diffusers.loaders.LoraLoaderMixin.set_adapters_for_text_encoder",parameters:[{name:"adapter_names",val:": typing.Union[typing.List[str], str]"},{name:"text_encoder",val:": typing.Optional[ForwardRef('PreTrainedModel')] = None"},{name:"text_encoder_weights",val:": typing.List[float] = None"}],parametersDescription:[{anchor:"diffusers.loaders.LoraLoaderMixin.set_adapters_for_text_encoder.adapter_names",description:`<strong>adapter_names</strong> (<code>List[str]</code> or <code>str</code>) &#x2014;
The names of the adapters to use.`,name:"adapter_names"},{anchor:"diffusers.loaders.LoraLoaderMixin.set_adapters_for_text_encoder.text_encoder",description:`<strong>text_encoder</strong> (<code>torch.nn.Module</code>, <em>optional</em>) &#x2014;
The text encoder module to set the adapter layers for. If <code>None</code>, it will try to get the <code>text_encoder</code>
attribute.`,name:"text_encoder"},{anchor:"diffusers.loaders.LoraLoaderMixin.set_adapters_for_text_encoder.text_encoder_weights",description:`<strong>text_encoder_weights</strong> (<code>List[float]</code>, <em>optional</em>) &#x2014;
The weights to use for the text encoder. If <code>None</code>, the weights are set to <code>1.0</code> for all the adapters.`,name:"text_encoder_weights"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora.py#L1026"}}),he=new C({props:{name:"set_lora_device",anchor:"diffusers.loaders.LoraLoaderMixin.set_lora_device",parameters:[{name:"adapter_names",val:": typing.List[str]"},{name:"device",val:": typing.Union[torch.device, str, int]"}],parametersDescription:[{anchor:"diffusers.loaders.LoraLoaderMixin.set_lora_device.adapter_names",description:`<strong>adapter_names</strong> (<code>List[str]</code>) &#x2014;
List of adapters to send device to.`,name:"adapter_names"},{anchor:"diffusers.loaders.LoraLoaderMixin.set_lora_device.device",description:`<strong>device</strong> (<code>Union[torch.device, str, int]</code>) &#x2014;
Device to send the adapters to. Can be either a torch device, a str or an integer.`,name:"device"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora.py#L1218"}}),ge=new C({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/main/src/diffusers/loaders/lora.py#L967"}}),K=new gt({props:{warning:!0,$$slots:{default:[Yo]},$$scope:{ctx:R}}}),xe=new C({props:{name:"unload_lora_weights",anchor:"diffusers.loaders.LoraLoaderMixin.unload_lora_weights",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora.py#L867"}}),ee=new Eo({props:{anchor:"diffusers.loaders.LoraLoaderMixin.unload_lora_weights.example",$$slots:{default:[Oo]},$$scope:{ctx:R}}}),Le=new fo({props:{title:"StableDiffusionXLLoraLoaderMixin",local:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin",headingTag:"h2"}}),ve=new C({props:{name:"class diffusers.loaders.StableDiffusionXLLoraLoaderMixin",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora.py#L1258"}}),$e=new C({props:{name:"load_lora_weights",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_weights",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": typing.Union[str, typing.Dict[str, torch.Tensor]]"},{name:"adapter_name",val:": typing.Optional[str] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.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/main/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.lora_state_dict">lora_state_dict()</a>.`,name:"pretrained_model_name_or_path_or_dict"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_weights.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Adapter name to be used for referencing the loaded adapter model. If not specified, it will use
<code>default_{i}</code> where i is the total number of adapters being loaded.`,name:"adapter_name"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_weights.kwargs",description:`<strong>kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
See <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.lora_state_dict">lora_state_dict()</a>.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora.py#L1262"}}),{c(){a=n("meta"),b=o(),c=n("p"),p=o(),_(w.$$.fragment),i=o(),T=n("p"),T.textContent=mo,rt=o(),te=n("ul"),te.innerHTML=po,at=o(),_(V.$$.fragment),nt=o(),_(oe.$$.fragment),st=o(),l=n("div"),_(re.$$.fragment),xt=o(),ye=n("p"),ye.innerHTML=uo,Lt=o(),Me=n("div"),_(ae.$$.fragment),vt=o(),j=n("div"),_(ne.$$.fragment),$t=o(),Te=n("p"),Te.textContent=_o,bt=o(),z=n("div"),_(se.$$.fragment),wt=o(),Ce=n("p"),Ce.textContent=ho,yt=o(),S=n("div"),_(de.$$.fragment),Mt=o(),De=n("p"),De.textContent=go,Tt=o(),_(G.$$.fragment),Ct=o(),H=n("div"),_(ie.$$.fragment),Dt=o(),Pe=n("p"),Pe.textContent=xo,Pt=o(),_(X.$$.fragment),Rt=o(),q=n("div"),_(le.$$.fragment),kt=o(),Re=n("p"),Re.textContent=Lo,At=o(),Z=n("div"),_(ce.$$.fragment),It=o(),ke=n("p"),ke.innerHTML=vo,St=o(),B=n("div"),_(fe.$$.fragment),Ht=o(),Ae=n("p"),Ae.innerHTML=$o,Ut=o(),D=n("div"),_(me.$$.fragment),Nt=o(),Ie=n("p"),Ie.innerHTML=bo,Wt=o(),Se=n("p"),Se.innerHTML=wo,Et=o(),He=n("p"),He.innerHTML=yo,Jt=o(),Ue=n("p"),Ue.innerHTML=Mo,Vt=o(),Ne=n("p"),Ne.innerHTML=To,jt=o(),U=n("div"),_(pe.$$.fragment),zt=o(),We=n("p"),We.textContent=Co,Gt=o(),_(F.$$.fragment),Xt=o(),Y=n("div"),_(ue.$$.fragment),qt=o(),Ee=n("p"),Ee.textContent=Do,Zt=o(),O=n("div"),_(_e.$$.fragment),Bt=o(),Je=n("p"),Je.textContent=Po,Ft=o(),Q=n("div"),_(he.$$.fragment),Yt=o(),Ve=n("p"),Ve.innerHTML=Ro,Ot=o(),N=n("div"),_(ge.$$.fragment),Qt=o(),je=n("p"),je.innerHTML=ko,Kt=o(),_(K.$$.fragment),eo=o(),W=n("div"),_(xe.$$.fragment),to=o(),ze=n("p"),ze.textContent=Ao,oo=o(),_(ee.$$.fragment),dt=o(),_(Le.$$.fragment),it=o(),I=n("div"),_(ve.$$.fragment),ro=o(),Ge=n("p"),Ge.innerHTML=Io,ao=o(),P=n("div"),_($e.$$.fragment),no=o(),Xe=n("p"),Xe.innerHTML=So,so=o(),qe=n("p"),qe.innerHTML=Ho,io=o(),Ze=n("p"),Ze.innerHTML=Uo,lo=o(),Be=n("p"),Be.innerHTML=No,co=o(),Fe=n("p"),Fe.innerHTML=Wo,lt=o(),tt=n("p"),this.h()},l(e){const m=Xo("svelte-u9bgzb",document.head);a=s(m,"META",{name:!0,content:!0}),m.forEach(d),b=r(e),c=s(e,"P",{}),y(c).forEach(d),p=r(e),h(w.$$.fragment,e),i=r(e),T=s(e,"P",{"data-svelte-h":!0}),u(T)!=="svelte-99vqvv"&&(T.textContent=mo),rt=r(e),te=s(e,"UL",{"data-svelte-h":!0}),u(te)!=="svelte-1x6k2ez"&&(te.innerHTML=po),at=r(e),h(V.$$.fragment,e),nt=r(e),h(oe.$$.fragment,e),st=r(e),l=s(e,"DIV",{class:!0});var f=y(l);h(re.$$.fragment,f),xt=r(f),ye=s(f,"P",{"data-svelte-h":!0}),u(ye)!=="svelte-1pb3n03"&&(ye.innerHTML=uo),Lt=r(f),Me=s(f,"DIV",{class:!0});var ot=y(Me);h(ae.$$.fragment,ot),ot.forEach(d),vt=r(f),j=s(f,"DIV",{class:!0});var be=y(j);h(ne.$$.fragment,be),$t=r(be),Te=s(be,"P",{"data-svelte-h":!0}),u(Te)!=="svelte-tbr0r9"&&(Te.textContent=_o),be.forEach(d),bt=r(f),z=s(f,"DIV",{class:!0});var we=y(z);h(se.$$.fragment,we),wt=r(we),Ce=s(we,"P",{"data-svelte-h":!0}),u(Ce)!=="svelte-ujvdgi"&&(Ce.textContent=ho),we.forEach(d),yt=r(f),S=s(f,"DIV",{class:!0});var E=y(S);h(de.$$.fragment,E),Mt=r(E),De=s(E,"P",{"data-svelte-h":!0}),u(De)!=="svelte-1nr2dy0"&&(De.textContent=go),Tt=r(E),h(G.$$.fragment,E),E.forEach(d),Ct=r(f),H=s(f,"DIV",{class:!0});var J=y(H);h(ie.$$.fragment,J),Dt=r(J),Pe=s(J,"P",{"data-svelte-h":!0}),u(Pe)!=="svelte-h0os0v"&&(Pe.textContent=xo),Pt=r(J),h(X.$$.fragment,J),J.forEach(d),Rt=r(f),q=s(f,"DIV",{class:!0});var ft=y(q);h(le.$$.fragment,ft),kt=r(ft),Re=s(ft,"P",{"data-svelte-h":!0}),u(Re)!=="svelte-1825k9e"&&(Re.textContent=Lo),ft.forEach(d),At=r(f),Z=s(f,"DIV",{class:!0});var mt=y(Z);h(ce.$$.fragment,mt),It=r(mt),ke=s(mt,"P",{"data-svelte-h":!0}),u(ke)!=="svelte-1062ci4"&&(ke.innerHTML=vo),mt.forEach(d),St=r(f),B=s(f,"DIV",{class:!0});var pt=y(B);h(fe.$$.fragment,pt),Ht=r(pt),Ae=s(pt,"P",{"data-svelte-h":!0}),u(Ae)!=="svelte-u3q4so"&&(Ae.innerHTML=$o),pt.forEach(d),Ut=r(f),D=s(f,"DIV",{class:!0});var k=y(D);h(me.$$.fragment,k),Nt=r(k),Ie=s(k,"P",{"data-svelte-h":!0}),u(Ie)!=="svelte-vs7s0z"&&(Ie.innerHTML=bo),Wt=r(k),Se=s(k,"P",{"data-svelte-h":!0}),u(Se)!=="svelte-15b960v"&&(Se.innerHTML=wo),Et=r(k),He=s(k,"P",{"data-svelte-h":!0}),u(He)!=="svelte-12uyc98"&&(He.innerHTML=yo),Jt=r(k),Ue=s(k,"P",{"data-svelte-h":!0}),u(Ue)!=="svelte-1q3yzk7"&&(Ue.innerHTML=Mo),Vt=r(k),Ne=s(k,"P",{"data-svelte-h":!0}),u(Ne)!=="svelte-10xxjud"&&(Ne.innerHTML=To),k.forEach(d),jt=r(f),U=s(f,"DIV",{class:!0});var Ye=y(U);h(pe.$$.fragment,Ye),zt=r(Ye),We=s(Ye,"P",{"data-svelte-h":!0}),u(We)!=="svelte-flusvq"&&(We.textContent=Co),Gt=r(Ye),h(F.$$.fragment,Ye),Ye.forEach(d),Xt=r(f),Y=s(f,"DIV",{class:!0});var ut=y(Y);h(ue.$$.fragment,ut),qt=r(ut),Ee=s(ut,"P",{"data-svelte-h":!0}),u(Ee)!=="svelte-1ufq5ot"&&(Ee.textContent=Do),ut.forEach(d),Zt=r(f),O=s(f,"DIV",{class:!0});var _t=y(O);h(_e.$$.fragment,_t),Bt=r(_t),Je=s(_t,"P",{"data-svelte-h":!0}),u(Je)!=="svelte-kmejci"&&(Je.textContent=Po),_t.forEach(d),Ft=r(f),Q=s(f,"DIV",{class:!0});var ht=y(Q);h(he.$$.fragment,ht),Yt=r(ht),Ve=s(ht,"P",{"data-svelte-h":!0}),u(Ve)!=="svelte-rvubqa"&&(Ve.innerHTML=Ro),ht.forEach(d),Ot=r(f),N=s(f,"DIV",{class:!0});var Oe=y(N);h(ge.$$.fragment,Oe),Qt=r(Oe),je=s(Oe,"P",{"data-svelte-h":!0}),u(je)!=="svelte-56a0bo"&&(je.innerHTML=ko),Kt=r(Oe),h(K.$$.fragment,Oe),Oe.forEach(d),eo=r(f),W=s(f,"DIV",{class:!0});var Qe=y(W);h(xe.$$.fragment,Qe),to=r(Qe),ze=s(Qe,"P",{"data-svelte-h":!0}),u(ze)!=="svelte-119cgd9"&&(ze.textContent=Ao),oo=r(Qe),h(ee.$$.fragment,Qe),Qe.forEach(d),f.forEach(d),dt=r(e),h(Le.$$.fragment,e),it=r(e),I=s(e,"DIV",{class:!0});var Ke=y(I);h(ve.$$.fragment,Ke),ro=r(Ke),Ge=s(Ke,"P",{"data-svelte-h":!0}),u(Ge)!=="svelte-1powver"&&(Ge.innerHTML=Io),ao=r(Ke),P=s(Ke,"DIV",{class:!0});var A=y(P);h($e.$$.fragment,A),no=r(A),Xe=s(A,"P",{"data-svelte-h":!0}),u(Xe)!=="svelte-vs7s0z"&&(Xe.innerHTML=So),so=r(A),qe=s(A,"P",{"data-svelte-h":!0}),u(qe)!=="svelte-15b960v"&&(qe.innerHTML=Ho),io=r(A),Ze=s(A,"P",{"data-svelte-h":!0}),u(Ze)!=="svelte-12uyc98"&&(Ze.innerHTML=Uo),lo=r(A),Be=s(A,"P",{"data-svelte-h":!0}),u(Be)!=="svelte-1q3yzk7"&&(Be.innerHTML=No),co=r(A),Fe=s(A,"P",{"data-svelte-h":!0}),u(Fe)!=="svelte-10xxjud"&&(Fe.innerHTML=Wo),A.forEach(d),Ke.forEach(d),lt=r(e),tt=s(e,"P",{}),y(tt).forEach(d),this.h()},h(){M(a,"name","hf:doc:metadata"),M(a,"content",Ko),M(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Y,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(l,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,m){t(document.head,a),$(e,b,m),$(e,c,m),$(e,p,m),g(w,e,m),$(e,i,m),$(e,T,m),$(e,rt,m),$(e,te,m),$(e,at,m),g(V,e,m),$(e,nt,m),g(oe,e,m),$(e,st,m),$(e,l,m),g(re,l,null),t(l,xt),t(l,ye),t(l,Lt),t(l,Me),g(ae,Me,null),t(l,vt),t(l,j),g(ne,j,null),t(j,$t),t(j,Te),t(l,bt),t(l,z),g(se,z,null),t(z,wt),t(z,Ce),t(l,yt),t(l,S),g(de,S,null),t(S,Mt),t(S,De),t(S,Tt),g(G,S,null),t(l,Ct),t(l,H),g(ie,H,null),t(H,Dt),t(H,Pe),t(H,Pt),g(X,H,null),t(l,Rt),t(l,q),g(le,q,null),t(q,kt),t(q,Re),t(l,At),t(l,Z),g(ce,Z,null),t(Z,It),t(Z,ke),t(l,St),t(l,B),g(fe,B,null),t(B,Ht),t(B,Ae),t(l,Ut),t(l,D),g(me,D,null),t(D,Nt),t(D,Ie),t(D,Wt),t(D,Se),t(D,Et),t(D,He),t(D,Jt),t(D,Ue),t(D,Vt),t(D,Ne),t(l,jt),t(l,U),g(pe,U,null),t(U,zt),t(U,We),t(U,Gt),g(F,U,null),t(l,Xt),t(l,Y),g(ue,Y,null),t(Y,qt),t(Y,Ee),t(l,Zt),t(l,O),g(_e,O,null),t(O,Bt),t(O,Je),t(l,Ft),t(l,Q),g(he,Q,null),t(Q,Yt),t(Q,Ve),t(l,Ot),t(l,N),g(ge,N,null),t(N,Qt),t(N,je),t(N,Kt),g(K,N,null),t(l,eo),t(l,W),g(xe,W,null),t(W,to),t(W,ze),t(W,oo),g(ee,W,null),$(e,dt,m),g(Le,e,m),$(e,it,m),$(e,I,m),g(ve,I,null),t(I,ro),t(I,Ge),t(I,ao),t(I,P),g($e,P,null),t(P,no),t(P,Xe),t(P,so),t(P,qe),t(P,io),t(P,Ze),t(P,lo),t(P,Be),t(P,co),t(P,Fe),$(e,lt,m),$(e,tt,m),ct=!0},p(e,[m]){const f={};m&2&&(f.$$scope={dirty:m,ctx:e}),V.$set(f);const ot={};m&2&&(ot.$$scope={dirty:m,ctx:e}),G.$set(ot);const be={};m&2&&(be.$$scope={dirty:m,ctx:e}),X.$set(be);const we={};m&2&&(we.$$scope={dirty:m,ctx:e}),F.$set(we);const E={};m&2&&(E.$$scope={dirty:m,ctx:e}),K.$set(E);const J={};m&2&&(J.$$scope={dirty:m,ctx:e}),ee.$set(J)},i(e){ct||(x(w.$$.fragment,e),x(V.$$.fragment,e),x(oe.$$.fragment,e),x(re.$$.fragment,e),x(ae.$$.fragment,e),x(ne.$$.fragment,e),x(se.$$.fragment,e),x(de.$$.fragment,e),x(G.$$.fragment,e),x(ie.$$.fragment,e),x(X.$$.fragment,e),x(le.$$.fragment,e),x(ce.$$.fragment,e),x(fe.$$.fragment,e),x(me.$$.fragment,e),x(pe.$$.fragment,e),x(F.$$.fragment,e),x(ue.$$.fragment,e),x(_e.$$.fragment,e),x(he.$$.fragment,e),x(ge.$$.fragment,e),x(K.$$.fragment,e),x(xe.$$.fragment,e),x(ee.$$.fragment,e),x(Le.$$.fragment,e),x(ve.$$.fragment,e),x($e.$$.fragment,e),ct=!0)},o(e){L(w.$$.fragment,e),L(V.$$.fragment,e),L(oe.$$.fragment,e),L(re.$$.fragment,e),L(ae.$$.fragment,e),L(ne.$$.fragment,e),L(se.$$.fragment,e),L(de.$$.fragment,e),L(G.$$.fragment,e),L(ie.$$.fragment,e),L(X.$$.fragment,e),L(le.$$.fragment,e),L(ce.$$.fragment,e),L(fe.$$.fragment,e),L(me.$$.fragment,e),L(pe.$$.fragment,e),L(F.$$.fragment,e),L(ue.$$.fragment,e),L(_e.$$.fragment,e),L(he.$$.fragment,e),L(ge.$$.fragment,e),L(K.$$.fragment,e),L(xe.$$.fragment,e),L(ee.$$.fragment,e),L(Le.$$.fragment,e),L(ve.$$.fragment,e),L($e.$$.fragment,e),ct=!1},d(e){e&&(d(b),d(c),d(p),d(i),d(T),d(rt),d(te),d(at),d(nt),d(st),d(l),d(dt),d(it),d(I),d(lt),d(tt)),d(a),v(w,e),v(V,e),v(oe,e),v(re),v(ae),v(ne),v(se),v(de),v(G),v(ie),v(X),v(le),v(ce),v(fe),v(me),v(pe),v(F),v(ue),v(_e),v(he),v(ge),v(K),v(xe),v(ee),v(Le,e),v(ve),v($e)}}}const Ko='{"title":"LoRA","local":"lora","sections":[{"title":"LoraLoaderMixin","local":"diffusers.loaders.LoraLoaderMixin","sections":[],"depth":2},{"title":"StableDiffusionXLLoraLoaderMixin","local":"diffusers.loaders.StableDiffusionXLLoraLoaderMixin","sections":[],"depth":2}],"depth":1}';function er(R){return jo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ir extends zo{constructor(a){super(),Go(this,a,er,Qo,Vo,{})}}export{ir as component};
