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

pipeline = DiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>, torch_dtype=torch.float16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline.load_lora_weights(<span class="hljs-string">&quot;nerijs/pixel-art-xl&quot;</span>, weight_name=<span class="hljs-string">&quot;pixel-art-xl.safetensors&quot;</span>, adapter_name=<span class="hljs-string">&quot;pixel&quot;</span>)
pipeline.fuse_lora(lora_scale=<span class="hljs-number">0.7</span>)`,wrap:!1}}),{c(){o=s("p"),o.textContent=$,l=r(),_(c.$$.fragment)},l(n){o=d(n,"P",{"data-svelte-h":!0}),u(o)!=="svelte-11lpom8"&&(o.textContent=$),l=a(n),h(c.$$.fragment,n)},m(n,y){v(n,o,y),v(n,l,y),g(c,n,y),w=!0},p:De,i(n){w||(x(c.$$.fragment,n),w=!0)},o(n){L(c.$$.fragment,n),w=!1},d(n){n&&(i(o),i(l)),b(c,n)}}}function ar(D){let o,$="Example:",l,c,w;return c=new vo({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(){o=s("p"),o.textContent=$,l=r(),_(c.$$.fragment)},l(n){o=d(n,"P",{"data-svelte-h":!0}),u(o)!=="svelte-11lpom8"&&(o.textContent=$),l=a(n),h(c.$$.fragment,n)},m(n,y){v(n,o,y),v(n,l,y),g(c,n,y),w=!0},p:De,i(n){w||(x(c.$$.fragment,n),w=!0)},o(n){L(c.$$.fragment,n),w=!1},d(n){n&&(i(o),i(l)),b(c,n)}}}function nr(D){let o,$="We support loading A1111 formatted LoRA checkpoints in a limited capacity.",l,c,w="This function is experimental and might change in the future.";return{c(){o=s("p"),o.textContent=$,l=r(),c=s("p"),c.textContent=w},l(n){o=d(n,"P",{"data-svelte-h":!0}),u(o)!=="svelte-15l1sdn"&&(o.textContent=$),l=a(n),c=d(n,"P",{"data-svelte-h":!0}),u(c)!=="svelte-3fufvn"&&(c.textContent=w)},m(n,y){v(n,o,y),v(n,l,y),v(n,c,y)},p:De,d(n){n&&(i(o),i(l),i(c))}}}function sr(D){let o,$="This is an experimental API.";return{c(){o=s("p"),o.textContent=$},l(l){o=d(l,"P",{"data-svelte-h":!0}),u(o)!=="svelte-8w79b9"&&(o.textContent=$)},m(l,c){v(l,o,c)},p:De,d(l){l&&i(o)}}}function dr(D){let o,$="Examples:",l,c,w;return c=new vo({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(){o=s("p"),o.textContent=$,l=r(),_(c.$$.fragment)},l(n){o=d(n,"P",{"data-svelte-h":!0}),u(o)!=="svelte-kvfsh7"&&(o.textContent=$),l=a(n),h(c.$$.fragment,n)},m(n,y){v(n,o,y),v(n,l,y),g(c,n,y),w=!0},p:De,i(n){w||(x(c.$$.fragment,n),w=!0)},o(n){L(c.$$.fragment,n),w=!1},d(n){n&&(i(o),i(l)),b(c,n)}}}function ir(D){let o,$,l,c,w,n,y,$o="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:",it,re,wo='<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>',lt,E,ct,ae,ft,f,ne,wt,ke,yo=`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>.`,yt,Re,se,Mt,Z,de,Tt,Ae,Mo="Disables the LoRA layers for the text encoder.",Ct,G,ie,Dt,Pe,To="Enables the LoRA layers for the text encoder.",kt,A,le,Rt,Ie,Co="Fuses the LoRA parameters into the original parameters of the corresponding blocks.",At,V,Pt,X,It,H,ce,Ut,Ue,Do="Gets the list of the current active adapters.",St,z,Ht,q,fe,Jt,Se,ko="Gets the current list of all available adapters in the pipeline.",Nt,B,pe,Wt,He,Ro="This will load the LoRA layers specified in <code>state_dict</code> into <code>text_encoder</code>",jt,F,me,Et,Je,Ao="This will load the LoRA layers specified in <code>state_dict</code> into <code>transformer</code>.",Zt,Y,ue,Gt,Ne,Po="This will load the LoRA layers specified in <code>state_dict</code> into <code>unet</code>.",Vt,k,_e,Xt,We,Io=`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>.`,zt,je,Uo="All kwargs are forwarded to <code>self.lora_state_dict</code>.",qt,Ee,So='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.',Bt,Ze,Ho=`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>.`,Ft,Ge,Jo=`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>.`,Yt,J,he,Ot,Ve,No="Return state dict for lora weights and the network alphas.",Qt,O,Kt,Q,ge,eo,Xe,Wo="Save the LoRA parameters corresponding to the UNet and text encoder.",to,K,xe,oo,ze,jo="Sets the adapter layers for the text encoder.",ro,ee,Le,ao,qe,Eo=`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.`,no,N,be,so,Be,Zo=`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>.`,io,te,lo,W,ve,co,Fe,Go="Unloads the LoRA parameters.",fo,oe,pt,$e,mt,U,we,po,Ye,Vo="This class overrides <code>LoraLoaderMixin</code> with LoRA loading/saving code that’s specific to SDXL",mo,R,ye,uo,Oe,Xo=`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>.`,_o,Qe,zo="All kwargs are forwarded to <code>self.lora_state_dict</code>.",ho,Ke,qo='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.',go,et,Bo=`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>.`,xo,tt,Fo=`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>.`,ut,st,_t;return w=new bo({props:{title:"LoRA",local:"lora",headingTag:"h1"}}),E=new $t({props:{$$slots:{default:[tr]},$$scope:{ctx:D}}}),ae=new bo({props:{title:"LoraLoaderMixin",local:"diffusers.loaders.LoraLoaderMixin",headingTag:"h2"}}),ne=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#L71"}}),se=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#L1283"}}),de=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#L1207"}}),ie=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#L1224"}}),le=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"},{name:"adapter_names",val:": typing.Optional[typing.List[str]] = None"}],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"},{anchor:"diffusers.loaders.LoraLoaderMixin.fuse_lora.adapter_names",description:`<strong>adapter_names</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Adapter names to be used for fusing. If nothing is passed, all active adapters will be fused.`,name:"adapter_names"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora.py#L999"}}),V=new $t({props:{warning:!0,$$slots:{default:[or]},$$scope:{ctx:D}}}),X=new Lo({props:{anchor:"diffusers.loaders.LoraLoaderMixin.fuse_lora.example",$$slots:{default:[rr]},$$scope:{ctx:D}}}),ce=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#L1307"}}),z=new Lo({props:{anchor:"diffusers.loaders.LoraLoaderMixin.get_active_adapters.example",$$slots:{default:[ar]},$$scope:{ctx:D}}}),fe=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#L1339"}}),pe=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#L483"}}),me=new C({props:{name:"load_lora_into_transformer",anchor:"diffusers.loaders.LoraLoaderMixin.load_lora_into_transformer",parameters:[{name:"state_dict",val:""},{name:"network_alphas",val:""},{name:"transformer",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_transformer.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_transformer.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_transformer.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_transformer.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_transformer.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#L667"}}),ue=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#L374"}}),_e=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#L82"}}),he=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#L137"}}),O=new $t({props:{warning:!0,$$slots:{default:[nr]},$$scope:{ctx:D}}}),ge=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:"transformer_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#L869"}}),xe=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#L1165"}}),Le=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#L1362"}}),be=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#L1105"}}),te=new $t({props:{warning:!0,$$slots:{default:[sr]},$$scope:{ctx:D}}}),ve=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#L967"}}),oe=new Lo({props:{anchor:"diffusers.loaders.LoraLoaderMixin.unload_lora_weights.example",$$slots:{default:[dr]},$$scope:{ctx:D}}}),$e=new bo({props:{title:"StableDiffusionXLLoraLoaderMixin",local:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin",headingTag:"h2"}}),we=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#L1403"}}),ye=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#L1407"}}),{c(){o=s("meta"),$=r(),l=s("p"),c=r(),_(w.$$.fragment),n=r(),y=s("p"),y.textContent=$o,it=r(),re=s("ul"),re.innerHTML=wo,lt=r(),_(E.$$.fragment),ct=r(),_(ae.$$.fragment),ft=r(),f=s("div"),_(ne.$$.fragment),wt=r(),ke=s("p"),ke.innerHTML=yo,yt=r(),Re=s("div"),_(se.$$.fragment),Mt=r(),Z=s("div"),_(de.$$.fragment),Tt=r(),Ae=s("p"),Ae.textContent=Mo,Ct=r(),G=s("div"),_(ie.$$.fragment),Dt=r(),Pe=s("p"),Pe.textContent=To,kt=r(),A=s("div"),_(le.$$.fragment),Rt=r(),Ie=s("p"),Ie.textContent=Co,At=r(),_(V.$$.fragment),Pt=r(),_(X.$$.fragment),It=r(),H=s("div"),_(ce.$$.fragment),Ut=r(),Ue=s("p"),Ue.textContent=Do,St=r(),_(z.$$.fragment),Ht=r(),q=s("div"),_(fe.$$.fragment),Jt=r(),Se=s("p"),Se.textContent=ko,Nt=r(),B=s("div"),_(pe.$$.fragment),Wt=r(),He=s("p"),He.innerHTML=Ro,jt=r(),F=s("div"),_(me.$$.fragment),Et=r(),Je=s("p"),Je.innerHTML=Ao,Zt=r(),Y=s("div"),_(ue.$$.fragment),Gt=r(),Ne=s("p"),Ne.innerHTML=Po,Vt=r(),k=s("div"),_(_e.$$.fragment),Xt=r(),We=s("p"),We.innerHTML=Io,zt=r(),je=s("p"),je.innerHTML=Uo,qt=r(),Ee=s("p"),Ee.innerHTML=So,Bt=r(),Ze=s("p"),Ze.innerHTML=Ho,Ft=r(),Ge=s("p"),Ge.innerHTML=Jo,Yt=r(),J=s("div"),_(he.$$.fragment),Ot=r(),Ve=s("p"),Ve.textContent=No,Qt=r(),_(O.$$.fragment),Kt=r(),Q=s("div"),_(ge.$$.fragment),eo=r(),Xe=s("p"),Xe.textContent=Wo,to=r(),K=s("div"),_(xe.$$.fragment),oo=r(),ze=s("p"),ze.textContent=jo,ro=r(),ee=s("div"),_(Le.$$.fragment),ao=r(),qe=s("p"),qe.innerHTML=Eo,no=r(),N=s("div"),_(be.$$.fragment),so=r(),Be=s("p"),Be.innerHTML=Zo,io=r(),_(te.$$.fragment),lo=r(),W=s("div"),_(ve.$$.fragment),co=r(),Fe=s("p"),Fe.textContent=Go,fo=r(),_(oe.$$.fragment),pt=r(),_($e.$$.fragment),mt=r(),U=s("div"),_(we.$$.fragment),po=r(),Ye=s("p"),Ye.innerHTML=Vo,mo=r(),R=s("div"),_(ye.$$.fragment),uo=r(),Oe=s("p"),Oe.innerHTML=Xo,_o=r(),Qe=s("p"),Qe.innerHTML=zo,ho=r(),Ke=s("p"),Ke.innerHTML=qo,go=r(),et=s("p"),et.innerHTML=Bo,xo=r(),tt=s("p"),tt.innerHTML=Fo,ut=r(),st=s("p"),this.h()},l(e){const m=er("svelte-u9bgzb",document.head);o=d(m,"META",{name:!0,content:!0}),m.forEach(i),$=a(e),l=d(e,"P",{}),M(l).forEach(i),c=a(e),h(w.$$.fragment,e),n=a(e),y=d(e,"P",{"data-svelte-h":!0}),u(y)!=="svelte-99vqvv"&&(y.textContent=$o),it=a(e),re=d(e,"UL",{"data-svelte-h":!0}),u(re)!=="svelte-1x6k2ez"&&(re.innerHTML=wo),lt=a(e),h(E.$$.fragment,e),ct=a(e),h(ae.$$.fragment,e),ft=a(e),f=d(e,"DIV",{class:!0});var p=M(f);h(ne.$$.fragment,p),wt=a(p),ke=d(p,"P",{"data-svelte-h":!0}),u(ke)!=="svelte-1pb3n03"&&(ke.innerHTML=yo),yt=a(p),Re=d(p,"DIV",{class:!0});var dt=M(Re);h(se.$$.fragment,dt),dt.forEach(i),Mt=a(p),Z=d(p,"DIV",{class:!0});var Me=M(Z);h(de.$$.fragment,Me),Tt=a(Me),Ae=d(Me,"P",{"data-svelte-h":!0}),u(Ae)!=="svelte-tbr0r9"&&(Ae.textContent=Mo),Me.forEach(i),Ct=a(p),G=d(p,"DIV",{class:!0});var Te=M(G);h(ie.$$.fragment,Te),Dt=a(Te),Pe=d(Te,"P",{"data-svelte-h":!0}),u(Pe)!=="svelte-ujvdgi"&&(Pe.textContent=To),Te.forEach(i),kt=a(p),A=d(p,"DIV",{class:!0});var S=M(A);h(le.$$.fragment,S),Rt=a(S),Ie=d(S,"P",{"data-svelte-h":!0}),u(Ie)!=="svelte-1nr2dy0"&&(Ie.textContent=Co),At=a(S),h(V.$$.fragment,S),Pt=a(S),h(X.$$.fragment,S),S.forEach(i),It=a(p),H=d(p,"DIV",{class:!0});var j=M(H);h(ce.$$.fragment,j),Ut=a(j),Ue=d(j,"P",{"data-svelte-h":!0}),u(Ue)!=="svelte-h0os0v"&&(Ue.textContent=Do),St=a(j),h(z.$$.fragment,j),j.forEach(i),Ht=a(p),q=d(p,"DIV",{class:!0});var Ce=M(q);h(fe.$$.fragment,Ce),Jt=a(Ce),Se=d(Ce,"P",{"data-svelte-h":!0}),u(Se)!=="svelte-1825k9e"&&(Se.textContent=ko),Ce.forEach(i),Nt=a(p),B=d(p,"DIV",{class:!0});var ht=M(B);h(pe.$$.fragment,ht),Wt=a(ht),He=d(ht,"P",{"data-svelte-h":!0}),u(He)!=="svelte-1062ci4"&&(He.innerHTML=Ro),ht.forEach(i),jt=a(p),F=d(p,"DIV",{class:!0});var gt=M(F);h(me.$$.fragment,gt),Et=a(gt),Je=d(gt,"P",{"data-svelte-h":!0}),u(Je)!=="svelte-1lgbsz7"&&(Je.innerHTML=Ao),gt.forEach(i),Zt=a(p),Y=d(p,"DIV",{class:!0});var xt=M(Y);h(ue.$$.fragment,xt),Gt=a(xt),Ne=d(xt,"P",{"data-svelte-h":!0}),u(Ne)!=="svelte-u3q4so"&&(Ne.innerHTML=Po),xt.forEach(i),Vt=a(p),k=d(p,"DIV",{class:!0});var P=M(k);h(_e.$$.fragment,P),Xt=a(P),We=d(P,"P",{"data-svelte-h":!0}),u(We)!=="svelte-vs7s0z"&&(We.innerHTML=Io),zt=a(P),je=d(P,"P",{"data-svelte-h":!0}),u(je)!=="svelte-15b960v"&&(je.innerHTML=Uo),qt=a(P),Ee=d(P,"P",{"data-svelte-h":!0}),u(Ee)!=="svelte-12uyc98"&&(Ee.innerHTML=So),Bt=a(P),Ze=d(P,"P",{"data-svelte-h":!0}),u(Ze)!=="svelte-1q3yzk7"&&(Ze.innerHTML=Ho),Ft=a(P),Ge=d(P,"P",{"data-svelte-h":!0}),u(Ge)!=="svelte-10xxjud"&&(Ge.innerHTML=Jo),P.forEach(i),Yt=a(p),J=d(p,"DIV",{class:!0});var ot=M(J);h(he.$$.fragment,ot),Ot=a(ot),Ve=d(ot,"P",{"data-svelte-h":!0}),u(Ve)!=="svelte-flusvq"&&(Ve.textContent=No),Qt=a(ot),h(O.$$.fragment,ot),ot.forEach(i),Kt=a(p),Q=d(p,"DIV",{class:!0});var Lt=M(Q);h(ge.$$.fragment,Lt),eo=a(Lt),Xe=d(Lt,"P",{"data-svelte-h":!0}),u(Xe)!=="svelte-1ufq5ot"&&(Xe.textContent=Wo),Lt.forEach(i),to=a(p),K=d(p,"DIV",{class:!0});var bt=M(K);h(xe.$$.fragment,bt),oo=a(bt),ze=d(bt,"P",{"data-svelte-h":!0}),u(ze)!=="svelte-kmejci"&&(ze.textContent=jo),bt.forEach(i),ro=a(p),ee=d(p,"DIV",{class:!0});var vt=M(ee);h(Le.$$.fragment,vt),ao=a(vt),qe=d(vt,"P",{"data-svelte-h":!0}),u(qe)!=="svelte-rvubqa"&&(qe.innerHTML=Eo),vt.forEach(i),no=a(p),N=d(p,"DIV",{class:!0});var rt=M(N);h(be.$$.fragment,rt),so=a(rt),Be=d(rt,"P",{"data-svelte-h":!0}),u(Be)!=="svelte-56a0bo"&&(Be.innerHTML=Zo),io=a(rt),h(te.$$.fragment,rt),rt.forEach(i),lo=a(p),W=d(p,"DIV",{class:!0});var at=M(W);h(ve.$$.fragment,at),co=a(at),Fe=d(at,"P",{"data-svelte-h":!0}),u(Fe)!=="svelte-119cgd9"&&(Fe.textContent=Go),fo=a(at),h(oe.$$.fragment,at),at.forEach(i),p.forEach(i),pt=a(e),h($e.$$.fragment,e),mt=a(e),U=d(e,"DIV",{class:!0});var nt=M(U);h(we.$$.fragment,nt),po=a(nt),Ye=d(nt,"P",{"data-svelte-h":!0}),u(Ye)!=="svelte-1powver"&&(Ye.innerHTML=Vo),mo=a(nt),R=d(nt,"DIV",{class:!0});var I=M(R);h(ye.$$.fragment,I),uo=a(I),Oe=d(I,"P",{"data-svelte-h":!0}),u(Oe)!=="svelte-vs7s0z"&&(Oe.innerHTML=Xo),_o=a(I),Qe=d(I,"P",{"data-svelte-h":!0}),u(Qe)!=="svelte-15b960v"&&(Qe.innerHTML=zo),ho=a(I),Ke=d(I,"P",{"data-svelte-h":!0}),u(Ke)!=="svelte-12uyc98"&&(Ke.innerHTML=qo),go=a(I),et=d(I,"P",{"data-svelte-h":!0}),u(et)!=="svelte-1q3yzk7"&&(et.innerHTML=Bo),xo=a(I),tt=d(I,"P",{"data-svelte-h":!0}),u(tt)!=="svelte-10xxjud"&&(tt.innerHTML=Fo),I.forEach(i),nt.forEach(i),ut=a(e),st=d(e,"P",{}),M(st).forEach(i),this.h()},h(){T(o,"name","hf:doc:metadata"),T(o,"content",lr),T(Re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(f,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(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(e,m){t(document.head,o),v(e,$,m),v(e,l,m),v(e,c,m),g(w,e,m),v(e,n,m),v(e,y,m),v(e,it,m),v(e,re,m),v(e,lt,m),g(E,e,m),v(e,ct,m),g(ae,e,m),v(e,ft,m),v(e,f,m),g(ne,f,null),t(f,wt),t(f,ke),t(f,yt),t(f,Re),g(se,Re,null),t(f,Mt),t(f,Z),g(de,Z,null),t(Z,Tt),t(Z,Ae),t(f,Ct),t(f,G),g(ie,G,null),t(G,Dt),t(G,Pe),t(f,kt),t(f,A),g(le,A,null),t(A,Rt),t(A,Ie),t(A,At),g(V,A,null),t(A,Pt),g(X,A,null),t(f,It),t(f,H),g(ce,H,null),t(H,Ut),t(H,Ue),t(H,St),g(z,H,null),t(f,Ht),t(f,q),g(fe,q,null),t(q,Jt),t(q,Se),t(f,Nt),t(f,B),g(pe,B,null),t(B,Wt),t(B,He),t(f,jt),t(f,F),g(me,F,null),t(F,Et),t(F,Je),t(f,Zt),t(f,Y),g(ue,Y,null),t(Y,Gt),t(Y,Ne),t(f,Vt),t(f,k),g(_e,k,null),t(k,Xt),t(k,We),t(k,zt),t(k,je),t(k,qt),t(k,Ee),t(k,Bt),t(k,Ze),t(k,Ft),t(k,Ge),t(f,Yt),t(f,J),g(he,J,null),t(J,Ot),t(J,Ve),t(J,Qt),g(O,J,null),t(f,Kt),t(f,Q),g(ge,Q,null),t(Q,eo),t(Q,Xe),t(f,to),t(f,K),g(xe,K,null),t(K,oo),t(K,ze),t(f,ro),t(f,ee),g(Le,ee,null),t(ee,ao),t(ee,qe),t(f,no),t(f,N),g(be,N,null),t(N,so),t(N,Be),t(N,io),g(te,N,null),t(f,lo),t(f,W),g(ve,W,null),t(W,co),t(W,Fe),t(W,fo),g(oe,W,null),v(e,pt,m),g($e,e,m),v(e,mt,m),v(e,U,m),g(we,U,null),t(U,po),t(U,Ye),t(U,mo),t(U,R),g(ye,R,null),t(R,uo),t(R,Oe),t(R,_o),t(R,Qe),t(R,ho),t(R,Ke),t(R,go),t(R,et),t(R,xo),t(R,tt),v(e,ut,m),v(e,st,m),_t=!0},p(e,[m]){const p={};m&2&&(p.$$scope={dirty:m,ctx:e}),E.$set(p);const dt={};m&2&&(dt.$$scope={dirty:m,ctx:e}),V.$set(dt);const Me={};m&2&&(Me.$$scope={dirty:m,ctx:e}),X.$set(Me);const Te={};m&2&&(Te.$$scope={dirty:m,ctx:e}),z.$set(Te);const S={};m&2&&(S.$$scope={dirty:m,ctx:e}),O.$set(S);const j={};m&2&&(j.$$scope={dirty:m,ctx:e}),te.$set(j);const Ce={};m&2&&(Ce.$$scope={dirty:m,ctx:e}),oe.$set(Ce)},i(e){_t||(x(w.$$.fragment,e),x(E.$$.fragment,e),x(ae.$$.fragment,e),x(ne.$$.fragment,e),x(se.$$.fragment,e),x(de.$$.fragment,e),x(ie.$$.fragment,e),x(le.$$.fragment,e),x(V.$$.fragment,e),x(X.$$.fragment,e),x(ce.$$.fragment,e),x(z.$$.fragment,e),x(fe.$$.fragment,e),x(pe.$$.fragment,e),x(me.$$.fragment,e),x(ue.$$.fragment,e),x(_e.$$.fragment,e),x(he.$$.fragment,e),x(O.$$.fragment,e),x(ge.$$.fragment,e),x(xe.$$.fragment,e),x(Le.$$.fragment,e),x(be.$$.fragment,e),x(te.$$.fragment,e),x(ve.$$.fragment,e),x(oe.$$.fragment,e),x($e.$$.fragment,e),x(we.$$.fragment,e),x(ye.$$.fragment,e),_t=!0)},o(e){L(w.$$.fragment,e),L(E.$$.fragment,e),L(ae.$$.fragment,e),L(ne.$$.fragment,e),L(se.$$.fragment,e),L(de.$$.fragment,e),L(ie.$$.fragment,e),L(le.$$.fragment,e),L(V.$$.fragment,e),L(X.$$.fragment,e),L(ce.$$.fragment,e),L(z.$$.fragment,e),L(fe.$$.fragment,e),L(pe.$$.fragment,e),L(me.$$.fragment,e),L(ue.$$.fragment,e),L(_e.$$.fragment,e),L(he.$$.fragment,e),L(O.$$.fragment,e),L(ge.$$.fragment,e),L(xe.$$.fragment,e),L(Le.$$.fragment,e),L(be.$$.fragment,e),L(te.$$.fragment,e),L(ve.$$.fragment,e),L(oe.$$.fragment,e),L($e.$$.fragment,e),L(we.$$.fragment,e),L(ye.$$.fragment,e),_t=!1},d(e){e&&(i($),i(l),i(c),i(n),i(y),i(it),i(re),i(lt),i(ct),i(ft),i(f),i(pt),i(mt),i(U),i(ut),i(st)),i(o),b(w,e),b(E,e),b(ae,e),b(ne),b(se),b(de),b(ie),b(le),b(V),b(X),b(ce),b(z),b(fe),b(pe),b(me),b(ue),b(_e),b(he),b(O),b(ge),b(xe),b(Le),b(be),b(te),b(ve),b(oe),b($e,e),b(we),b(ye)}}}const lr='{"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 cr(D){return Oo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xr extends Qo{constructor(o){super(),Ko(this,o,cr,ir,Yo,{})}}export{xr as component};
