import{s as Vo,o as Go,n as et}from"../chunks/scheduler.182ea377.js";import{S as Xo,i as jo,g as n,s as o,r as _,A as qo,h as s,f as d,c as r,j as y,u as h,x as m,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 zo(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}),m(a)!=="svelte-1fw6lx1"&&(a.innerHTML=b)},m(c,u){$(c,a,u)},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}),m(a)!=="svelte-8w79b9"&&(a.textContent=b)},m(c,u){$(c,a,u)},p:et,d(c){c&&d(a)}}}function Bo(R){let a,b="Example:",c,u,w;return u=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(),_(u.$$.fragment)},l(i){a=s(i,"P",{"data-svelte-h":!0}),m(a)!=="svelte-11lpom8"&&(a.textContent=b),c=r(i),h(u.$$.fragment,i)},m(i,T){$(i,a,T),$(i,c,T),g(u,i,T),w=!0},p:et,i(i){w||(x(u.$$.fragment,i),w=!0)},o(i){L(u.$$.fragment,i),w=!1},d(i){i&&(d(a),d(c)),v(u,i)}}}function Fo(R){let a,b="We support loading A1111 formatted LoRA checkpoints in a limited capacity.",c,u,w="This function is experimental and might change in the future.";return{c(){a=n("p"),a.textContent=b,c=o(),u=n("p"),u.textContent=w},l(i){a=s(i,"P",{"data-svelte-h":!0}),m(a)!=="svelte-15l1sdn"&&(a.textContent=b),c=r(i),u=s(i,"P",{"data-svelte-h":!0}),m(u)!=="svelte-3fufvn"&&(u.textContent=w)},m(i,T){$(i,a,T),$(i,c,T),$(i,u,T)},p:et,d(i){i&&(d(a),d(c),d(u))}}}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}),m(a)!=="svelte-8w79b9"&&(a.textContent=b)},m(c,u){$(c,a,u)},p:et,d(c){c&&d(a)}}}function Oo(R){let a,b="Examples:",c,u,w;return u=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(),_(u.$$.fragment)},l(i){a=s(i,"P",{"data-svelte-h":!0}),m(a)!=="svelte-kvfsh7"&&(a.textContent=b),c=r(i),h(u.$$.fragment,i)},m(i,T){$(i,a,T),$(i,c,T),g(u,i,T),w=!0},p:et,i(i){w||(x(u.$$.fragment,i),w=!0)},o(i){L(u.$$.fragment,i),w=!1},d(i){i&&(d(a),d(c)),v(u,i)}}}function Qo(R){let a,b,c,u,w,i,T,po="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,uo='<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,mo=`Load LoRA layers into <a href="/docs/diffusers/v0.24.0/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,G,ne,$t,Te,_o="Disables the LoRA layers for the text encoder.",bt,X,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,j,Ct,H,ie,Dt,Pe,xo="Gets the list of the current active adapters.",Pt,q,Rt,z,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,pe,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/v0.24.0/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/v0.24.0/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/v0.24.0/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>.`,Gt,U,ue,Xt,We,Co="Return state dict for lora weights and the network alphas.",jt,F,qt,Y,me,zt,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,Ge,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,Xe,Ao="Unloads the LoRA parameters.",oo,ee,dt,Le,it,I,ve,ro,je,Io="This class overrides <code>LoraLoaderMixin</code> with LoRA loading/saving code that’s specific to SDXL",ao,P,$e,no,qe,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,ze,Ho="All kwargs are forwarded to <code>self.lora_state_dict</code>.",io,Ze,Uo='See <a href="/docs/diffusers/v0.24.0/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/v0.24.0/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/v0.24.0/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:[zo]},$$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/v0.24.0/src/diffusers/loaders/lora.py#L69"}}),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/v0.24.0/src/diffusers/loaders/lora.py#L1148"}}),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/v0.24.0/src/diffusers/loaders/lora.py#L1075"}}),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/v0.24.0/src/diffusers/loaders/lora.py#L1092"}}),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/v0.24.0/src/diffusers/loaders/lora.py#L902"}}),j=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/v0.24.0/src/diffusers/loaders/lora.py#L1171"}}),q=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/v0.24.0/src/diffusers/loaders/lora.py#L1203"}}),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/v0.24.0/src/diffusers/loaders/lora.py#L467"}}),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/v0.24.0/src/diffusers/loaders/lora.py#L363"}}),pe=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/v0.24.0/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/v0.24.0/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/v0.24.0/src/diffusers/loaders/lora.py#L79"}}),ue=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/v0.24.0/en/api/models/overview#diffusers.ModelMixin.save_pretrained">ModelMixin.save_pretrained()</a>.</li>
<li>A <a href="https://pytorch.org/tutorials/beginner/saving_loading_models.html#what-is-a-state-dict" rel="nofollow">torch state
dict</a>.</li>
</ul>`,name:"pretrained_model_name_or_path_or_dict"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"use_auth_token"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
The subfolder location of a model file within a larger model repository on the Hub or locally.`,name:"subfolder"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code> if torch version &gt;= 1.9.0 else <code>False</code>) &#x2014;
Speed up model loading only loading the pretrained weights and not initializing the weights. This also
tries to not use more than 1x model size in CPU memory (including peak memory) while loading the model.
Only supported for PyTorch &gt;= 1.9.0. If you are using an older version of PyTorch, setting this
argument to <code>True</code> will raise an error.`,name:"low_cpu_mem_usage"},{anchor:"diffusers.loaders.LoraLoaderMixin.lora_state_dict.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to resolve accessibility issues if you&#x2019;re downloading a model in China. We do not
guarantee the timeliness or safety of the source, and you should refer to the mirror site for more
information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.24.0/src/diffusers/loaders/lora.py#L134"}}),F=new gt({props:{warning:!0,$$slots:{default:[Fo]},$$scope:{ctx:R}}}),me=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/v0.24.0/src/diffusers/loaders/lora.py#L772"}}),_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/v0.24.0/src/diffusers/loaders/lora.py#L1033"}}),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/v0.24.0/src/diffusers/loaders/lora.py#L1225"}}),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/v0.24.0/src/diffusers/loaders/lora.py#L973"}}),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/v0.24.0/src/diffusers/loaders/lora.py#L872"}}),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/v0.24.0/src/diffusers/loaders/lora.py#L1265"}}),$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/v0.24.0/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/v0.24.0/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.lora_state_dict">lora_state_dict()</a>.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.24.0/src/diffusers/loaders/lora.py#L1269"}}),{c(){a=n("meta"),b=o(),c=n("p"),u=o(),_(w.$$.fragment),i=o(),T=n("p"),T.textContent=po,rt=o(),te=n("ul"),te.innerHTML=uo,at=o(),_(V.$$.fragment),nt=o(),_(oe.$$.fragment),st=o(),l=n("div"),_(re.$$.fragment),xt=o(),ye=n("p"),ye.innerHTML=mo,Lt=o(),Me=n("div"),_(ae.$$.fragment),vt=o(),G=n("div"),_(ne.$$.fragment),$t=o(),Te=n("p"),Te.textContent=_o,bt=o(),X=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(),_(j.$$.fragment),Ct=o(),H=n("div"),_(ie.$$.fragment),Dt=o(),Pe=n("p"),Pe.textContent=xo,Pt=o(),_(q.$$.fragment),Rt=o(),z=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"),_(pe.$$.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,Gt=o(),U=n("div"),_(ue.$$.fragment),Xt=o(),We=n("p"),We.textContent=Co,jt=o(),_(F.$$.fragment),qt=o(),Y=n("div"),_(me.$$.fragment),zt=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(),Ge=n("p"),Ge.innerHTML=ko,Kt=o(),_(K.$$.fragment),eo=o(),W=n("div"),_(xe.$$.fragment),to=o(),Xe=n("p"),Xe.textContent=Ao,oo=o(),_(ee.$$.fragment),dt=o(),_(Le.$$.fragment),it=o(),I=n("div"),_(ve.$$.fragment),ro=o(),je=n("p"),je.innerHTML=Io,ao=o(),P=n("div"),_($e.$$.fragment),no=o(),qe=n("p"),qe.innerHTML=So,so=o(),ze=n("p"),ze.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 p=qo("svelte-u9bgzb",document.head);a=s(p,"META",{name:!0,content:!0}),p.forEach(d),b=r(e),c=s(e,"P",{}),y(c).forEach(d),u=r(e),h(w.$$.fragment,e),i=r(e),T=s(e,"P",{"data-svelte-h":!0}),m(T)!=="svelte-99vqvv"&&(T.textContent=po),rt=r(e),te=s(e,"UL",{"data-svelte-h":!0}),m(te)!=="svelte-1x6k2ez"&&(te.innerHTML=uo),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}),m(ye)!=="svelte-1lhl81m"&&(ye.innerHTML=mo),Lt=r(f),Me=s(f,"DIV",{class:!0});var ot=y(Me);h(ae.$$.fragment,ot),ot.forEach(d),vt=r(f),G=s(f,"DIV",{class:!0});var be=y(G);h(ne.$$.fragment,be),$t=r(be),Te=s(be,"P",{"data-svelte-h":!0}),m(Te)!=="svelte-tbr0r9"&&(Te.textContent=_o),be.forEach(d),bt=r(f),X=s(f,"DIV",{class:!0});var we=y(X);h(se.$$.fragment,we),wt=r(we),Ce=s(we,"P",{"data-svelte-h":!0}),m(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}),m(De)!=="svelte-1nr2dy0"&&(De.textContent=go),Tt=r(E),h(j.$$.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}),m(Pe)!=="svelte-h0os0v"&&(Pe.textContent=xo),Pt=r(J),h(q.$$.fragment,J),J.forEach(d),Rt=r(f),z=s(f,"DIV",{class:!0});var ft=y(z);h(le.$$.fragment,ft),kt=r(ft),Re=s(ft,"P",{"data-svelte-h":!0}),m(Re)!=="svelte-1825k9e"&&(Re.textContent=Lo),ft.forEach(d),At=r(f),Z=s(f,"DIV",{class:!0});var pt=y(Z);h(ce.$$.fragment,pt),It=r(pt),ke=s(pt,"P",{"data-svelte-h":!0}),m(ke)!=="svelte-1062ci4"&&(ke.innerHTML=vo),pt.forEach(d),St=r(f),B=s(f,"DIV",{class:!0});var ut=y(B);h(fe.$$.fragment,ut),Ht=r(ut),Ae=s(ut,"P",{"data-svelte-h":!0}),m(Ae)!=="svelte-u3q4so"&&(Ae.innerHTML=$o),ut.forEach(d),Ut=r(f),D=s(f,"DIV",{class:!0});var k=y(D);h(pe.$$.fragment,k),Nt=r(k),Ie=s(k,"P",{"data-svelte-h":!0}),m(Ie)!=="svelte-vs7s0z"&&(Ie.innerHTML=bo),Wt=r(k),Se=s(k,"P",{"data-svelte-h":!0}),m(Se)!=="svelte-15b960v"&&(Se.innerHTML=wo),Et=r(k),He=s(k,"P",{"data-svelte-h":!0}),m(He)!=="svelte-n3hs9x"&&(He.innerHTML=yo),Jt=r(k),Ue=s(k,"P",{"data-svelte-h":!0}),m(Ue)!=="svelte-x1hw6o"&&(Ue.innerHTML=Mo),Vt=r(k),Ne=s(k,"P",{"data-svelte-h":!0}),m(Ne)!=="svelte-1e3awtq"&&(Ne.innerHTML=To),k.forEach(d),Gt=r(f),U=s(f,"DIV",{class:!0});var Ye=y(U);h(ue.$$.fragment,Ye),Xt=r(Ye),We=s(Ye,"P",{"data-svelte-h":!0}),m(We)!=="svelte-flusvq"&&(We.textContent=Co),jt=r(Ye),h(F.$$.fragment,Ye),Ye.forEach(d),qt=r(f),Y=s(f,"DIV",{class:!0});var mt=y(Y);h(me.$$.fragment,mt),zt=r(mt),Ee=s(mt,"P",{"data-svelte-h":!0}),m(Ee)!=="svelte-1ufq5ot"&&(Ee.textContent=Do),mt.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}),m(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}),m(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),Ge=s(Oe,"P",{"data-svelte-h":!0}),m(Ge)!=="svelte-56a0bo"&&(Ge.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),Xe=s(Qe,"P",{"data-svelte-h":!0}),m(Xe)!=="svelte-119cgd9"&&(Xe.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),je=s(Ke,"P",{"data-svelte-h":!0}),m(je)!=="svelte-1powver"&&(je.innerHTML=Io),ao=r(Ke),P=s(Ke,"DIV",{class:!0});var A=y(P);h($e.$$.fragment,A),no=r(A),qe=s(A,"P",{"data-svelte-h":!0}),m(qe)!=="svelte-vs7s0z"&&(qe.innerHTML=So),so=r(A),ze=s(A,"P",{"data-svelte-h":!0}),m(ze)!=="svelte-15b960v"&&(ze.innerHTML=Ho),io=r(A),Ze=s(A,"P",{"data-svelte-h":!0}),m(Ze)!=="svelte-n3hs9x"&&(Ze.innerHTML=Uo),lo=r(A),Be=s(A,"P",{"data-svelte-h":!0}),m(Be)!=="svelte-x1hw6o"&&(Be.innerHTML=No),co=r(A),Fe=s(A,"P",{"data-svelte-h":!0}),m(Fe)!=="svelte-1e3awtq"&&(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(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(X,"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(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(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,p){t(document.head,a),$(e,b,p),$(e,c,p),$(e,u,p),g(w,e,p),$(e,i,p),$(e,T,p),$(e,rt,p),$(e,te,p),$(e,at,p),g(V,e,p),$(e,nt,p),g(oe,e,p),$(e,st,p),$(e,l,p),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,G),g(ne,G,null),t(G,$t),t(G,Te),t(l,bt),t(l,X),g(se,X,null),t(X,wt),t(X,Ce),t(l,yt),t(l,S),g(de,S,null),t(S,Mt),t(S,De),t(S,Tt),g(j,S,null),t(l,Ct),t(l,H),g(ie,H,null),t(H,Dt),t(H,Pe),t(H,Pt),g(q,H,null),t(l,Rt),t(l,z),g(le,z,null),t(z,kt),t(z,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(pe,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,Gt),t(l,U),g(ue,U,null),t(U,Xt),t(U,We),t(U,jt),g(F,U,null),t(l,qt),t(l,Y),g(me,Y,null),t(Y,zt),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,Ge),t(N,Kt),g(K,N,null),t(l,eo),t(l,W),g(xe,W,null),t(W,to),t(W,Xe),t(W,oo),g(ee,W,null),$(e,dt,p),g(Le,e,p),$(e,it,p),$(e,I,p),g(ve,I,null),t(I,ro),t(I,je),t(I,ao),t(I,P),g($e,P,null),t(P,no),t(P,qe),t(P,so),t(P,ze),t(P,io),t(P,Ze),t(P,lo),t(P,Be),t(P,co),t(P,Fe),$(e,lt,p),$(e,tt,p),ct=!0},p(e,[p]){const f={};p&2&&(f.$$scope={dirty:p,ctx:e}),V.$set(f);const ot={};p&2&&(ot.$$scope={dirty:p,ctx:e}),j.$set(ot);const be={};p&2&&(be.$$scope={dirty:p,ctx:e}),q.$set(be);const we={};p&2&&(we.$$scope={dirty:p,ctx:e}),F.$set(we);const E={};p&2&&(E.$$scope={dirty:p,ctx:e}),K.$set(E);const J={};p&2&&(J.$$scope={dirty:p,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(j.$$.fragment,e),x(ie.$$.fragment,e),x(q.$$.fragment,e),x(le.$$.fragment,e),x(ce.$$.fragment,e),x(fe.$$.fragment,e),x(pe.$$.fragment,e),x(ue.$$.fragment,e),x(F.$$.fragment,e),x(me.$$.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(j.$$.fragment,e),L(ie.$$.fragment,e),L(q.$$.fragment,e),L(le.$$.fragment,e),L(ce.$$.fragment,e),L(fe.$$.fragment,e),L(pe.$$.fragment,e),L(ue.$$.fragment,e),L(F.$$.fragment,e),L(me.$$.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(u),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(j),v(ie),v(q),v(le),v(ce),v(fe),v(pe),v(ue),v(F),v(me),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 Go(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ir extends Xo{constructor(a){super(),jo(this,a,er,Qo,Vo,{})}}export{ir as component};
