import{s as ma,f as Ma,o as da,n as I}from"../chunks/scheduler.8c3d61f6.js";import{S as ua,i as fa,g as J,s as i,r as M,A as ca,h as y,f as t,c as p,j as rs,u as d,x as T,k as G,y as ha,a as s,v as u,d as f,t as c,w as h}from"../chunks/index.da70eac4.js";import{T as wl}from"../chunks/Tip.1d9b8c37.js";import{C as b}from"../chunks/CodeBlock.a9c4becf.js";import{H as Z,E as wa}from"../chunks/index.ef90fe87.js";import{H as ms,a as Jl}from"../chunks/HfOption.6ab18950.js";function Ja(g){let a,m;return a=new b({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZSUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUwQSUyMCUyMCUyMCUyMCUyMm9zdHJpcyUyRnN1cGVyLWNlcmVhbC1zZHhsLWxvcmElMjIlMkMlMEElMjAlMjAlMjAlMjB3ZWlnaHRfbmFtZSUzRCUyMmNlcmVhbF9ib3hfc2R4bF92MS5zYWZldGVuc29ycyUyMiUyQyUwQSUyMCUyMCUyMCUyMGFkYXB0ZXJfbmFtZSUzRCUyMmNlcmVhbCUyMiUwQSklMEFwaXBlbGluZSglMjJiZWFycyUyQyUyMHBpenphJTIwYml0ZXMlMjIpLmltYWdlcyU1QjAlNUQ=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image

pipeline = AutoPipelineForText2Image.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;ostris/super-cereal-sdxl-lora&quot;</span>,
    weight_name=<span class="hljs-string">&quot;cereal_box_sdxl_v1.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;cereal&quot;</span>
)
pipeline(<span class="hljs-string">&quot;bears, pizza bites&quot;</span>).images[<span class="hljs-number">0</span>]`,wrap:!1}}),{c(){M(a.$$.fragment)},l(n){d(a.$$.fragment,n)},m(n,w){u(a,n,w),m=!0},p:I,i(n){m||(f(a.$$.fragment,n),m=!0)},o(n){c(a.$$.fragment,n),m=!1},d(n){h(a,n)}}}function ya(g){let a,m;return a=new b({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwTFRYQ29uZGl0aW9uUGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTJDJTIwbG9hZF9pbWFnZSUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwTFRYQ29uZGl0aW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMkxpZ2h0cmlja3MlMkZMVFgtVmlkZW8tMC45LjUlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTBBKSUwQSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUwQSUyMCUyMCUyMCUyMCUyMkxpZ2h0cmlja3MlMkZMVFgtVmlkZW8tQ2FrZWlmeS1Mb1JBJTIyJTJDJTBBJTIwJTIwJTIwJTIwd2VpZ2h0X25hbWUlM0QlMjJsdHh2XzA5NV9jYWtlaWZ5X2xvcmEuc2FmZXRlbnNvcnMlMjIlMkMlMEElMjAlMjAlMjAlMjBhZGFwdGVyX25hbWUlM0QlMjJjYWtlaWZ5JTIyJTBBKSUwQXBpcGVsaW5lLnNldF9hZGFwdGVycyglMjJjYWtlaWZ5JTIyKSUwQSUwQSUyMyUyMHVzZSUyMCUyMkNBS0VJRlklMjIlMjB0byUyMHRyaWdnZXIlMjB0aGUlMjBMb1JBJTBBcHJvbXB0JTIwJTNEJTIwJTIyQ0FLRUlGWSUyMGElMjBwZXJzb24lMjB1c2luZyUyMGElMjBrbmlmZSUyMHRvJTIwY3V0JTIwYSUyMGNha2UlMjBzaGFwZWQlMjBsaWtlJTIwYSUyMFBpa2FjaHUlMjBwbHVzaGllJTIyJTBBaW1hZ2UlMjAlM0QlMjBsb2FkX2ltYWdlKCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZMaWdodHJpY2tzJTJGTFRYLVZpZGVvLUNha2VpZnktTG9SQSUyRnJlc29sdmUlMkZtYWluJTJGYXNzZXRzJTJGaW1hZ2VzJTJGcGlrYWNodS5wbmclMjIpJTBBJTBBdmlkZW8lMjAlM0QlMjBwaXBlbGluZSglMEElMjAlMjAlMjAlMjBwcm9tcHQlM0Rwcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBpbWFnZSUzRGltYWdlJTJDJTBBJTIwJTIwJTIwJTIwd2lkdGglM0Q1NzYlMkMlMEElMjAlMjAlMjAlMjBoZWlnaHQlM0Q1NzYlMkMlMEElMjAlMjAlMjAlMjBudW1fZnJhbWVzJTNEMTYxJTJDJTBBJTIwJTIwJTIwJTIwZGVjb2RlX3RpbWVzdGVwJTNEMC4wMyUyQyUwQSUyMCUyMCUyMCUyMGRlY29kZV9ub2lzZV9zY2FsZSUzRDAuMDI1JTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDUwJTJDJTBBKS5mcmFtZXMlNUIwJTVEJTBBZXhwb3J0X3RvX3ZpZGVvKHZpZGVvJTJDJTIwJTIyb3V0cHV0Lm1wNCUyMiUyQyUyMGZwcyUzRDI2KQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> LTXConditionPipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video, load_image

pipeline = LTXConditionPipeline.from_pretrained(
    <span class="hljs-string">&quot;Lightricks/LTX-Video-0.9.5&quot;</span>, torch_dtype=torch.bfloat16
)

pipeline.load_lora_weights(
    <span class="hljs-string">&quot;Lightricks/LTX-Video-Cakeify-LoRA&quot;</span>,
    weight_name=<span class="hljs-string">&quot;ltxv_095_cakeify_lora.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;cakeify&quot;</span>
)
pipeline.set_adapters(<span class="hljs-string">&quot;cakeify&quot;</span>)

<span class="hljs-comment"># use &quot;CAKEIFY&quot; to trigger the LoRA</span>
prompt = <span class="hljs-string">&quot;CAKEIFY a person using a knife to cut a cake shaped like a Pikachu plushie&quot;</span>
image = load_image(<span class="hljs-string">&quot;https://huggingface.co/Lightricks/LTX-Video-Cakeify-LoRA/resolve/main/assets/images/pikachu.png&quot;</span>)

video = pipeline(
    prompt=prompt,
    image=image,
    width=<span class="hljs-number">576</span>,
    height=<span class="hljs-number">576</span>,
    num_frames=<span class="hljs-number">161</span>,
    decode_timestep=<span class="hljs-number">0.03</span>,
    decode_noise_scale=<span class="hljs-number">0.025</span>,
    num_inference_steps=<span class="hljs-number">50</span>,
).frames[<span class="hljs-number">0</span>]
export_to_video(video, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">26</span>)`,wrap:!1}}),{c(){M(a.$$.fragment)},l(n){d(a.$$.fragment,n)},m(n,w){u(a,n,w),m=!0},p:I,i(n){m||(f(a.$$.fragment,n),m=!0)},o(n){c(a.$$.fragment,n),m=!1},d(n){h(a,n)}}}function Ta(g){let a,m,n,w;return a=new Jl({props:{id:"usage",option:"text-to-image",$$slots:{default:[Ja]},$$scope:{ctx:g}}}),n=new Jl({props:{id:"usage",option:"text-to-video",$$slots:{default:[ya]},$$scope:{ctx:g}}}),{c(){M(a.$$.fragment),m=i(),M(n.$$.fragment)},l(o){d(a.$$.fragment,o),m=p(o),d(n.$$.fragment,o)},m(o,r){u(a,o,r),s(o,m,r),u(n,o,r),w=!0},p(o,r){const U={};r&2&&(U.$$scope={dirty:r,ctx:o}),a.$set(U);const j={};r&2&&(j.$$scope={dirty:r,ctx:o}),n.$set(j)},i(o){w||(f(a.$$.fragment,o),f(n.$$.fragment,o),w=!0)},o(o){c(a.$$.fragment,o),c(n.$$.fragment,o),w=!1},d(o){o&&t(m),h(a,o),h(n,o)}}}function ja(g){let a,m="For simple use cases, you can pass <code>cross_attention_kwargs={&quot;scale&quot;: 1.0}</code> to the pipeline.",n,w,o;return w=new b({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZSUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUwQSUyMCUyMCUyMCUyMCUyMm9zdHJpcyUyRnN1cGVyLWNlcmVhbC1zZHhsLWxvcmElMjIlMkMlMEElMjAlMjAlMjAlMjB3ZWlnaHRfbmFtZSUzRCUyMmNlcmVhbF9ib3hfc2R4bF92MS5zYWZldGVuc29ycyUyMiUyQyUwQSUyMCUyMCUyMCUyMGFkYXB0ZXJfbmFtZSUzRCUyMmNlcmVhbCUyMiUwQSklMEFwaXBlbGluZSglMjJiZWFycyUyQyUyMHBpenphJTIwYml0ZXMlMjIlMkMlMjBjcm9zc19hdHRlbnRpb25fa3dhcmdzJTNEJTdCJTIyc2NhbGUlMjIlM0ElMjAxLjAlN0QpLmltYWdlcyU1QjAlNUQ=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image

pipeline = AutoPipelineForText2Image.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;ostris/super-cereal-sdxl-lora&quot;</span>,
    weight_name=<span class="hljs-string">&quot;cereal_box_sdxl_v1.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;cereal&quot;</span>
)
pipeline(<span class="hljs-string">&quot;bears, pizza bites&quot;</span>, cross_attention_kwargs={<span class="hljs-string">&quot;scale&quot;</span>: <span class="hljs-number">1.0</span>}).images[<span class="hljs-number">0</span>]`,wrap:!1}}),{c(){a=J("p"),a.innerHTML=m,n=i(),M(w.$$.fragment)},l(r){a=y(r,"P",{"data-svelte-h":!0}),T(a)!=="svelte-190bybd"&&(a.innerHTML=m),n=p(r),d(w.$$.fragment,r)},m(r,U){s(r,a,U),s(r,n,U),u(w,r,U),o=!0},p:I,i(r){o||(f(w.$$.fragment,r),o=!0)},o(r){c(w.$$.fragment,r),o=!1},d(r){r&&(t(a),t(n)),h(w,r)}}}function ga(g){let a,m='The <a href="/docs/diffusers/main/en/api/loaders/peft#diffusers.loaders.PeftAdapterMixin.set_adapters">set_adapters()</a> method only scales attention weights. If a LoRA has ResNets or down and upsamplers, these components keep a scale value of <code>1.0</code>.';return{c(){a=J("p"),a.innerHTML=m},l(n){a=y(n,"P",{"data-svelte-h":!0}),T(a)!=="svelte-83s57e"&&(a.innerHTML=m)},m(n,w){s(n,a,w)},p:I,d(n){n&&t(a)}}}function ba(g){let a,m,n,w="For finer control over each individual component of the UNet or text encoder, pass a dictionary instead. In the example below, the <code>&quot;down&quot;</code> block in the UNet is scaled by 0.9 and you can further specify in the <code>&quot;up&quot;</code> block the scales of the transformers in <code>&quot;block_0&quot;</code> and <code>&quot;block_1&quot;</code>. If a block like <code>&quot;mid&quot;</code> isn’t specified, the default value <code>1.0</code> is used.",o,r,U;return a=new wl({props:{warning:!0,$$slots:{default:[ga]},$$scope:{ctx:g}}}),r=new b({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZSUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUwQSUyMCUyMCUyMCUyMCUyMm9zdHJpcyUyRnN1cGVyLWNlcmVhbC1zZHhsLWxvcmElMjIlMkMlMEElMjAlMjAlMjAlMjB3ZWlnaHRfbmFtZSUzRCUyMmNlcmVhbF9ib3hfc2R4bF92MS5zYWZldGVuc29ycyUyMiUyQyUwQSUyMCUyMCUyMCUyMGFkYXB0ZXJfbmFtZSUzRCUyMmNlcmVhbCUyMiUwQSklMEFzY2FsZXMlMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjJ0ZXh0X2VuY29kZXIlMjIlM0ElMjAwLjUlMkMlMEElMjAlMjAlMjAlMjAlMjJ0ZXh0X2VuY29kZXJfMiUyMiUzQSUyMDAuNSUyQyUwQSUyMCUyMCUyMCUyMCUyMnVuZXQlMjIlM0ElMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJkb3duJTIyJTNBJTIwMC45JTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIydXAlMjIlM0ElMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJibG9ja18wJTIyJTNBJTIwMC42JTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyYmxvY2tfMSUyMiUzQSUyMCU1QjAuNCUyQyUyMDAuOCUyQyUyMDEuMCU1RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3RCUwQSUyMCUyMCUyMCUyMCU3RCUwQSU3RCUwQXBpcGVsaW5lLnNldF9hZGFwdGVycyglMjJjZXJlYWwlMjIlMkMlMjBzY2FsZXMpJTBBcGlwZWxpbmUoJTIyYmVhcnMlMkMlMjBwaXp6YSUyMGJpdGVzJTIyKS5pbWFnZXMlNUIwJTVE",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image

pipeline = AutoPipelineForText2Image.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;ostris/super-cereal-sdxl-lora&quot;</span>,
    weight_name=<span class="hljs-string">&quot;cereal_box_sdxl_v1.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;cereal&quot;</span>
)
scales = {
    <span class="hljs-string">&quot;text_encoder&quot;</span>: <span class="hljs-number">0.5</span>,
    <span class="hljs-string">&quot;text_encoder_2&quot;</span>: <span class="hljs-number">0.5</span>,
    <span class="hljs-string">&quot;unet&quot;</span>: {
        <span class="hljs-string">&quot;down&quot;</span>: <span class="hljs-number">0.9</span>,
        <span class="hljs-string">&quot;up&quot;</span>: {
            <span class="hljs-string">&quot;block_0&quot;</span>: <span class="hljs-number">0.6</span>,
            <span class="hljs-string">&quot;block_1&quot;</span>: [<span class="hljs-number">0.4</span>, <span class="hljs-number">0.8</span>, <span class="hljs-number">1.0</span>],
        }
    }
}
pipeline.set_adapters(<span class="hljs-string">&quot;cereal&quot;</span>, scales)
pipeline(<span class="hljs-string">&quot;bears, pizza bites&quot;</span>).images[<span class="hljs-number">0</span>]`,wrap:!1}}),{c(){M(a.$$.fragment),m=i(),n=J("p"),n.innerHTML=w,o=i(),M(r.$$.fragment)},l(j){d(a.$$.fragment,j),m=p(j),n=y(j,"P",{"data-svelte-h":!0}),T(n)!=="svelte-1gwev2i"&&(n.innerHTML=w),o=p(j),d(r.$$.fragment,j)},m(j,$){u(a,j,$),s(j,m,$),s(j,n,$),s(j,o,$),u(r,j,$),U=!0},p(j,$){const _={};$&2&&(_.$$scope={dirty:$,ctx:j}),a.$set(_)},i(j){U||(f(a.$$.fragment,j),f(r.$$.fragment,j),U=!0)},o(j){c(a.$$.fragment,j),c(r.$$.fragment,j),U=!1},d(j){j&&(t(m),t(n),t(o)),h(a,j),h(r,j)}}}function Ua(g){let a,m,n,w;return a=new Jl({props:{id:"weight-scale",option:"simple use case",$$slots:{default:[ja]},$$scope:{ctx:g}}}),n=new Jl({props:{id:"weight-scale",option:"finer control",$$slots:{default:[ba]},$$scope:{ctx:g}}}),{c(){M(a.$$.fragment),m=i(),M(n.$$.fragment)},l(o){d(a.$$.fragment,o),m=p(o),d(n.$$.fragment,o)},m(o,r){u(a,o,r),s(o,m,r),u(n,o,r),w=!0},p(o,r){const U={};r&2&&(U.$$scope={dirty:r,ctx:o}),a.$set(U);const j={};r&2&&(j.$$scope={dirty:r,ctx:o}),n.$set(j)},i(o){w||(f(a.$$.fragment,o),f(n.$$.fragment,o),w=!0)},o(o){c(a.$$.fragment,o),c(n.$$.fragment,o),w=!1},d(o){o&&t(m),h(a,o),h(n,o)}}}function Za(g){let a,m="Hotswapping is unsupported for LoRAs that target the text encoder.";return{c(){a=J("p"),a.textContent=m},l(n){a=y(n,"P",{"data-svelte-h":!0}),T(a)!=="svelte-vi6xdl"&&(a.textContent=m)},m(n,w){s(n,a,w)},p:I,d(n){n&&t(a)}}}function $a(g){let a,m='The <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.lora_base.LoraBaseMixin.enable_lora_hotswap">enable_lora_hotswap()</a> method isn’t always necessary if the second LoRA targets the identical LoRA ranks and scales as the first LoRA.';return{c(){a=J("p"),a.innerHTML=m},l(n){a=y(n,"P",{"data-svelte-h":!0}),T(a)!=="svelte-760szu"&&(a.innerHTML=m)},m(n,w){s(n,a,w)},p:I,d(n){n&&t(a)}}}function Ia(g){let a,m='Move your code inside the <code>with torch._dynamo.config.patch(error_on_recompile=True)</code> context manager to detect if a model was recompiled. If a model is recompiled despite following all the steps above, please open an <a href="https://github.com/huggingface/diffusers/issues" rel="nofollow">issue</a> with a reproducible example.';return{c(){a=J("p"),a.innerHTML=m},l(n){a=y(n,"P",{"data-svelte-h":!0}),T(a)!=="svelte-1vjkmsg"&&(a.innerHTML=m)},m(n,w){s(n,a,w)},p:I,d(n){n&&t(a)}}}function _a(g){let a,m='The <code>&quot;scale&quot;</code> parameter determines how much of the merged LoRA to apply. See the <a href="#weight-scale">Weight scale</a> section for more details.';return{c(){a=J("p"),a.innerHTML=m},l(n){a=y(n,"P",{"data-svelte-h":!0}),T(a)!=="svelte-bul9pr"&&(a.innerHTML=m)},m(n,w){s(n,a,w)},p:I,d(n){n&&t(a)}}}function Wa(g){let a,m='This is an experimental method and you can refer to PEFTs <a href="https://huggingface.co/docs/peft/developer_guides/model_merging" rel="nofollow">Model merging</a> for more details. Take a look at this <a href="https://github.com/huggingface/diffusers/issues/6892" rel="nofollow">issue</a> if you’re interested in the motivation and design behind this integration.';return{c(){a=J("p"),a.innerHTML=m},l(n){a=y(n,"P",{"data-svelte-h":!0}),T(a)!=="svelte-1p11i4r"&&(a.innerHTML=m)},m(n,w){s(n,a,w)},p:I,d(n){n&&t(a)}}}function Ga(g){let a,m="You can save and reuse the <code>ikea_peft_model</code> by pushing it to the Hub as shown below.",n,w,o;return w=new b({props:{code:"aWtlYV9wZWZ0X21vZGVsLnB1c2hfdG9faHViKCUyMmlrZWFfcGVmdF9tb2RlbCUyMiUyQyUyMHRva2VuJTNEVE9LRU4p",highlighted:'ikea_peft_model.push_to_hub(<span class="hljs-string">&quot;ikea_peft_model&quot;</span>, token=TOKEN)',wrap:!1}}),{c(){a=J("p"),a.innerHTML=m,n=i(),M(w.$$.fragment)},l(r){a=y(r,"P",{"data-svelte-h":!0}),T(a)!=="svelte-odteom"&&(a.innerHTML=m),n=p(r),d(w.$$.fragment,r)},m(r,U){s(r,a,U),s(r,n,U),u(w,r,U),o=!0},p:I,i(r){o||(f(w.$$.fragment,r),o=!0)},o(r){c(w.$$.fragment,r),o=!1},d(r){r&&(t(a),t(n)),h(w,r)}}}function ka(g){let a,m;return a=new b({props:{code:"cGlwZWxpbmUudW5sb2FkX2xvcmFfd2VpZ2h0cygpJTBBcGlwZWxpbmUuc2F2ZV9wcmV0cmFpbmVkKCUyMnBhdGglMkZ0byUyRmZ1c2VkLXBpcGVsaW5lJTIyKQ==",highlighted:`pipeline.unload_lora_weights()
pipeline.save_pretrained(<span class="hljs-string">&quot;path/to/fused-pipeline&quot;</span>)`,wrap:!1}}),{c(){M(a.$$.fragment)},l(n){d(a.$$.fragment,n)},m(n,w){u(a,n,w),m=!0},p:I,i(n){m||(f(a.$$.fragment,n),m=!0)},o(n){c(a.$$.fragment,n),m=!1},d(n){h(a,n)}}}function Ba(g){let a,m;return a=new b({props:{code:"cGlwZWxpbmUudW5sb2FkX2xvcmFfd2VpZ2h0cygpJTBBcGlwZWxpbmUucHVzaF90b19odWIoJTIyZnVzZWQtaWtlYS1mZW5nJTIyKQ==",highlighted:`pipeline.unload_lora_weights()
pipeline.push_to_hub(<span class="hljs-string">&quot;fused-ikea-feng&quot;</span>)`,wrap:!1}}),{c(){M(a.$$.fragment)},l(n){d(a.$$.fragment,n)},m(n,w){u(a,n,w),m=!0},p:I,i(n){m||(f(a.$$.fragment,n),m=!0)},o(n){c(a.$$.fragment,n),m=!1},d(n){h(a,n)}}}function Ra(g){let a,m,n,w;return a=new Jl({props:{id:"save",option:"save locally",$$slots:{default:[ka]},$$scope:{ctx:g}}}),n=new Jl({props:{id:"save",option:"save to Hub",$$slots:{default:[Ba]},$$scope:{ctx:g}}}),{c(){M(a.$$.fragment),m=i(),M(n.$$.fragment)},l(o){d(a.$$.fragment,o),m=p(o),d(n.$$.fragment,o)},m(o,r){u(a,o,r),s(o,m,r),u(n,o,r),w=!0},p(o,r){const U={};r&2&&(U.$$scope={dirty:r,ctx:o}),a.$set(U);const j={};r&2&&(j.$$scope={dirty:r,ctx:o}),n.$set(j)},i(o){w||(f(a.$$.fragment,o),f(n.$$.fragment,o),w=!0)},o(o){c(a.$$.fragment,o),c(n.$$.fragment,o),w=!1},d(o){o&&t(m),h(a,o),h(n,o)}}}function Va(g){let a,m,n,w,o,r,U,j='<a href="https://huggingface.co/papers/2106.09685" rel="nofollow">LoRA (Low-Rank Adaptation)</a> is a method for quickly training a model for a new task. It works by freezing the original model weights and adding a small number of <em>new</em> trainable parameters. This means it is significantly faster and cheaper to adapt an existing model to new tasks, such as generating images in a new style.',$,_,Ms='LoRA checkpoints are typically only a couple hundred MBs in size, so they’re very lightweight and easy to store. Load these smaller set of weights into an existing base model with <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> and specify the file name.',Tl,k,jl,x,ds='The <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> method is the preferred way to load LoRA weights into the UNet and text encoder because it can handle cases where:',gl,Y,us="<li>the LoRA weights don’t have separate UNet and text encoder identifiers</li> <li>the LoRA weights have separate UNet and text encoder identifiers</li>",bl,S,fs='The <a href="/docs/diffusers/main/en/api/loaders/peft#diffusers.loaders.PeftAdapterMixin.load_lora_adapter">load_lora_adapter()</a> method is used to directly load a LoRA adapter at the <em>model-level</em>, as long as the model is a Diffusers model that is a subclass of <code>PeftAdapterMixin</code>. It builds and prepares the necessary model configuration for the adapter. This method also loads the LoRA adapter into the UNet.',Ul,H,cs='For example, if you’re only loading a LoRA into the UNet, <a href="/docs/diffusers/main/en/api/loaders/peft#diffusers.loaders.PeftAdapterMixin.load_lora_adapter">load_lora_adapter()</a> ignores the text encoder keys. Use the <code>prefix</code> parameter to filter and load the appropriate state dicts, <code>&quot;unet&quot;</code> to load.',Zl,z,$l,Q,Il,N,hs='<a href="../optimization/torch2.0#torchcompile">torch.compile</a> speeds up inference by compiling the PyTorch model to use optimized kernels. Before compiling, the LoRA weights need to be fused into the base model and unloaded first.',_l,D,Wl,P,ws="Typically, the UNet is compiled because its the most compute intensive component of the pipeline.",Gl,K,kl,O,Js='Refer to the <a href="#hotswapping">hotswapping</a> section to learn how to avoid recompilation when working with compiled models and multiple LoRAs.',Bl,ee,Rl,le,ys="The <code>scale</code> parameter is used to control how much of a LoRA to apply. A value of <code>0</code> is equivalent to only using the base model weights and a value of <code>1</code> is equivalent to fully using the LoRA.",Vl,B,Al,te,vl,se,Ts='Hotswapping LoRAs is an efficient way to work with multiple LoRAs while avoiding accumulating memory from multiple calls to <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> and in some cases, recompilation, if a model is compiled. This workflow requires a loaded LoRA because the new LoRA weights are swapped in place for the existing loaded LoRA.',Cl,ae,ql,R,El,ne,js='Set <code>hotswap=True</code> in <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> to swap the second LoRA. Use the <code>adapter_name</code> parameter to indicate which LoRA to swap (<code>default_0</code> is the default name).',Xl,ie,Fl,pe,Ll,oe,gs='For compiled models, use <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.lora_base.LoraBaseMixin.enable_lora_hotswap">enable_lora_hotswap()</a> to avoid recompilation when hotswapping LoRAs. This method should be called <em>before</em> loading the first LoRA and <code>torch.compile</code> should be called <em>after</em> loading the first LoRA.',xl,V,Yl,re,bs='Within <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.lora_base.LoraBaseMixin.enable_lora_hotswap">enable_lora_hotswap()</a>, the <code>target_rank</code> parameter is important for setting the rank for all LoRA adapters. Setting it to <code>max_rank</code> sets it to the highest value. For LoRAs with different ranks, you set it to a higher rank value. The default rank value is 128.',Sl,me,Hl,A,zl,Me,Us='There are still scenarios where recompulation is unavoidable, such as when the hotswapped LoRA targets more layers than the initial adapter. Try to load the LoRA that targets the most layers <em>first</em>. For more details about this limitation, refer to the PEFT <a href="https://huggingface.co/docs/peft/main/en/package_reference/hotswap#peft.utils.hotswap.hotswap_adapter" rel="nofollow">hotswapping</a> docs.',Ql,de,Nl,ue,Zs="The weights from each LoRA can be merged together to produce a blend of multiple existing styles. There are several methods for merging LoRAs, each of which differ in <em>how</em> the weights are merged (may affect generation quality).",Dl,fe,Pl,ce,$s='The <a href="/docs/diffusers/main/en/api/loaders/peft#diffusers.loaders.PeftAdapterMixin.set_adapters">set_adapters()</a> method merges LoRAs by concatenating their weighted matrices. Pass the LoRA names to <a href="/docs/diffusers/main/en/api/loaders/peft#diffusers.loaders.PeftAdapterMixin.set_adapters">set_adapters()</a> and use the <code>adapter_weights</code> parameter to control the scaling of each LoRA. For example, if <code>adapter_weights=[0.5, 0.5]</code>, the output is an average of both LoRAs.',Kl,v,Ol,he,et,C,Is='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/lora_merge_set_adapters.png"/>',lt,we,tt,q,st,Je,_s='The <code>~peft.LoraModel.add_weighted_adapter</code> method enables more efficient merging methods like <a href="https://huggingface.co/papers/2306.01708" rel="nofollow">TIES</a> or <a href="https://huggingface.co/papers/2311.03099" rel="nofollow">DARE</a>. These merging methods remove redundant and potentially interfering parameters from merged models. Keep in mind the LoRA ranks need to have identical ranks to be merged.',at,ye,Ws="Make sure the latest stable version of Diffusers and PEFT is installed.",nt,Te,it,je,Gs="Load a UNET that corresponds to the LoRA UNet.",pt,ge,ot,be,ks="Load a pipeline, pass the UNet to it, and load a LoRA.",rt,Ue,mt,Ze,Bs="Create a <code>~peft.PeftModel</code> from the LoRA checkpoint by combining the first UNet you loaded and the LoRA UNet from the pipeline.",Mt,$e,dt,E,ut,Ie,Rs="Repeat this process and create a <code>~peft.PeftModel</code> for the second LoRA.",ft,_e,ct,We,Vs="Load a base UNet model and load the adapters.",ht,Ge,wt,ke,As='Merge the LoRAs with <code>~peft.LoraModel.add_weighted_adapter</code> and specify how you want to merge them with <code>combination_type</code>. The example below uses the <code>&quot;dare_linear&quot;</code> method (refer to this <a href="https://huggingface.co/blog/peft_merging" rel="nofollow">blog post</a> to learn more about these merging methods), which randomly prunes some weights and then performs a weighted sum of the tensors based on the set weightage of each LoRA in <code>weights</code>.',Jt,Be,vs='Activate the merged LoRAs with <a href="/docs/diffusers/main/en/api/loaders/peft#diffusers.loaders.PeftAdapterMixin.set_adapters">set_adapters()</a>.',yt,Re,Tt,X,Cs='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/ikea-feng-dare-linear.png"/>',jt,Ve,gt,Ae,qs='The <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora">fuse_lora()</a> method fuses the LoRA weights directly with the original UNet and text encoder weights of the underlying model. This reduces the overhead of loading the underlying model for each LoRA because it only loads the model once, which lowers memory usage and increases inference speed.',bt,ve,Ut,Ce,Es='Call <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora">fuse_lora()</a> to fuse them. The <code>lora_scale</code> parameter controls how much to scale the output by with the LoRA weights. It is important to make this adjustment now because passing <code>scale</code> to <code>cross_attention_kwargs</code> won’t work in the pipeline.',Zt,qe,$t,Ee,Xs='Unload the LoRA weights since they’re already fused with the underlying model. Save the fused pipeline with either <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline.save_pretrained">save_pretrained()</a> to save it locally or <code>~PushToHubMixin.push_to_hub</code> to save it to the Hub.',It,F,_t,Xe,Fs="The fused pipeline can now be quickly loaded for inference without requiring each LoRA to be separately loaded.",Wt,Fe,Gt,Le,Ls="Use <code>unfuse_lora()</code> to restore the underlying models weights, for example, if you want to use a different <code>lora_scale</code> value. You can only unfuse if there is a single LoRA fused. For example, it won’t work with the pipeline from above because there are multiple fused LoRAs. In these cases, you’ll need to reload the entire model.",kt,xe,Bt,L,xs='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/fuse_lora.png"/>',Rt,Ye,Vt,Se,Ys="Diffusers provides several methods to help you manage working with LoRAs. These methods can be especially useful if you’re working with multiple LoRAs.",At,He,vt,ze,Ss='<a href="/docs/diffusers/main/en/api/loaders/peft#diffusers.loaders.PeftAdapterMixin.set_adapters">set_adapters()</a> also activates the current LoRA to use if there are multiple active LoRAs. This allows you to switch between different LoRAs by specifying their name.',Ct,Qe,qt,Ne,Et,De,Hs='Save an adapter with <a href="/docs/diffusers/main/en/api/loaders/peft#diffusers.loaders.PeftAdapterMixin.save_lora_adapter">save_lora_adapter()</a>.',Xt,Pe,Ft,Ke,Lt,Oe,zs='The <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.lora_base.LoraBaseMixin.unload_lora_weights">unload_lora_weights()</a> method unloads any LoRA weights in the pipeline to restore the underlying model weights.',xt,el,Yt,ll,St,tl,Qs='The <a href="/docs/diffusers/main/en/api/loaders/peft#diffusers.loaders.PeftAdapterMixin.disable_lora">disable_lora()</a> method disables all LoRAs (but they’re still kept on the pipeline) and restores the pipeline to the underlying model weights.',Ht,sl,zt,al,Qt,nl,Ns='The <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.lora_base.LoraBaseMixin.get_active_adapters">get_active_adapters()</a> method returns a list of active LoRAs attached to a pipeline.',Nt,il,Dt,pl,Pt,ol,Ds='The <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.lora_base.LoraBaseMixin.get_list_adapters">get_list_adapters()</a> method returns the active LoRAs for each component in the pipeline.',Kt,rl,Ot,ml,es,Ml,Ps='The <a href="/docs/diffusers/main/en/api/loaders/peft#diffusers.loaders.PeftAdapterMixin.delete_adapters">delete_adapters()</a> method completely removes a LoRA and its layers from a model.',ls,dl,ts,ul,ss,fl,Ks='Browse the <a href="https://lorastudio.co/models" rel="nofollow">LoRA Studio</a> for different LoRAs to use or you can upload your favorite LoRAs from Civitai to the Hub with the Space below.',as,W,Os,ns,cl,ea='You can find additional LoRAs in the <a href="https://huggingface.co/spaces/multimodalart/flux-lora-the-explorer" rel="nofollow">FLUX LoRA the Explorer</a> and <a href="https://huggingface.co/spaces/multimodalart/LoraTheExplorer" rel="nofollow">LoRA the Explorer</a> Spaces.',is,hl,ps,yl,os;return o=new Z({props:{title:"LoRA",local:"lora",headingTag:"h1"}}),k=new ms({props:{id:"usage",options:["text-to-image","text-to-video"],$$slots:{default:[Ta]},$$scope:{ctx:g}}}),z=new b({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZSUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLnVuZXQubG9hZF9sb3JhX2FkYXB0ZXIoJTBBJTIwJTIwJTIwJTIwJTIyamJpbGNrZS1oZiUyRnNkeGwtY2luZW1hdGljLTElMjIlMkMlMEElMjAlMjAlMjAlMjB3ZWlnaHRfbmFtZSUzRCUyMnB5dG9yY2hfbG9yYV93ZWlnaHRzLnNhZmV0ZW5zb3JzJTIyJTJDJTBBJTIwJTIwJTIwJTIwYWRhcHRlcl9uYW1lJTNEJTIyY2luZW1hdGljJTIyJTBBJTIwJTIwJTIwJTIwcHJlZml4JTNEJTIydW5ldCUyMiUwQSklMEElMjMlMjB1c2UlMjBjbm10JTIwaW4lMjB0aGUlMjBwcm9tcHQlMjB0byUyMHRyaWdnZXIlMjB0aGUlMjBMb1JBJTBBcGlwZWxpbmUoJTIyQSUyMGN1dGUlMjBjbm10JTIwZWF0aW5nJTIwYSUyMHNsaWNlJTIwb2YlMjBwaXp6YSUyQyUyMHN0dW5uaW5nJTIwY29sb3IlMjBzY2hlbWUlMkMlMjBtYXN0ZXJwaWVjZSUyQyUyMGlsbHVzdHJhdGlvbiUyMikuaW1hZ2VzJTVCMCU1RA==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image

pipeline = AutoPipelineForText2Image.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.unet.load_lora_adapter(
    <span class="hljs-string">&quot;jbilcke-hf/sdxl-cinematic-1&quot;</span>,
    weight_name=<span class="hljs-string">&quot;pytorch_lora_weights.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;cinematic&quot;</span>
    prefix=<span class="hljs-string">&quot;unet&quot;</span>
)
<span class="hljs-comment"># use cnmt in the prompt to trigger the LoRA</span>
pipeline(<span class="hljs-string">&quot;A cute cnmt eating a slice of pizza, stunning color scheme, masterpiece, illustration&quot;</span>).images[<span class="hljs-number">0</span>]`,wrap:!1}}),Q=new Z({props:{title:"torch.compile",local:"torchcompile",headingTag:"h2"}}),D=new b({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEElMEElMjMlMjBsb2FkJTIwYmFzZSUyMG1vZGVsJTIwYW5kJTIwTG9SQSUwQXBpcGVsaW5lJTIwJTNEJTIwRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnN0YWJpbGl0eWFpJTJGc3RhYmxlLWRpZmZ1c2lvbi14bC1iYXNlLTEuMCUyMiUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSkudG8oJTIyY3VkYSUyMiklMEFwaXBlbGluZS5sb2FkX2xvcmFfd2VpZ2h0cyglMEElMjAlMjAlMjAlMjAlMjJvc3RyaXMlMkZpa2VhLWluc3RydWN0aW9ucy1sb3JhLXNkeGwlMjIlMkMlMEElMjAlMjAlMjAlMjB3ZWlnaHRfbmFtZSUzRCUyMmlrZWFfaW5zdHJ1Y3Rpb25zX3hsX3YxXzUuc2FmZXRlbnNvcnMlMjIlMkMlMEElMjAlMjAlMjAlMjBhZGFwdGVyX25hbWUlM0QlMjJpa2VhJTIyJTBBKSUwQSUwQSUyMyUyMGFjdGl2YXRlJTIwTG9SQSUyMGFuZCUyMHNldCUyMGFkYXB0ZXIlMjB3ZWlnaHQlMEFwaXBlbGluZS5zZXRfYWRhcHRlcnMoJTIyaWtlYSUyMiUyQyUyMGFkYXB0ZXJfd2VpZ2h0cyUzRDAuNyklMEElMEElMjMlMjBmdXNlJTIwTG9SQXMlMjBhbmQlMjB1bmxvYWQlMjB3ZWlnaHRzJTBBcGlwZWxpbmUuZnVzZV9sb3JhKGFkYXB0ZXJfbmFtZXMlM0QlNUIlMjJpa2VhJTIyJTVEJTJDJTIwbG9yYV9zY2FsZSUzRDEuMCklMEFwaXBlbGluZS51bmxvYWRfbG9yYV93ZWlnaHRzKCk=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

<span class="hljs-comment"># load base model and LoRA</span>
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;ostris/ikea-instructions-lora-sdxl&quot;</span>,
    weight_name=<span class="hljs-string">&quot;ikea_instructions_xl_v1_5.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;ikea&quot;</span>
)

<span class="hljs-comment"># activate LoRA and set adapter weight</span>
pipeline.set_adapters(<span class="hljs-string">&quot;ikea&quot;</span>, adapter_weights=<span class="hljs-number">0.7</span>)

<span class="hljs-comment"># fuse LoRAs and unload weights</span>
pipeline.fuse_lora(adapter_names=[<span class="hljs-string">&quot;ikea&quot;</span>], lora_scale=<span class="hljs-number">1.0</span>)
pipeline.unload_lora_weights()`,wrap:!1}}),K=new b({props:{code:"cGlwZWxpbmUudW5ldC50byhtZW1vcnlfZm9ybWF0JTNEdG9yY2guY2hhbm5lbHNfbGFzdCklMEFwaXBlbGluZS51bmV0JTIwJTNEJTIwdG9yY2guY29tcGlsZShwaXBlbGluZS51bmV0JTJDJTIwbW9kZSUzRCUyMnJlZHVjZS1vdmVyaGVhZCUyMiUyQyUyMGZ1bGxncmFwaCUzRFRydWUpJTBBJTBBcGlwZWxpbmUoJTIyQSUyMGJvd2wlMjBvZiUyMHJhbWVuJTIwc2hhcGVkJTIwbGlrZSUyMGElMjBjdXRlJTIwa2F3YWlpJTIwYmVhciUyMikuaW1hZ2VzJTVCMCU1RA==",highlighted:`pipeline.unet.to(memory_format=torch.channels_last)
pipeline.unet = torch.<span class="hljs-built_in">compile</span>(pipeline.unet, mode=<span class="hljs-string">&quot;reduce-overhead&quot;</span>, fullgraph=<span class="hljs-literal">True</span>)

pipeline(<span class="hljs-string">&quot;A bowl of ramen shaped like a cute kawaii bear&quot;</span>).images[<span class="hljs-number">0</span>]`,wrap:!1}}),ee=new Z({props:{title:"Weight scale",local:"weight-scale",headingTag:"h2"}}),B=new ms({props:{id:"weight-scale",options:["simple use case","finer control"],$$slots:{default:[Ua]},$$scope:{ctx:g}}}),te=new Z({props:{title:"Hotswapping",local:"hotswapping",headingTag:"h2"}}),ae=new b({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEElMEElMjMlMjBsb2FkJTIwYmFzZSUyMG1vZGVsJTIwYW5kJTIwTG9SQXMlMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBcGlwZWxpbmUubG9hZF9sb3JhX3dlaWdodHMoJTBBJTIwJTIwJTIwJTIwJTIyb3N0cmlzJTJGaWtlYS1pbnN0cnVjdGlvbnMtbG9yYS1zZHhsJTIyJTJDJTBBJTIwJTIwJTIwJTIwd2VpZ2h0X25hbWUlM0QlMjJpa2VhX2luc3RydWN0aW9uc194bF92MV81LnNhZmV0ZW5zb3JzJTIyJTJDJTBBJTIwJTIwJTIwJTIwYWRhcHRlcl9uYW1lJTNEJTIyaWtlYSUyMiUwQSk=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

<span class="hljs-comment"># load base model and LoRAs</span>
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;ostris/ikea-instructions-lora-sdxl&quot;</span>,
    weight_name=<span class="hljs-string">&quot;ikea_instructions_xl_v1_5.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;ikea&quot;</span>
)`,wrap:!1}}),R=new wl({props:{warning:!0,$$slots:{default:[Za]},$$scope:{ctx:g}}}),ie=new b({props:{code:"cGlwZWxpbmUubG9hZF9sb3JhX3dlaWdodHMoJTBBJTIwJTIwJTIwJTIwJTIybG9yZGppYSUyRmJ5LWZlbmctemlrYWklMjIlMkMlMEElMjAlMjAlMjAlMjBob3Rzd2FwJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMGFkYXB0ZXJfbmFtZSUzRCUyMmlrZWElMjIlMEEp",highlighted:`pipeline.load_lora_weights(
    <span class="hljs-string">&quot;lordjia/by-feng-zikai&quot;</span>,
    hotswap=<span class="hljs-literal">True</span>,
    adapter_name=<span class="hljs-string">&quot;ikea&quot;</span>
)`,wrap:!1}}),pe=new Z({props:{title:"Compiled models",local:"compiled-models",headingTag:"h3"}}),V=new wl({props:{warning:!1,$$slots:{default:[$a]},$$scope:{ctx:g}}}),me=new b({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEElMEElMjMlMjBsb2FkJTIwYmFzZSUyMG1vZGVsJTIwYW5kJTIwTG9SQXMlMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBJTIzJTIwMS4lMjBlbmFibGVfbG9yYV9ob3Rzd2FwJTBBcGlwZWxpbmUuZW5hYmxlX2xvcmFfaG90c3dhcCh0YXJnZXRfcmFuayUzRG1heF9yYW5rKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUwQSUyMCUyMCUyMCUyMCUyMm9zdHJpcyUyRmlrZWEtaW5zdHJ1Y3Rpb25zLWxvcmEtc2R4bCUyMiUyQyUwQSUyMCUyMCUyMCUyMHdlaWdodF9uYW1lJTNEJTIyaWtlYV9pbnN0cnVjdGlvbnNfeGxfdjFfNS5zYWZldGVuc29ycyUyMiUyQyUwQSUyMCUyMCUyMCUyMGFkYXB0ZXJfbmFtZSUzRCUyMmlrZWElMjIlMEEpJTBBJTIzJTIwMi4lMjB0b3JjaC5jb21waWxlJTBBcGlwZWxpbmUudW5ldCUyMCUzRCUyMHRvcmNoLmNvbXBpbGUocGlwZWxpbmUudW5ldCUyQyUyMG1vZGUlM0QlMjJyZWR1Y2Utb3ZlcmhlYWQlMjIlMkMlMjBmdWxsZ3JhcGglM0RUcnVlKSUwQSUwQSUyMyUyMDMuJTIwaG90c3dhcCUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUwQSUyMCUyMCUyMCUyMCUyMmxvcmRqaWElMkZieS1mZW5nLXppa2FpJTIyJTJDJTBBJTIwJTIwJTIwJTIwaG90c3dhcCUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjBhZGFwdGVyX25hbWUlM0QlMjJpa2VhJTIyJTBBKQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

<span class="hljs-comment"># load base model and LoRAs</span>
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>)
<span class="hljs-comment"># 1. enable_lora_hotswap</span>
pipeline.enable_lora_hotswap(target_rank=max_rank)
pipeline.load_lora_weights(
    <span class="hljs-string">&quot;ostris/ikea-instructions-lora-sdxl&quot;</span>,
    weight_name=<span class="hljs-string">&quot;ikea_instructions_xl_v1_5.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;ikea&quot;</span>
)
<span class="hljs-comment"># 2. torch.compile</span>
pipeline.unet = torch.<span class="hljs-built_in">compile</span>(pipeline.unet, mode=<span class="hljs-string">&quot;reduce-overhead&quot;</span>, fullgraph=<span class="hljs-literal">True</span>)

<span class="hljs-comment"># 3. hotswap</span>
pipeline.load_lora_weights(
    <span class="hljs-string">&quot;lordjia/by-feng-zikai&quot;</span>,
    hotswap=<span class="hljs-literal">True</span>,
    adapter_name=<span class="hljs-string">&quot;ikea&quot;</span>
)`,wrap:!1}}),A=new wl({props:{warning:!1,$$slots:{default:[Ia]},$$scope:{ctx:g}}}),de=new Z({props:{title:"Merge",local:"merge",headingTag:"h2"}}),fe=new Z({props:{title:"set_adapters",local:"setadapters",headingTag:"h3"}}),v=new wl({props:{warning:!1,$$slots:{default:[_a]},$$scope:{ctx:g}}}),he=new b({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBcGlwZWxpbmUubG9hZF9sb3JhX3dlaWdodHMoJTBBJTIwJTIwJTIwJTIwJTIyb3N0cmlzJTJGaWtlYS1pbnN0cnVjdGlvbnMtbG9yYS1zZHhsJTIyJTJDJTBBJTIwJTIwJTIwJTIwd2VpZ2h0X25hbWUlM0QlMjJpa2VhX2luc3RydWN0aW9uc194bF92MV81LnNhZmV0ZW5zb3JzJTIyJTJDJTBBJTIwJTIwJTIwJTIwYWRhcHRlcl9uYW1lJTNEJTIyaWtlYSUyMiUwQSklMEFwaXBlbGluZS5sb2FkX2xvcmFfd2VpZ2h0cyglMEElMjAlMjAlMjAlMjAlMjJsb3JkamlhJTJGYnktZmVuZy16aWthaSUyMiUyQyUwQSUyMCUyMCUyMCUyMHdlaWdodF9uYW1lJTNEJTIyZmVuZ3ppa2FpX3YxLjBfWEwuc2FmZXRlbnNvcnMlMjIlMkMlMEElMjAlMjAlMjAlMjBhZGFwdGVyX25hbWUlM0QlMjJmZW5nJTIyJTBBKSUwQXBpcGVsaW5lLnNldF9hZGFwdGVycyglNUIlMjJpa2VhJTIyJTJDJTIwJTIyZmVuZyUyMiU1RCUyQyUyMGFkYXB0ZXJfd2VpZ2h0cyUzRCU1QjAuNyUyQyUyMDAuOCU1RCklMEElMjMlMjB1c2UlMjBieSUyMEZlbmclMjBaaWthaSUyMHRvJTIwYWN0aXZhdGUlMjB0aGUlMjBsb3JkamlhJTJGYnktZmVuZy16aWthaSUyMExvUkElMEFwaXBlbGluZSglMjJBJTIwYm93bCUyMG9mJTIwcmFtZW4lMjBzaGFwZWQlMjBsaWtlJTIwYSUyMGN1dGUlMjBrYXdhaWklMjBiZWFyJTJDJTIwYnklMjBGZW5nJTIwWmlrYWklMjIlMkMlMjBjcm9zc19hdHRlbnRpb25fa3dhcmdzJTNEJTdCJTIyc2NhbGUlMjIlM0ElMjAxLjAlN0QpLmltYWdlcyU1QjAlNUQ=",highlighted:`<span class="hljs-keyword">import</span> torch
<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>,
    torch_dtype=torch.float16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline.load_lora_weights(
    <span class="hljs-string">&quot;ostris/ikea-instructions-lora-sdxl&quot;</span>,
    weight_name=<span class="hljs-string">&quot;ikea_instructions_xl_v1_5.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;ikea&quot;</span>
)
pipeline.load_lora_weights(
    <span class="hljs-string">&quot;lordjia/by-feng-zikai&quot;</span>,
    weight_name=<span class="hljs-string">&quot;fengzikai_v1.0_XL.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;feng&quot;</span>
)
pipeline.set_adapters([<span class="hljs-string">&quot;ikea&quot;</span>, <span class="hljs-string">&quot;feng&quot;</span>], adapter_weights=[<span class="hljs-number">0.7</span>, <span class="hljs-number">0.8</span>])
<span class="hljs-comment"># use by Feng Zikai to activate the lordjia/by-feng-zikai LoRA</span>
pipeline(<span class="hljs-string">&quot;A bowl of ramen shaped like a cute kawaii bear, by Feng Zikai&quot;</span>, cross_attention_kwargs={<span class="hljs-string">&quot;scale&quot;</span>: <span class="hljs-number">1.0</span>}).images[<span class="hljs-number">0</span>]`,wrap:!1}}),we=new Z({props:{title:"add_weighted_adapter",local:"addweightedadapter",headingTag:"h3"}}),q=new wl({props:{warning:!1,$$slots:{default:[Wa]},$$scope:{ctx:g}}}),Te=new b({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1VJTIwLXElMjBkaWZmdXNlcnMlMjBwZWZ0",highlighted:"pip install -U -q diffusers peft",wrap:!1}}),ge=new b({props:{code:"aW1wb3J0JTIwY29weSUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9Nb2RlbCUyQyUyMERpZmZ1c2lvblBpcGVsaW5lJTBBZnJvbSUyMHBlZnQlMjBpbXBvcnQlMjBnZXRfcGVmdF9tb2RlbCUyQyUyMExvcmFDb25maWclMkMlMjBQZWZ0TW9kZWwlMEElMEF1bmV0JTIwJTNEJTIwQXV0b01vZGVsLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEElMjAlMjAlMjAlMjB1c2Vfc2FmZXRlbnNvcnMlM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIlMkMlMEElMjAlMjAlMjAlMjBzdWJmb2xkZXIlM0QlMjJ1bmV0JTIyJTJDJTBBKS50byglMjJjdWRhJTIyKQ==",highlighted:`<span class="hljs-keyword">import</span> copy
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoModel, DiffusionPipeline
<span class="hljs-keyword">from</span> peft <span class="hljs-keyword">import</span> get_peft_model, LoraConfig, PeftModel

unet = AutoModel.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>,
    torch_dtype=torch.float16,
    use_safetensors=<span class="hljs-literal">True</span>,
    variant=<span class="hljs-string">&quot;fp16&quot;</span>,
    subfolder=<span class="hljs-string">&quot;unet&quot;</span>,
).to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),Ue=new b({props:{code:"cGlwZWxpbmUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTBBJTIwJTIwJTIwJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEElMjAlMjAlMjAlMjB1bmV0JTNEdW5ldCUwQSkudG8oJTIyY3VkYSUyMiklMEFwaXBlbGluZS5sb2FkX2xvcmFfd2VpZ2h0cyglMEElMjAlMjAlMjAlMjAlMjJvc3RyaXMlMkZpa2VhLWluc3RydWN0aW9ucy1sb3JhLXNkeGwlMjIlMkMlMEElMjAlMjAlMjAlMjB3ZWlnaHRfbmFtZSUzRCUyMmlrZWFfaW5zdHJ1Y3Rpb25zX3hsX3YxXzUuc2FmZXRlbnNvcnMlMjIlMkMlMEElMjAlMjAlMjAlMjBhZGFwdGVyX25hbWUlM0QlMjJpa2VhJTIyJTBBKQ==",highlighted:`pipeline = DiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>,
    variant=<span class="hljs-string">&quot;fp16&quot;</span>,
    torch_dtype=torch.float16,
    unet=unet
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline.load_lora_weights(
    <span class="hljs-string">&quot;ostris/ikea-instructions-lora-sdxl&quot;</span>,
    weight_name=<span class="hljs-string">&quot;ikea_instructions_xl_v1_5.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;ikea&quot;</span>
)`,wrap:!1}}),$e=new b({props:{code:"c2R4bF91bmV0JTIwJTNEJTIwY29weS5kZWVwY29weSh1bmV0KSUwQWlrZWFfcGVmdF9tb2RlbCUyMCUzRCUyMGdldF9wZWZ0X21vZGVsKCUwQSUyMCUyMCUyMCUyMHNkeGxfdW5ldCUyQyUwQSUyMCUyMCUyMCUyMHBpcGVsaW5lLnVuZXQucGVmdF9jb25maWclNUIlMjJpa2VhJTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwYWRhcHRlcl9uYW1lJTNEJTIyaWtlYSUyMiUwQSklMEElMEFvcmlnaW5hbF9zdGF0ZV9kaWN0JTIwJTNEJTIwJTdCZiUyMmJhc2VfbW9kZWwubW9kZWwuJTdCayU3RCUyMiUzQSUyMHYlMjBmb3IlMjBrJTJDJTIwdiUyMGluJTIwcGlwZWxpbmUudW5ldC5zdGF0ZV9kaWN0KCkuaXRlbXMoKSU3RCUwQWlrZWFfcGVmdF9tb2RlbC5sb2FkX3N0YXRlX2RpY3Qob3JpZ2luYWxfc3RhdGVfZGljdCUyQyUyMHN0cmljdCUzRFRydWUp",highlighted:`sdxl_unet = copy.deepcopy(unet)
ikea_peft_model = get_peft_model(
    sdxl_unet,
    pipeline.unet.peft_config[<span class="hljs-string">&quot;ikea&quot;</span>],
    adapter_name=<span class="hljs-string">&quot;ikea&quot;</span>
)

original_state_dict = {<span class="hljs-string">f&quot;base_model.model.<span class="hljs-subst">{k}</span>&quot;</span>: v <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> pipeline.unet.state_dict().items()}
ikea_peft_model.load_state_dict(original_state_dict, strict=<span class="hljs-literal">True</span>)`,wrap:!1}}),E=new wl({props:{warning:!1,$$slots:{default:[Ga]},$$scope:{ctx:g}}}),_e=new b({props:{code:"cGlwZWxpbmUuZGVsZXRlX2FkYXB0ZXJzKCUyMmlrZWElMjIpJTBBc2R4bF91bmV0LmRlbGV0ZV9hZGFwdGVycyglMjJpa2VhJTIyKSUwQSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUwQSUyMCUyMCUyMCUyMCUyMmxvcmRqaWElMkZieS1mZW5nLXppa2FpJTIyJTJDJTBBJTIwJTIwJTIwJTIwd2VpZ2h0X25hbWUlM0QlMjJmZW5nemlrYWlfdjEuMF9YTC5zYWZldGVuc29ycyUyMiUyQyUwQSUyMCUyMCUyMCUyMGFkYXB0ZXJfbmFtZSUzRCUyMmZlbmclMjIlMEEpJTBBcGlwZWxpbmUuc2V0X2FkYXB0ZXJzKGFkYXB0ZXJfbmFtZXMlM0QlMjJmZW5nJTIyKSUwQSUwQWZlbmdfcGVmdF9tb2RlbCUyMCUzRCUyMGdldF9wZWZ0X21vZGVsKCUwQSUyMCUyMCUyMCUyMHNkeGxfdW5ldCUyQyUwQSUyMCUyMCUyMCUyMHBpcGVsaW5lLnVuZXQucGVmdF9jb25maWclNUIlMjJmZW5nJTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwYWRhcHRlcl9uYW1lJTNEJTIyZmVuZyUyMiUwQSklMEElMEFvcmlnaW5hbF9zdGF0ZV9kaWN0JTIwJTNEJTIwJTdCZiUyMmJhc2VfbW9kZWwubW9kZWwuJTdCayU3RCUyMiUzQSUyMHYlMjBmb3IlMjBrJTJDJTIwdiUyMGluJTIwcGlwZS51bmV0LnN0YXRlX2RpY3QoKS5pdGVtcygpJTdEJTBBZmVuZ19wZWZ0X21vZGVsLmxvYWRfc3RhdGVfZGljdChvcmlnaW5hbF9zdGF0ZV9kaWN0JTJDJTIwc3RyaWN0JTNEVHJ1ZSk=",highlighted:`pipeline.delete_adapters(<span class="hljs-string">&quot;ikea&quot;</span>)
sdxl_unet.delete_adapters(<span class="hljs-string">&quot;ikea&quot;</span>)

pipeline.load_lora_weights(
    <span class="hljs-string">&quot;lordjia/by-feng-zikai&quot;</span>,
    weight_name=<span class="hljs-string">&quot;fengzikai_v1.0_XL.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;feng&quot;</span>
)
pipeline.set_adapters(adapter_names=<span class="hljs-string">&quot;feng&quot;</span>)

feng_peft_model = get_peft_model(
    sdxl_unet,
    pipeline.unet.peft_config[<span class="hljs-string">&quot;feng&quot;</span>],
    adapter_name=<span class="hljs-string">&quot;feng&quot;</span>
)

original_state_dict = {<span class="hljs-string">f&quot;base_model.model.<span class="hljs-subst">{k}</span>&quot;</span>: v <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> pipe.unet.state_dict().items()}
feng_peft_model.load_state_dict(original_state_dict, strict=<span class="hljs-literal">True</span>)`,wrap:!1}}),Ge=new b({props:{code:"YmFzZV91bmV0JTIwJTNEJTIwQXV0b01vZGVsLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEElMjAlMjAlMjAlMjB1c2Vfc2FmZXRlbnNvcnMlM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIlMkMlMEElMjAlMjAlMjAlMjBzdWJmb2xkZXIlM0QlMjJ1bmV0JTIyJTJDJTBBKS50byglMjJjdWRhJTIyKSUwQSUwQW1vZGVsJTIwJTNEJTIwUGVmdE1vZGVsLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjBiYXNlX3VuZXQlMkMlMEElMjAlMjAlMjAlMjAlMjJzdGV2aGxpdSUyRmlrZWFfcGVmdF9tb2RlbCUyMiUyQyUwQSUyMCUyMCUyMCUyMHVzZV9zYWZldGVuc29ycyUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjBzdWJmb2xkZXIlM0QlMjJpa2VhJTIyJTJDJTBBJTIwJTIwJTIwJTIwYWRhcHRlcl9uYW1lJTNEJTIyaWtlYSUyMiUwQSklMEFtb2RlbC5sb2FkX2FkYXB0ZXIoJTBBJTIwJTIwJTIwJTIwJTIyc3RldmhsaXUlMkZmZW5nX3BlZnRfbW9kZWwlMjIlMkMlMEElMjAlMjAlMjAlMjB1c2Vfc2FmZXRlbnNvcnMlM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwc3ViZm9sZGVyJTNEJTIyZmVuZyUyMiUyQyUwQSUyMCUyMCUyMCUyMGFkYXB0ZXJfbmFtZSUzRCUyMmZlbmclMjIlMEEp",highlighted:`base_unet = AutoModel.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>,
    torch_dtype=torch.float16,
    use_safetensors=<span class="hljs-literal">True</span>,
    variant=<span class="hljs-string">&quot;fp16&quot;</span>,
    subfolder=<span class="hljs-string">&quot;unet&quot;</span>,
).to(<span class="hljs-string">&quot;cuda&quot;</span>)

model = PeftModel.from_pretrained(
    base_unet,
    <span class="hljs-string">&quot;stevhliu/ikea_peft_model&quot;</span>,
    use_safetensors=<span class="hljs-literal">True</span>,
    subfolder=<span class="hljs-string">&quot;ikea&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;ikea&quot;</span>
)
model.load_adapter(
    <span class="hljs-string">&quot;stevhliu/feng_peft_model&quot;</span>,
    use_safetensors=<span class="hljs-literal">True</span>,
    subfolder=<span class="hljs-string">&quot;feng&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;feng&quot;</span>
)`,wrap:!1}}),Re=new b({props:{code:"bW9kZWwuYWRkX3dlaWdodGVkX2FkYXB0ZXIoJTBBJTIwJTIwJTIwJTIwYWRhcHRlcnMlM0QlNUIlMjJpa2VhJTIyJTJDJTIwJTIyZmVuZyUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMGNvbWJpbmF0aW9uX3R5cGUlM0QlMjJkYXJlX2xpbmVhciUyMiUyQyUwQSUyMCUyMCUyMCUyMHdlaWdodHMlM0QlNUIxLjAlMkMlMjAxLjAlNUQlMkMlMEElMjAlMjAlMjAlMjBhZGFwdGVyX25hbWUlM0QlMjJpa2VhLWZlbmclMjIlMEEpJTBBbW9kZWwuc2V0X2FkYXB0ZXJzKCUyMmlrZWEtZmVuZyUyMiklMEElMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMkMlMEElMjAlMjAlMjAlMjB1bmV0JTNEbW9kZWwlMkMlMEElMjAlMjAlMjAlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUwQSkudG8oJTIyY3VkYSUyMiklMEFwaXBlbGluZSglMjJBJTIwYm93bCUyMG9mJTIwcmFtZW4lMjBzaGFwZWQlMjBsaWtlJTIwYSUyMGN1dGUlMjBrYXdhaWklMjBiZWFyJTJDJTIwYnklMjBGZW5nJTIwWmlrYWklMjIpLmltYWdlcyU1QjAlNUQ=",highlighted:`model.add_weighted_adapter(
    adapters=[<span class="hljs-string">&quot;ikea&quot;</span>, <span class="hljs-string">&quot;feng&quot;</span>],
    combination_type=<span class="hljs-string">&quot;dare_linear&quot;</span>,
    weights=[<span class="hljs-number">1.0</span>, <span class="hljs-number">1.0</span>],
    adapter_name=<span class="hljs-string">&quot;ikea-feng&quot;</span>
)
model.set_adapters(<span class="hljs-string">&quot;ikea-feng&quot;</span>)

pipeline = DiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>,
    unet=model,
    variant=<span class="hljs-string">&quot;fp16&quot;</span>,
    torch_dtype=torch.float16,
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline(<span class="hljs-string">&quot;A bowl of ramen shaped like a cute kawaii bear, by Feng Zikai&quot;</span>).images[<span class="hljs-number">0</span>]`,wrap:!1}}),Ve=new Z({props:{title:"fuse_lora",local:"fuselora",headingTag:"h3"}}),ve=new b({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBcGlwZWxpbmUubG9hZF9sb3JhX3dlaWdodHMoJTBBJTIwJTIwJTIwJTIwJTIyb3N0cmlzJTJGaWtlYS1pbnN0cnVjdGlvbnMtbG9yYS1zZHhsJTIyJTJDJTBBJTIwJTIwJTIwJTIwd2VpZ2h0X25hbWUlM0QlMjJpa2VhX2luc3RydWN0aW9uc194bF92MV81LnNhZmV0ZW5zb3JzJTIyJTJDJTBBJTIwJTIwJTIwJTIwYWRhcHRlcl9uYW1lJTNEJTIyaWtlYSUyMiUwQSklMEFwaXBlbGluZS5sb2FkX2xvcmFfd2VpZ2h0cyglMEElMjAlMjAlMjAlMjAlMjJsb3JkamlhJTJGYnktZmVuZy16aWthaSUyMiUyQyUwQSUyMCUyMCUyMCUyMHdlaWdodF9uYW1lJTNEJTIyZmVuZ3ppa2FpX3YxLjBfWEwuc2FmZXRlbnNvcnMlMjIlMkMlMEElMjAlMjAlMjAlMjBhZGFwdGVyX25hbWUlM0QlMjJmZW5nJTIyJTBBKSUwQXBpcGVsaW5lLnNldF9hZGFwdGVycyglNUIlMjJpa2VhJTIyJTJDJTIwJTIyZmVuZyUyMiU1RCUyQyUyMGFkYXB0ZXJfd2VpZ2h0cyUzRCU1QjAuNyUyQyUyMDAuOCU1RCk=",highlighted:`<span class="hljs-keyword">import</span> torch
<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>,
    torch_dtype=torch.float16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline.load_lora_weights(
    <span class="hljs-string">&quot;ostris/ikea-instructions-lora-sdxl&quot;</span>,
    weight_name=<span class="hljs-string">&quot;ikea_instructions_xl_v1_5.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;ikea&quot;</span>
)
pipeline.load_lora_weights(
    <span class="hljs-string">&quot;lordjia/by-feng-zikai&quot;</span>,
    weight_name=<span class="hljs-string">&quot;fengzikai_v1.0_XL.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;feng&quot;</span>
)
pipeline.set_adapters([<span class="hljs-string">&quot;ikea&quot;</span>, <span class="hljs-string">&quot;feng&quot;</span>], adapter_weights=[<span class="hljs-number">0.7</span>, <span class="hljs-number">0.8</span>])`,wrap:!1}}),qe=new b({props:{code:"cGlwZWxpbmUuZnVzZV9sb3JhKGFkYXB0ZXJfbmFtZXMlM0QlNUIlMjJpa2VhJTIyJTJDJTIwJTIyZmVuZyUyMiU1RCUyQyUyMGxvcmFfc2NhbGUlM0QxLjAp",highlighted:'pipeline.fuse_lora(adapter_names=[<span class="hljs-string">&quot;ikea&quot;</span>, <span class="hljs-string">&quot;feng&quot;</span>], lora_scale=<span class="hljs-number">1.0</span>)',wrap:!1}}),F=new ms({props:{id:"save",options:["save locally","save to Hub"],$$slots:{default:[Ra]},$$scope:{ctx:g}}}),Fe=new b({props:{code:"cGlwZWxpbmUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIydXNlcm5hbWUlMkZmdXNlZC1pa2VhLWZlbmclMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEEpLnRvKCUyMmN1ZGElMjIpJTBBcGlwZWxpbmUoJTIyQSUyMGJvd2wlMjBvZiUyMHJhbWVuJTIwc2hhcGVkJTIwbGlrZSUyMGElMjBjdXRlJTIwa2F3YWlpJTIwYmVhciUyQyUyMGJ5JTIwRmVuZyUyMFppa2FpJTIyKS5pbWFnZXMlNUIwJTVE",highlighted:`pipeline = DiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;username/fused-ikea-feng&quot;</span>, torch_dtype=torch.float16,
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline(<span class="hljs-string">&quot;A bowl of ramen shaped like a cute kawaii bear, by Feng Zikai&quot;</span>).images[<span class="hljs-number">0</span>]`,wrap:!1}}),xe=new b({props:{code:"cGlwZWxpbmUudW5mdXNlX2xvcmEoKQ==",highlighted:"pipeline.unfuse_lora()",wrap:!1}}),Ye=new Z({props:{title:"Manage",local:"manage",headingTag:"h2"}}),He=new Z({props:{title:"set_adapters",local:"setadapters",headingTag:"h3"}}),Qe=new b({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBcGlwZWxpbmUubG9hZF9sb3JhX3dlaWdodHMoJTBBJTIwJTIwJTIwJTIwJTIyb3N0cmlzJTJGaWtlYS1pbnN0cnVjdGlvbnMtbG9yYS1zZHhsJTIyJTJDJTBBJTIwJTIwJTIwJTIwd2VpZ2h0X25hbWUlM0QlMjJpa2VhX2luc3RydWN0aW9uc194bF92MV81LnNhZmV0ZW5zb3JzJTIyJTJDJTBBJTIwJTIwJTIwJTIwYWRhcHRlcl9uYW1lJTNEJTIyaWtlYSUyMiUwQSklMEFwaXBlbGluZS5sb2FkX2xvcmFfd2VpZ2h0cyglMEElMjAlMjAlMjAlMjAlMjJsb3JkamlhJTJGYnktZmVuZy16aWthaSUyMiUyQyUwQSUyMCUyMCUyMCUyMHdlaWdodF9uYW1lJTNEJTIyZmVuZ3ppa2FpX3YxLjBfWEwuc2FmZXRlbnNvcnMlMjIlMkMlMEElMjAlMjAlMjAlMjBhZGFwdGVyX25hbWUlM0QlMjJmZW5nJTIyJTBBKSUwQSUyMyUyMGFjdGl2YXRlcyUyMHRoZSUyMGZlbmclMjBMb1JBJTIwaW5zdGVhZCUyMG9mJTIwdGhlJTIwaWtlYSUyMExvUkElMEFwaXBlbGluZS5zZXRfYWRhcHRlcnMoJTIyZmVuZyUyMik=",highlighted:`<span class="hljs-keyword">import</span> torch
<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>,
    torch_dtype=torch.float16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline.load_lora_weights(
    <span class="hljs-string">&quot;ostris/ikea-instructions-lora-sdxl&quot;</span>,
    weight_name=<span class="hljs-string">&quot;ikea_instructions_xl_v1_5.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;ikea&quot;</span>
)
pipeline.load_lora_weights(
    <span class="hljs-string">&quot;lordjia/by-feng-zikai&quot;</span>,
    weight_name=<span class="hljs-string">&quot;fengzikai_v1.0_XL.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;feng&quot;</span>
)
<span class="hljs-comment"># activates the feng LoRA instead of the ikea LoRA</span>
pipeline.set_adapters(<span class="hljs-string">&quot;feng&quot;</span>)`,wrap:!1}}),Ne=new Z({props:{title:"save_lora_adapter",local:"saveloraadapter",headingTag:"h3"}}),Pe=new b({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZSUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLnVuZXQubG9hZF9sb3JhX2FkYXB0ZXIoJTBBJTIwJTIwJTIwJTIwJTIyamJpbGNrZS1oZiUyRnNkeGwtY2luZW1hdGljLTElMjIlMkMlMEElMjAlMjAlMjAlMjB3ZWlnaHRfbmFtZSUzRCUyMnB5dG9yY2hfbG9yYV93ZWlnaHRzLnNhZmV0ZW5zb3JzJTIyJTJDJTBBJTIwJTIwJTIwJTIwYWRhcHRlcl9uYW1lJTNEJTIyY2luZW1hdGljJTIyJTBBJTIwJTIwJTIwJTIwcHJlZml4JTNEJTIydW5ldCUyMiUwQSklMEFwaXBlbGluZS5zYXZlX2xvcmFfYWRhcHRlciglMjJwYXRoJTJGdG8lMkZzYXZlJTIyJTJDJTIwYWRhcHRlcl9uYW1lJTNEJTIyY2luZW1hdGljJTIyKQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image

pipeline = AutoPipelineForText2Image.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.unet.load_lora_adapter(
    <span class="hljs-string">&quot;jbilcke-hf/sdxl-cinematic-1&quot;</span>,
    weight_name=<span class="hljs-string">&quot;pytorch_lora_weights.safetensors&quot;</span>,
    adapter_name=<span class="hljs-string">&quot;cinematic&quot;</span>
    prefix=<span class="hljs-string">&quot;unet&quot;</span>
)
pipeline.save_lora_adapter(<span class="hljs-string">&quot;path/to/save&quot;</span>, adapter_name=<span class="hljs-string">&quot;cinematic&quot;</span>)`,wrap:!1}}),Ke=new Z({props:{title:"unload_lora_weights",local:"unloadloraweights",headingTag:"h3"}}),el=new b({props:{code:"cGlwZWxpbmUudW5sb2FkX2xvcmFfd2VpZ2h0cygp",highlighted:"pipeline.unload_lora_weights()",wrap:!1}}),ll=new Z({props:{title:"disable_lora",local:"disablelora",headingTag:"h3"}}),sl=new b({props:{code:"cGlwZWxpbmUuZGlzYWJsZV9sb3JhKCk=",highlighted:"pipeline.disable_lora()",wrap:!1}}),al=new Z({props:{title:"get_active_adapters",local:"getactiveadapters",headingTag:"h3"}}),il=new b({props:{code:"cGlwZWxpbmUuZ2V0X2FjdGl2ZV9hZGFwdGVycygpJTBBJTVCJTIyY2VyZWFsJTIyJTJDJTIwJTIyaWtlYSUyMiU1RA==",highlighted:`pipeline.get_active_adapters()
[<span class="hljs-string">&quot;cereal&quot;</span>, <span class="hljs-string">&quot;ikea&quot;</span>]`,wrap:!1}}),pl=new Z({props:{title:"get_list_adapters",local:"getlistadapters",headingTag:"h3"}}),rl=new b({props:{code:"cGlwZWxpbmUuZ2V0X2xpc3RfYWRhcHRlcnMoKSUwQSU3QiUyMnVuZXQlMjIlM0ElMjAlNUIlMjJjZXJlYWwlMjIlMkMlMjAlMjJpa2VhJTIyJTVEJTJDJTIwJTIydGV4dF9lbmNvZGVyXzIlMjIlM0ElMjAlNUIlMjJjZXJlYWwlMjIlNUQlN0Q=",highlighted:`pipeline.get_list_adapters()
{<span class="hljs-string">&quot;unet&quot;</span>: [<span class="hljs-string">&quot;cereal&quot;</span>, <span class="hljs-string">&quot;ikea&quot;</span>], <span class="hljs-string">&quot;text_encoder_2&quot;</span>: [<span class="hljs-string">&quot;cereal&quot;</span>]}`,wrap:!1}}),ml=new Z({props:{title:"delete_adapters",local:"deleteadapters",headingTag:"h3"}}),dl=new b({props:{code:"cGlwZWxpbmUuZGVsZXRlX2FkYXB0ZXJzKCUyMmlrZWElMjIp",highlighted:'pipeline.delete_adapters(<span class="hljs-string">&quot;ikea&quot;</span>)',wrap:!1}}),ul=new Z({props:{title:"Resources",local:"resources",headingTag:"h2"}}),hl=new wa({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/tutorials/using_peft_for_inference.md"}}),{c(){a=J("meta"),m=i(),n=J("p"),w=i(),M(o.$$.fragment),r=i(),U=J("p"),U.innerHTML=j,$=i(),_=J("p"),_.innerHTML=Ms,Tl=i(),M(k.$$.fragment),jl=i(),x=J("p"),x.innerHTML=ds,gl=i(),Y=J("ul"),Y.innerHTML=us,bl=i(),S=J("p"),S.innerHTML=fs,Ul=i(),H=J("p"),H.innerHTML=cs,Zl=i(),M(z.$$.fragment),$l=i(),M(Q.$$.fragment),Il=i(),N=J("p"),N.innerHTML=hs,_l=i(),M(D.$$.fragment),Wl=i(),P=J("p"),P.textContent=ws,Gl=i(),M(K.$$.fragment),kl=i(),O=J("p"),O.innerHTML=Js,Bl=i(),M(ee.$$.fragment),Rl=i(),le=J("p"),le.innerHTML=ys,Vl=i(),M(B.$$.fragment),Al=i(),M(te.$$.fragment),vl=i(),se=J("p"),se.innerHTML=Ts,Cl=i(),M(ae.$$.fragment),ql=i(),M(R.$$.fragment),El=i(),ne=J("p"),ne.innerHTML=js,Xl=i(),M(ie.$$.fragment),Fl=i(),M(pe.$$.fragment),Ll=i(),oe=J("p"),oe.innerHTML=gs,xl=i(),M(V.$$.fragment),Yl=i(),re=J("p"),re.innerHTML=bs,Sl=i(),M(me.$$.fragment),Hl=i(),M(A.$$.fragment),zl=i(),Me=J("p"),Me.innerHTML=Us,Ql=i(),M(de.$$.fragment),Nl=i(),ue=J("p"),ue.innerHTML=Zs,Dl=i(),M(fe.$$.fragment),Pl=i(),ce=J("p"),ce.innerHTML=$s,Kl=i(),M(v.$$.fragment),Ol=i(),M(he.$$.fragment),et=i(),C=J("div"),C.innerHTML=Is,lt=i(),M(we.$$.fragment),tt=i(),M(q.$$.fragment),st=i(),Je=J("p"),Je.innerHTML=_s,at=i(),ye=J("p"),ye.textContent=Ws,nt=i(),M(Te.$$.fragment),it=i(),je=J("p"),je.textContent=Gs,pt=i(),M(ge.$$.fragment),ot=i(),be=J("p"),be.textContent=ks,rt=i(),M(Ue.$$.fragment),mt=i(),Ze=J("p"),Ze.innerHTML=Bs,Mt=i(),M($e.$$.fragment),dt=i(),M(E.$$.fragment),ut=i(),Ie=J("p"),Ie.innerHTML=Rs,ft=i(),M(_e.$$.fragment),ct=i(),We=J("p"),We.textContent=Vs,ht=i(),M(Ge.$$.fragment),wt=i(),ke=J("p"),ke.innerHTML=As,Jt=i(),Be=J("p"),Be.innerHTML=vs,yt=i(),M(Re.$$.fragment),Tt=i(),X=J("div"),X.innerHTML=Cs,jt=i(),M(Ve.$$.fragment),gt=i(),Ae=J("p"),Ae.innerHTML=qs,bt=i(),M(ve.$$.fragment),Ut=i(),Ce=J("p"),Ce.innerHTML=Es,Zt=i(),M(qe.$$.fragment),$t=i(),Ee=J("p"),Ee.innerHTML=Xs,It=i(),M(F.$$.fragment),_t=i(),Xe=J("p"),Xe.textContent=Fs,Wt=i(),M(Fe.$$.fragment),Gt=i(),Le=J("p"),Le.innerHTML=Ls,kt=i(),M(xe.$$.fragment),Bt=i(),L=J("div"),L.innerHTML=xs,Rt=i(),M(Ye.$$.fragment),Vt=i(),Se=J("p"),Se.textContent=Ys,At=i(),M(He.$$.fragment),vt=i(),ze=J("p"),ze.innerHTML=Ss,Ct=i(),M(Qe.$$.fragment),qt=i(),M(Ne.$$.fragment),Et=i(),De=J("p"),De.innerHTML=Hs,Xt=i(),M(Pe.$$.fragment),Ft=i(),M(Ke.$$.fragment),Lt=i(),Oe=J("p"),Oe.innerHTML=zs,xt=i(),M(el.$$.fragment),Yt=i(),M(ll.$$.fragment),St=i(),tl=J("p"),tl.innerHTML=Qs,Ht=i(),M(sl.$$.fragment),zt=i(),M(al.$$.fragment),Qt=i(),nl=J("p"),nl.innerHTML=Ns,Nt=i(),M(il.$$.fragment),Dt=i(),M(pl.$$.fragment),Pt=i(),ol=J("p"),ol.innerHTML=Ds,Kt=i(),M(rl.$$.fragment),Ot=i(),M(ml.$$.fragment),es=i(),Ml=J("p"),Ml.innerHTML=Ps,ls=i(),M(dl.$$.fragment),ts=i(),M(ul.$$.fragment),ss=i(),fl=J("p"),fl.innerHTML=Ks,as=i(),W=J("iframe"),ns=i(),cl=J("p"),cl.innerHTML=ea,is=i(),M(hl.$$.fragment),ps=i(),yl=J("p"),this.h()},l(e){const l=ca("svelte-u9bgzb",document.head);a=y(l,"META",{name:!0,content:!0}),l.forEach(t),m=p(e),n=y(e,"P",{}),rs(n).forEach(t),w=p(e),d(o.$$.fragment,e),r=p(e),U=y(e,"P",{"data-svelte-h":!0}),T(U)!=="svelte-1gj8vby"&&(U.innerHTML=j),$=p(e),_=y(e,"P",{"data-svelte-h":!0}),T(_)!=="svelte-kdtvgq"&&(_.innerHTML=Ms),Tl=p(e),d(k.$$.fragment,e),jl=p(e),x=y(e,"P",{"data-svelte-h":!0}),T(x)!=="svelte-1kkl0lk"&&(x.innerHTML=ds),gl=p(e),Y=y(e,"UL",{"data-svelte-h":!0}),T(Y)!=="svelte-1kdz0wg"&&(Y.innerHTML=us),bl=p(e),S=y(e,"P",{"data-svelte-h":!0}),T(S)!=="svelte-1u2w295"&&(S.innerHTML=fs),Ul=p(e),H=y(e,"P",{"data-svelte-h":!0}),T(H)!=="svelte-1ryv6ll"&&(H.innerHTML=cs),Zl=p(e),d(z.$$.fragment,e),$l=p(e),d(Q.$$.fragment,e),Il=p(e),N=y(e,"P",{"data-svelte-h":!0}),T(N)!=="svelte-vdhzfc"&&(N.innerHTML=hs),_l=p(e),d(D.$$.fragment,e),Wl=p(e),P=y(e,"P",{"data-svelte-h":!0}),T(P)!=="svelte-1bxdxvu"&&(P.textContent=ws),Gl=p(e),d(K.$$.fragment,e),kl=p(e),O=y(e,"P",{"data-svelte-h":!0}),T(O)!=="svelte-1con55w"&&(O.innerHTML=Js),Bl=p(e),d(ee.$$.fragment,e),Rl=p(e),le=y(e,"P",{"data-svelte-h":!0}),T(le)!=="svelte-1rhjdt1"&&(le.innerHTML=ys),Vl=p(e),d(B.$$.fragment,e),Al=p(e),d(te.$$.fragment,e),vl=p(e),se=y(e,"P",{"data-svelte-h":!0}),T(se)!=="svelte-uywnza"&&(se.innerHTML=Ts),Cl=p(e),d(ae.$$.fragment,e),ql=p(e),d(R.$$.fragment,e),El=p(e),ne=y(e,"P",{"data-svelte-h":!0}),T(ne)!=="svelte-1ecua0e"&&(ne.innerHTML=js),Xl=p(e),d(ie.$$.fragment,e),Fl=p(e),d(pe.$$.fragment,e),Ll=p(e),oe=y(e,"P",{"data-svelte-h":!0}),T(oe)!=="svelte-110ub4a"&&(oe.innerHTML=gs),xl=p(e),d(V.$$.fragment,e),Yl=p(e),re=y(e,"P",{"data-svelte-h":!0}),T(re)!=="svelte-18chx34"&&(re.innerHTML=bs),Sl=p(e),d(me.$$.fragment,e),Hl=p(e),d(A.$$.fragment,e),zl=p(e),Me=y(e,"P",{"data-svelte-h":!0}),T(Me)!=="svelte-ggb744"&&(Me.innerHTML=Us),Ql=p(e),d(de.$$.fragment,e),Nl=p(e),ue=y(e,"P",{"data-svelte-h":!0}),T(ue)!=="svelte-10rq47h"&&(ue.innerHTML=Zs),Dl=p(e),d(fe.$$.fragment,e),Pl=p(e),ce=y(e,"P",{"data-svelte-h":!0}),T(ce)!=="svelte-1ihzjzr"&&(ce.innerHTML=$s),Kl=p(e),d(v.$$.fragment,e),Ol=p(e),d(he.$$.fragment,e),et=p(e),C=y(e,"DIV",{class:!0,"data-svelte-h":!0}),T(C)!=="svelte-rp1f80"&&(C.innerHTML=Is),lt=p(e),d(we.$$.fragment,e),tt=p(e),d(q.$$.fragment,e),st=p(e),Je=y(e,"P",{"data-svelte-h":!0}),T(Je)!=="svelte-8091mm"&&(Je.innerHTML=_s),at=p(e),ye=y(e,"P",{"data-svelte-h":!0}),T(ye)!=="svelte-1nseei8"&&(ye.textContent=Ws),nt=p(e),d(Te.$$.fragment,e),it=p(e),je=y(e,"P",{"data-svelte-h":!0}),T(je)!=="svelte-bdkl20"&&(je.textContent=Gs),pt=p(e),d(ge.$$.fragment,e),ot=p(e),be=y(e,"P",{"data-svelte-h":!0}),T(be)!=="svelte-9gm80r"&&(be.textContent=ks),rt=p(e),d(Ue.$$.fragment,e),mt=p(e),Ze=y(e,"P",{"data-svelte-h":!0}),T(Ze)!=="svelte-tujdh1"&&(Ze.innerHTML=Bs),Mt=p(e),d($e.$$.fragment,e),dt=p(e),d(E.$$.fragment,e),ut=p(e),Ie=y(e,"P",{"data-svelte-h":!0}),T(Ie)!=="svelte-s05kyc"&&(Ie.innerHTML=Rs),ft=p(e),d(_e.$$.fragment,e),ct=p(e),We=y(e,"P",{"data-svelte-h":!0}),T(We)!=="svelte-4qxxrf"&&(We.textContent=Vs),ht=p(e),d(Ge.$$.fragment,e),wt=p(e),ke=y(e,"P",{"data-svelte-h":!0}),T(ke)!=="svelte-1my1cqt"&&(ke.innerHTML=As),Jt=p(e),Be=y(e,"P",{"data-svelte-h":!0}),T(Be)!=="svelte-1tmnflg"&&(Be.innerHTML=vs),yt=p(e),d(Re.$$.fragment,e),Tt=p(e),X=y(e,"DIV",{class:!0,"data-svelte-h":!0}),T(X)!=="svelte-o7lfk9"&&(X.innerHTML=Cs),jt=p(e),d(Ve.$$.fragment,e),gt=p(e),Ae=y(e,"P",{"data-svelte-h":!0}),T(Ae)!=="svelte-rr1kg"&&(Ae.innerHTML=qs),bt=p(e),d(ve.$$.fragment,e),Ut=p(e),Ce=y(e,"P",{"data-svelte-h":!0}),T(Ce)!=="svelte-hlsd8u"&&(Ce.innerHTML=Es),Zt=p(e),d(qe.$$.fragment,e),$t=p(e),Ee=y(e,"P",{"data-svelte-h":!0}),T(Ee)!=="svelte-tdu9sv"&&(Ee.innerHTML=Xs),It=p(e),d(F.$$.fragment,e),_t=p(e),Xe=y(e,"P",{"data-svelte-h":!0}),T(Xe)!=="svelte-13ek29m"&&(Xe.textContent=Fs),Wt=p(e),d(Fe.$$.fragment,e),Gt=p(e),Le=y(e,"P",{"data-svelte-h":!0}),T(Le)!=="svelte-1kdk8my"&&(Le.innerHTML=Ls),kt=p(e),d(xe.$$.fragment,e),Bt=p(e),L=y(e,"DIV",{class:!0,"data-svelte-h":!0}),T(L)!=="svelte-d7vbup"&&(L.innerHTML=xs),Rt=p(e),d(Ye.$$.fragment,e),Vt=p(e),Se=y(e,"P",{"data-svelte-h":!0}),T(Se)!=="svelte-lfexew"&&(Se.textContent=Ys),At=p(e),d(He.$$.fragment,e),vt=p(e),ze=y(e,"P",{"data-svelte-h":!0}),T(ze)!=="svelte-tmlt47"&&(ze.innerHTML=Ss),Ct=p(e),d(Qe.$$.fragment,e),qt=p(e),d(Ne.$$.fragment,e),Et=p(e),De=y(e,"P",{"data-svelte-h":!0}),T(De)!=="svelte-3etak2"&&(De.innerHTML=Hs),Xt=p(e),d(Pe.$$.fragment,e),Ft=p(e),d(Ke.$$.fragment,e),Lt=p(e),Oe=y(e,"P",{"data-svelte-h":!0}),T(Oe)!=="svelte-1fejyxp"&&(Oe.innerHTML=zs),xt=p(e),d(el.$$.fragment,e),Yt=p(e),d(ll.$$.fragment,e),St=p(e),tl=y(e,"P",{"data-svelte-h":!0}),T(tl)!=="svelte-12mv6li"&&(tl.innerHTML=Qs),Ht=p(e),d(sl.$$.fragment,e),zt=p(e),d(al.$$.fragment,e),Qt=p(e),nl=y(e,"P",{"data-svelte-h":!0}),T(nl)!=="svelte-ojvh3n"&&(nl.innerHTML=Ns),Nt=p(e),d(il.$$.fragment,e),Dt=p(e),d(pl.$$.fragment,e),Pt=p(e),ol=y(e,"P",{"data-svelte-h":!0}),T(ol)!=="svelte-1vo1u23"&&(ol.innerHTML=Ds),Kt=p(e),d(rl.$$.fragment,e),Ot=p(e),d(ml.$$.fragment,e),es=p(e),Ml=y(e,"P",{"data-svelte-h":!0}),T(Ml)!=="svelte-1lvb4fg"&&(Ml.innerHTML=Ps),ls=p(e),d(dl.$$.fragment,e),ts=p(e),d(ul.$$.fragment,e),ss=p(e),fl=y(e,"P",{"data-svelte-h":!0}),T(fl)!=="svelte-rzdugq"&&(fl.innerHTML=Ks),as=p(e),W=y(e,"IFRAME",{src:!0,frameborder:!0,width:!0,height:!0}),rs(W).forEach(t),ns=p(e),cl=y(e,"P",{"data-svelte-h":!0}),T(cl)!=="svelte-1u6fnk7"&&(cl.innerHTML=ea),is=p(e),d(hl.$$.fragment,e),ps=p(e),yl=y(e,"P",{}),rs(yl).forEach(t),this.h()},h(){G(a,"name","hf:doc:metadata"),G(a,"content",Aa),G(C,"class","flex justify-center"),G(X,"class","flex justify-center"),G(L,"class","flex justify-center"),Ma(W.src,Os="https://multimodalart-civitai-to-hf.hf.space")||G(W,"src",Os),G(W,"frameborder","0"),G(W,"width","850"),G(W,"height","450")},m(e,l){ha(document.head,a),s(e,m,l),s(e,n,l),s(e,w,l),u(o,e,l),s(e,r,l),s(e,U,l),s(e,$,l),s(e,_,l),s(e,Tl,l),u(k,e,l),s(e,jl,l),s(e,x,l),s(e,gl,l),s(e,Y,l),s(e,bl,l),s(e,S,l),s(e,Ul,l),s(e,H,l),s(e,Zl,l),u(z,e,l),s(e,$l,l),u(Q,e,l),s(e,Il,l),s(e,N,l),s(e,_l,l),u(D,e,l),s(e,Wl,l),s(e,P,l),s(e,Gl,l),u(K,e,l),s(e,kl,l),s(e,O,l),s(e,Bl,l),u(ee,e,l),s(e,Rl,l),s(e,le,l),s(e,Vl,l),u(B,e,l),s(e,Al,l),u(te,e,l),s(e,vl,l),s(e,se,l),s(e,Cl,l),u(ae,e,l),s(e,ql,l),u(R,e,l),s(e,El,l),s(e,ne,l),s(e,Xl,l),u(ie,e,l),s(e,Fl,l),u(pe,e,l),s(e,Ll,l),s(e,oe,l),s(e,xl,l),u(V,e,l),s(e,Yl,l),s(e,re,l),s(e,Sl,l),u(me,e,l),s(e,Hl,l),u(A,e,l),s(e,zl,l),s(e,Me,l),s(e,Ql,l),u(de,e,l),s(e,Nl,l),s(e,ue,l),s(e,Dl,l),u(fe,e,l),s(e,Pl,l),s(e,ce,l),s(e,Kl,l),u(v,e,l),s(e,Ol,l),u(he,e,l),s(e,et,l),s(e,C,l),s(e,lt,l),u(we,e,l),s(e,tt,l),u(q,e,l),s(e,st,l),s(e,Je,l),s(e,at,l),s(e,ye,l),s(e,nt,l),u(Te,e,l),s(e,it,l),s(e,je,l),s(e,pt,l),u(ge,e,l),s(e,ot,l),s(e,be,l),s(e,rt,l),u(Ue,e,l),s(e,mt,l),s(e,Ze,l),s(e,Mt,l),u($e,e,l),s(e,dt,l),u(E,e,l),s(e,ut,l),s(e,Ie,l),s(e,ft,l),u(_e,e,l),s(e,ct,l),s(e,We,l),s(e,ht,l),u(Ge,e,l),s(e,wt,l),s(e,ke,l),s(e,Jt,l),s(e,Be,l),s(e,yt,l),u(Re,e,l),s(e,Tt,l),s(e,X,l),s(e,jt,l),u(Ve,e,l),s(e,gt,l),s(e,Ae,l),s(e,bt,l),u(ve,e,l),s(e,Ut,l),s(e,Ce,l),s(e,Zt,l),u(qe,e,l),s(e,$t,l),s(e,Ee,l),s(e,It,l),u(F,e,l),s(e,_t,l),s(e,Xe,l),s(e,Wt,l),u(Fe,e,l),s(e,Gt,l),s(e,Le,l),s(e,kt,l),u(xe,e,l),s(e,Bt,l),s(e,L,l),s(e,Rt,l),u(Ye,e,l),s(e,Vt,l),s(e,Se,l),s(e,At,l),u(He,e,l),s(e,vt,l),s(e,ze,l),s(e,Ct,l),u(Qe,e,l),s(e,qt,l),u(Ne,e,l),s(e,Et,l),s(e,De,l),s(e,Xt,l),u(Pe,e,l),s(e,Ft,l),u(Ke,e,l),s(e,Lt,l),s(e,Oe,l),s(e,xt,l),u(el,e,l),s(e,Yt,l),u(ll,e,l),s(e,St,l),s(e,tl,l),s(e,Ht,l),u(sl,e,l),s(e,zt,l),u(al,e,l),s(e,Qt,l),s(e,nl,l),s(e,Nt,l),u(il,e,l),s(e,Dt,l),u(pl,e,l),s(e,Pt,l),s(e,ol,l),s(e,Kt,l),u(rl,e,l),s(e,Ot,l),u(ml,e,l),s(e,es,l),s(e,Ml,l),s(e,ls,l),u(dl,e,l),s(e,ts,l),u(ul,e,l),s(e,ss,l),s(e,fl,l),s(e,as,l),s(e,W,l),s(e,ns,l),s(e,cl,l),s(e,is,l),u(hl,e,l),s(e,ps,l),s(e,yl,l),os=!0},p(e,[l]){const la={};l&2&&(la.$$scope={dirty:l,ctx:e}),k.$set(la);const ta={};l&2&&(ta.$$scope={dirty:l,ctx:e}),B.$set(ta);const sa={};l&2&&(sa.$$scope={dirty:l,ctx:e}),R.$set(sa);const aa={};l&2&&(aa.$$scope={dirty:l,ctx:e}),V.$set(aa);const na={};l&2&&(na.$$scope={dirty:l,ctx:e}),A.$set(na);const ia={};l&2&&(ia.$$scope={dirty:l,ctx:e}),v.$set(ia);const pa={};l&2&&(pa.$$scope={dirty:l,ctx:e}),q.$set(pa);const oa={};l&2&&(oa.$$scope={dirty:l,ctx:e}),E.$set(oa);const ra={};l&2&&(ra.$$scope={dirty:l,ctx:e}),F.$set(ra)},i(e){os||(f(o.$$.fragment,e),f(k.$$.fragment,e),f(z.$$.fragment,e),f(Q.$$.fragment,e),f(D.$$.fragment,e),f(K.$$.fragment,e),f(ee.$$.fragment,e),f(B.$$.fragment,e),f(te.$$.fragment,e),f(ae.$$.fragment,e),f(R.$$.fragment,e),f(ie.$$.fragment,e),f(pe.$$.fragment,e),f(V.$$.fragment,e),f(me.$$.fragment,e),f(A.$$.fragment,e),f(de.$$.fragment,e),f(fe.$$.fragment,e),f(v.$$.fragment,e),f(he.$$.fragment,e),f(we.$$.fragment,e),f(q.$$.fragment,e),f(Te.$$.fragment,e),f(ge.$$.fragment,e),f(Ue.$$.fragment,e),f($e.$$.fragment,e),f(E.$$.fragment,e),f(_e.$$.fragment,e),f(Ge.$$.fragment,e),f(Re.$$.fragment,e),f(Ve.$$.fragment,e),f(ve.$$.fragment,e),f(qe.$$.fragment,e),f(F.$$.fragment,e),f(Fe.$$.fragment,e),f(xe.$$.fragment,e),f(Ye.$$.fragment,e),f(He.$$.fragment,e),f(Qe.$$.fragment,e),f(Ne.$$.fragment,e),f(Pe.$$.fragment,e),f(Ke.$$.fragment,e),f(el.$$.fragment,e),f(ll.$$.fragment,e),f(sl.$$.fragment,e),f(al.$$.fragment,e),f(il.$$.fragment,e),f(pl.$$.fragment,e),f(rl.$$.fragment,e),f(ml.$$.fragment,e),f(dl.$$.fragment,e),f(ul.$$.fragment,e),f(hl.$$.fragment,e),os=!0)},o(e){c(o.$$.fragment,e),c(k.$$.fragment,e),c(z.$$.fragment,e),c(Q.$$.fragment,e),c(D.$$.fragment,e),c(K.$$.fragment,e),c(ee.$$.fragment,e),c(B.$$.fragment,e),c(te.$$.fragment,e),c(ae.$$.fragment,e),c(R.$$.fragment,e),c(ie.$$.fragment,e),c(pe.$$.fragment,e),c(V.$$.fragment,e),c(me.$$.fragment,e),c(A.$$.fragment,e),c(de.$$.fragment,e),c(fe.$$.fragment,e),c(v.$$.fragment,e),c(he.$$.fragment,e),c(we.$$.fragment,e),c(q.$$.fragment,e),c(Te.$$.fragment,e),c(ge.$$.fragment,e),c(Ue.$$.fragment,e),c($e.$$.fragment,e),c(E.$$.fragment,e),c(_e.$$.fragment,e),c(Ge.$$.fragment,e),c(Re.$$.fragment,e),c(Ve.$$.fragment,e),c(ve.$$.fragment,e),c(qe.$$.fragment,e),c(F.$$.fragment,e),c(Fe.$$.fragment,e),c(xe.$$.fragment,e),c(Ye.$$.fragment,e),c(He.$$.fragment,e),c(Qe.$$.fragment,e),c(Ne.$$.fragment,e),c(Pe.$$.fragment,e),c(Ke.$$.fragment,e),c(el.$$.fragment,e),c(ll.$$.fragment,e),c(sl.$$.fragment,e),c(al.$$.fragment,e),c(il.$$.fragment,e),c(pl.$$.fragment,e),c(rl.$$.fragment,e),c(ml.$$.fragment,e),c(dl.$$.fragment,e),c(ul.$$.fragment,e),c(hl.$$.fragment,e),os=!1},d(e){e&&(t(m),t(n),t(w),t(r),t(U),t($),t(_),t(Tl),t(jl),t(x),t(gl),t(Y),t(bl),t(S),t(Ul),t(H),t(Zl),t($l),t(Il),t(N),t(_l),t(Wl),t(P),t(Gl),t(kl),t(O),t(Bl),t(Rl),t(le),t(Vl),t(Al),t(vl),t(se),t(Cl),t(ql),t(El),t(ne),t(Xl),t(Fl),t(Ll),t(oe),t(xl),t(Yl),t(re),t(Sl),t(Hl),t(zl),t(Me),t(Ql),t(Nl),t(ue),t(Dl),t(Pl),t(ce),t(Kl),t(Ol),t(et),t(C),t(lt),t(tt),t(st),t(Je),t(at),t(ye),t(nt),t(it),t(je),t(pt),t(ot),t(be),t(rt),t(mt),t(Ze),t(Mt),t(dt),t(ut),t(Ie),t(ft),t(ct),t(We),t(ht),t(wt),t(ke),t(Jt),t(Be),t(yt),t(Tt),t(X),t(jt),t(gt),t(Ae),t(bt),t(Ut),t(Ce),t(Zt),t($t),t(Ee),t(It),t(_t),t(Xe),t(Wt),t(Gt),t(Le),t(kt),t(Bt),t(L),t(Rt),t(Vt),t(Se),t(At),t(vt),t(ze),t(Ct),t(qt),t(Et),t(De),t(Xt),t(Ft),t(Lt),t(Oe),t(xt),t(Yt),t(St),t(tl),t(Ht),t(zt),t(Qt),t(nl),t(Nt),t(Dt),t(Pt),t(ol),t(Kt),t(Ot),t(es),t(Ml),t(ls),t(ts),t(ss),t(fl),t(as),t(W),t(ns),t(cl),t(is),t(ps),t(yl)),t(a),h(o,e),h(k,e),h(z,e),h(Q,e),h(D,e),h(K,e),h(ee,e),h(B,e),h(te,e),h(ae,e),h(R,e),h(ie,e),h(pe,e),h(V,e),h(me,e),h(A,e),h(de,e),h(fe,e),h(v,e),h(he,e),h(we,e),h(q,e),h(Te,e),h(ge,e),h(Ue,e),h($e,e),h(E,e),h(_e,e),h(Ge,e),h(Re,e),h(Ve,e),h(ve,e),h(qe,e),h(F,e),h(Fe,e),h(xe,e),h(Ye,e),h(He,e),h(Qe,e),h(Ne,e),h(Pe,e),h(Ke,e),h(el,e),h(ll,e),h(sl,e),h(al,e),h(il,e),h(pl,e),h(rl,e),h(ml,e),h(dl,e),h(ul,e),h(hl,e)}}}const Aa='{"title":"LoRA","local":"lora","sections":[{"title":"torch.compile","local":"torchcompile","sections":[],"depth":2},{"title":"Weight scale","local":"weight-scale","sections":[],"depth":2},{"title":"Hotswapping","local":"hotswapping","sections":[{"title":"Compiled models","local":"compiled-models","sections":[],"depth":3}],"depth":2},{"title":"Merge","local":"merge","sections":[{"title":"set_adapters","local":"setadapters","sections":[],"depth":3},{"title":"add_weighted_adapter","local":"addweightedadapter","sections":[],"depth":3},{"title":"fuse_lora","local":"fuselora","sections":[],"depth":3}],"depth":2},{"title":"Manage","local":"manage","sections":[{"title":"set_adapters","local":"setadapters","sections":[],"depth":3},{"title":"save_lora_adapter","local":"saveloraadapter","sections":[],"depth":3},{"title":"unload_lora_weights","local":"unloadloraweights","sections":[],"depth":3},{"title":"disable_lora","local":"disablelora","sections":[],"depth":3},{"title":"get_active_adapters","local":"getactiveadapters","sections":[],"depth":3},{"title":"get_list_adapters","local":"getlistadapters","sections":[],"depth":3},{"title":"delete_adapters","local":"deleteadapters","sections":[],"depth":3}],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2}],"depth":1}';function va(g){return da(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xa extends ua{constructor(a){super(),fa(this,a,va,Va,ma,{})}}export{xa as component};
