import{s as Is,o as Ys,n as k}from"../chunks/scheduler.8c3d61f6.js";import{S as Ns,i as Fs,g as m,s as f,r as d,A as Vs,h as c,f as i,c as r,j as ct,u as h,x as w,k as dt,y as G,a as n,v as y,d as M,t as g,w as b}from"../chunks/index.589a98e8.js";import{T as pt}from"../chunks/Tip.42aa8582.js";import{C as _}from"../chunks/CodeBlock.36627b28.js";import{D as Hs}from"../chunks/DocNotebookDropdown.108e4998.js";import{H as W,E as Ls}from"../chunks/EditOnGithub.e5a8d9cb.js";import{H as ht,a as B}from"../chunks/HfOption.9804ab8b.js";function Qs(U){let t,u='Learn more about the design decisions and why safetensor files are preferred for saving and loading model weights in the <a href="https://blog.eleuther.ai/safetensors-security-audit/" rel="nofollow">Safetensors audited as really safe and becoming the default</a> blog post.';return{c(){t=m("p"),t.innerHTML=u},l(s){t=c(s,"P",{"data-svelte-h":!0}),w(t)!=="svelte-sebmc7"&&(t.innerHTML=u)},m(s,p){n(s,t,p)},p:k,d(s){s&&i(t)}}}function Es(U){let t,u='Use the <a href="/docs/diffusers/pr_7830/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained">from_pretrained()</a> method to load a model with safetensors files stored in multiple folders.',s,p,a;return p=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMkMlMEElMjAlMjAlMjAlMjB1c2Vfc2FmZXRlbnNvcnMlM0RUcnVlJTBBKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

pipeline = DiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
    use_safetensors=<span class="hljs-literal">True</span>
)`,wrap:!1}}),{c(){t=m("p"),t.innerHTML=u,s=f(),d(p.$$.fragment)},l(o){t=c(o,"P",{"data-svelte-h":!0}),w(t)!=="svelte-n5okdd"&&(t.innerHTML=u),s=r(o),h(p.$$.fragment,o)},m(o,$){n(o,t,$),n(o,s,$),y(p,o,$),a=!0},p:k,i(o){a||(M(p.$$.fragment,o),a=!0)},o(o){g(p.$$.fragment,o),a=!1},d(o){o&&(i(t),i(s)),b(p,o)}}}function zs(U){let t,u='Use the <a href="/docs/diffusers/pr_7830/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method to load a model with all the weights stored in a single safetensors file.',s,p,a;return p=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25QaXBlbGluZS5mcm9tX3NpbmdsZV9maWxlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZXYXJyaW9yTWFtYTc3NyUyRk9yYW5nZU1peHMlMkZibG9iJTJGbWFpbiUyRk1vZGVscyUyRkFieXNzT3JhbmdlTWl4JTJGQWJ5c3NPcmFuZ2VNaXguc2FmZXRlbnNvcnMlMjIlMEEp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

pipeline = StableDiffusionPipeline.from_single_file(
    <span class="hljs-string">&quot;https://huggingface.co/WarriorMama777/OrangeMixs/blob/main/Models/AbyssOrangeMix/AbyssOrangeMix.safetensors&quot;</span>
)`,wrap:!1}}),{c(){t=m("p"),t.innerHTML=u,s=f(),d(p.$$.fragment)},l(o){t=c(o,"P",{"data-svelte-h":!0}),w(t)!=="svelte-1wows5s"&&(t.innerHTML=u),s=r(o),h(p.$$.fragment,o)},m(o,$){n(o,t,$),n(o,s,$),y(p,o,$),a=!0},p:k,i(o){a||(M(p.$$.fragment,o),a=!0)},o(o){g(p.$$.fragment,o),a=!1},d(o){o&&(i(t),i(s)),b(p,o)}}}function qs(U){let t,u,s,p;return t=new B({props:{id:"safetensors",option:"multifolder",$$slots:{default:[Es]},$$scope:{ctx:U}}}),s=new B({props:{id:"safetensors",option:"single file",$$slots:{default:[zs]},$$scope:{ctx:U}}}),{c(){d(t.$$.fragment),u=f(),d(s.$$.fragment)},l(a){h(t.$$.fragment,a),u=r(a),h(s.$$.fragment,a)},m(a,o){y(t,a,o),n(a,u,o),y(s,a,o),p=!0},p(a,o){const $={};o&2&&($.$$scope={dirty:o,ctx:a}),t.$set($);const J={};o&2&&(J.$$scope={dirty:o,ctx:a}),s.$set(J)},i(a){p||(M(t.$$.fragment,a),M(s.$$.fragment,a),p=!0)},o(a){g(t.$$.fragment,a),g(s.$$.fragment,a),p=!1},d(a){a&&i(u),b(t,a),b(s,a)}}}function Ds(U){let t,u="Pickled files may be unsafe because they can be exploited to execute malicious code. It is recommended to use safetensors files instead where possible, or convert the weights to safetensors files.";return{c(){t=m("p"),t.textContent=u},l(s){t=c(s,"P",{"data-svelte-h":!0}),w(t)!=="svelte-1k1da22"&&(t.textContent=u)},m(s,p){n(s,t,p)},p:k,d(s){s&&i(t)}}}function Ps(U){let t,u="Scripts that have ”<code>to_diffusers</code>” appended at the end mean they convert a model to the Diffusers-multifolder layout. Each script has their own specific set of arguments for configuring the conversion, so make sure you check what arguments are available!";return{c(){t=m("p"),t.innerHTML=u},l(s){t=c(s,"P",{"data-svelte-h":!0}),w(t)!=="svelte-1rkueqo"&&(t.innerHTML=u)},m(s,p){n(s,t,p)},p:k,d(s){s&&i(t)}}}function As(U){let t,u;return t=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblhMUGlwZWxpbmUlMEElMEFja3B0X3BhdGglMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTJGYmxvYiUyRm1haW4lMkZzZF94bF9iYXNlXzEuMF8wLjl2YWUuc2FmZXRlbnNvcnMlMjIlMEFwaXBlbGluZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblhMUGlwZWxpbmUuZnJvbV9zaW5nbGVfZmlsZShja3B0X3BhdGgp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionXLPipeline

ckpt_path = <span class="hljs-string">&quot;https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/sd_xl_base_1.0_0.9vae.safetensors&quot;</span>
pipeline = StableDiffusionXLPipeline.from_single_file(ckpt_path)`,wrap:!1}}),{c(){d(t.$$.fragment)},l(s){h(t.$$.fragment,s)},m(s,p){y(t,s,p),u=!0},p:k,i(s){u||(M(t.$$.fragment,s),u=!0)},o(s){g(t.$$.fragment,s),u=!1},d(s){b(t,s)}}}function Ks(U){let t,u;return t=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZUNhc2NhZGVVTmV0JTBBJTBBY2twdF9wYXRoJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRnN0YWJpbGl0eWFpJTJGc3RhYmxlLWNhc2NhZGUlMkZibG9iJTJGbWFpbiUyRnN0YWdlX2JfbGl0ZS5zYWZldGVuc29ycyUyMiUwQW1vZGVsJTIwJTNEJTIwU3RhYmxlQ2FzY2FkZVVOZXQuZnJvbV9zaW5nbGVfZmlsZShja3B0X3BhdGgp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableCascadeUNet

ckpt_path = <span class="hljs-string">&quot;https://huggingface.co/stabilityai/stable-cascade/blob/main/stage_b_lite.safetensors&quot;</span>
model = StableCascadeUNet.from_single_file(ckpt_path)`,wrap:!1}}),{c(){d(t.$$.fragment)},l(s){h(t.$$.fragment,s)},m(s,p){y(t,s,p),u=!0},p:k,i(s){u||(M(t.$$.fragment,s),u=!0)},o(s){g(t.$$.fragment,s),u=!1},d(s){b(t,s)}}}function Os(U){let t,u,s,p;return t=new B({props:{id:"pipeline-model",option:"pipeline",$$slots:{default:[As]},$$scope:{ctx:U}}}),s=new B({props:{id:"pipeline-model",option:"model",$$slots:{default:[Ks]},$$scope:{ctx:U}}}),{c(){d(t.$$.fragment),u=f(),d(s.$$.fragment)},l(a){h(t.$$.fragment,a),u=r(a),h(s.$$.fragment,a)},m(a,o){y(t,a,o),n(a,u,o),y(s,a,o),p=!0},p(a,o){const $={};o&2&&($.$$scope={dirty:o,ctx:a}),t.$set($);const J={};o&2&&(J.$$scope={dirty:o,ctx:a}),s.$set(J)},i(a){p||(M(t.$$.fragment,a),M(s.$$.fragment,a),p=!0)},o(a){g(t.$$.fragment,a),g(s.$$.fragment,a),p=!1},d(a){a&&i(u),b(t,a),b(s,a)}}}function ei(U){let t,u='The <a href="/docs/diffusers/pr_7830/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method automatically maps the checkpoint to the appropriate model repository, but there are cases where it is useful to use the <code>config</code> parameter. For example, if the model components in the checkpoint are different from the original checkpoint or if a checkpoint doesn’t have the necessary metadata to correctly determine the configuration to use for the pipeline.';return{c(){t=m("p"),t.innerHTML=u},l(s){t=c(s,"P",{"data-svelte-h":!0}),w(t)!=="svelte-uf1y4c"&&(t.innerHTML=u)},m(s,p){n(s,t,p)},p:k,d(s){s&&i(t)}}}function ti(U){let t,u,s,p='The <a href="/docs/diffusers/pr_7830/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method automatically determines the configuration to use from the configuration file in the model repository. You could also explicitly specify the configuration to use by providing the repository id to the <code>config</code> parameter.',a,o,$,J,Z='The model loads the configuration file for the <a href="https://huggingface.co/segmind/SSD-1B/blob/main/unet/config.json" rel="nofollow">UNet</a>, <a href="https://huggingface.co/segmind/SSD-1B/blob/main/vae/config.json" rel="nofollow">VAE</a>, and <a href="https://huggingface.co/segmind/SSD-1B/blob/main/text_encoder/config.json" rel="nofollow">text encoder</a> from their respective subfolders in the repository.',C;return t=new pt({props:{warning:!1,$$slots:{default:[ei]},$$scope:{ctx:U}}}),o=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblhMUGlwZWxpbmUlMEElMEFja3B0X3BhdGglMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGc2VnbWluZCUyRlNTRC0xQiUyRmJsb2IlMkZtYWluJTJGU1NELTFCLnNhZmV0ZW5zb3JzJTIyJTBBcmVwb19pZCUyMCUzRCUyMCUyMnNlZ21pbmQlMkZTU0QtMUIlMjIlMEElMEFwaXBlbGluZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblhMUGlwZWxpbmUuZnJvbV9zaW5nbGVfZmlsZShja3B0X3BhdGglMkMlMjBjb25maWclM0RyZXBvX2lkKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionXLPipeline

ckpt_path = <span class="hljs-string">&quot;https://huggingface.co/segmind/SSD-1B/blob/main/SSD-1B.safetensors&quot;</span>
repo_id = <span class="hljs-string">&quot;segmind/SSD-1B&quot;</span>

pipeline = StableDiffusionXLPipeline.from_single_file(ckpt_path, config=repo_id)`,wrap:!1}}),{c(){d(t.$$.fragment),u=f(),s=m("p"),s.innerHTML=p,a=f(),d(o.$$.fragment),$=f(),J=m("p"),J.innerHTML=Z},l(T){h(t.$$.fragment,T),u=r(T),s=c(T,"P",{"data-svelte-h":!0}),w(s)!=="svelte-kdelmc"&&(s.innerHTML=p),a=r(T),h(o.$$.fragment,T),$=r(T),J=c(T,"P",{"data-svelte-h":!0}),w(J)!=="svelte-vgyhxu"&&(J.innerHTML=Z)},m(T,j){y(t,T,j),n(T,u,j),n(T,s,j),n(T,a,j),y(o,T,j),n(T,$,j),n(T,J,j),C=!0},p(T,j){const ut={};j&2&&(ut.$$scope={dirty:j,ctx:T}),t.$set(ut)},i(T){C||(M(t.$$.fragment,T),M(o.$$.fragment,T),C=!0)},o(T){g(t.$$.fragment,T),g(o.$$.fragment,T),C=!1},d(T){T&&(i(u),i(s),i(a),i($),i(J)),b(t,T),b(o,T)}}}function li(U){let t,u="Diffusers attempts to infer the pipeline components based on the type signatures of the pipeline class when you use <code>original_config</code> with <code>local_files_only=True</code>, instead of fetching the configuration files from the model repository on the Hub. This prevents backward breaking changes in code that can’t connect to the internet to fetch the necessary configuration files.",s,p,a="This is not as reliable as providing a path to a local model repository with the <code>config</code> parameter, and might lead to errors during pipeline configuration. To avoid errors, run the pipeline with <code>local_files_only=False</code> once to download the appropriate pipeline configuration files to the local cache.";return{c(){t=m("p"),t.innerHTML=u,s=f(),p=m("p"),p.innerHTML=a},l(o){t=c(o,"P",{"data-svelte-h":!0}),w(t)!=="svelte-chnuen"&&(t.innerHTML=u),s=r(o),p=c(o,"P",{"data-svelte-h":!0}),w(p)!=="svelte-qhvpj"&&(p.innerHTML=a)},m(o,$){n(o,t,$),n(o,s,$),n(o,p,$)},p:k,d(o){o&&(i(t),i(s),i(p))}}}function si(U){let t,u='The <a href="/docs/diffusers/pr_7830/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method can also load the original configuration file of a pipeline that is stored elsewhere. Pass a local path or URL of the original configuration file to the <code>original_config</code> parameter.',s,p,a,o,$;return p=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblhMUGlwZWxpbmUlMEElMEFja3B0X3BhdGglMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTJGYmxvYiUyRm1haW4lMkZzZF94bF9iYXNlXzEuMF8wLjl2YWUuc2FmZXRlbnNvcnMlMjIlMEFvcmlnaW5hbF9jb25maWclMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRnJhdy5naXRodWJ1c2VyY29udGVudC5jb20lMkZTdGFiaWxpdHktQUklMkZnZW5lcmF0aXZlLW1vZGVscyUyRm1haW4lMkZjb25maWdzJTJGaW5mZXJlbmNlJTJGc2RfeGxfYmFzZS55YW1sJTIyJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25YTFBpcGVsaW5lLmZyb21fc2luZ2xlX2ZpbGUoY2twdF9wYXRoJTJDJTIwb3JpZ2luYWxfY29uZmlnJTNEb3JpZ2luYWxfY29uZmlnKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionXLPipeline

ckpt_path = <span class="hljs-string">&quot;https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/sd_xl_base_1.0_0.9vae.safetensors&quot;</span>
original_config = <span class="hljs-string">&quot;https://raw.githubusercontent.com/Stability-AI/generative-models/main/configs/inference/sd_xl_base.yaml&quot;</span>

pipeline = StableDiffusionXLPipeline.from_single_file(ckpt_path, original_config=original_config)`,wrap:!1}}),o=new pt({props:{warning:!1,$$slots:{default:[li]},$$scope:{ctx:U}}}),{c(){t=m("p"),t.innerHTML=u,s=f(),d(p.$$.fragment),a=f(),d(o.$$.fragment)},l(J){t=c(J,"P",{"data-svelte-h":!0}),w(t)!=="svelte-56nb2z"&&(t.innerHTML=u),s=r(J),h(p.$$.fragment,J),a=r(J),h(o.$$.fragment,J)},m(J,Z){n(J,t,Z),n(J,s,Z),y(p,J,Z),n(J,a,Z),y(o,J,Z),$=!0},p(J,Z){const C={};Z&2&&(C.$$scope={dirty:Z,ctx:J}),o.$set(C)},i(J){$||(M(p.$$.fragment,J),M(o.$$.fragment,J),$=!0)},o(J){g(p.$$.fragment,J),g(o.$$.fragment,J),$=!1},d(J){J&&(i(t),i(s),i(a)),b(p,J),b(o,J)}}}function ii(U){let t,u,s,p;return t=new B({props:{id:"config-file",option:"Hub configuration file",$$slots:{default:[ti]},$$scope:{ctx:U}}}),s=new B({props:{id:"config-file",option:"original configuration file",$$slots:{default:[si]},$$scope:{ctx:U}}}),{c(){d(t.$$.fragment),u=f(),d(s.$$.fragment)},l(a){h(t.$$.fragment,a),u=r(a),h(s.$$.fragment,a)},m(a,o){y(t,a,o),n(a,u,o),y(s,a,o),p=!0},p(a,o){const $={};o&2&&($.$$scope={dirty:o,ctx:a}),t.$set($);const J={};o&2&&(J.$$scope={dirty:o,ctx:a}),s.$set(J)},i(a){p||(M(t.$$.fragment,a),M(s.$$.fragment,a),p=!0)},o(a){g(t.$$.fragment,a),g(s.$$.fragment,a),p=!1},d(a){a&&i(u),b(t,a),b(s,a)}}}function ni(U){let t,u='For example, to scale the image latents in <a href="/docs/diffusers/pr_7830/en/api/pipelines/pix2pix#diffusers.StableDiffusionXLInstructPix2PixPipeline">StableDiffusionXLInstructPix2PixPipeline</a> pass the <code>is_cosxl_edit</code> parameter.',s,p,a;return p=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblhMSW5zdHJ1Y3RQaXgyUGl4UGlwZWxpbmUlMEElMEFja3B0X3BhdGglMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGc3RhYmlsaXR5YWklMkZjb3N4bCUyRmJsb2IlMkZtYWluJTJGY29zeGxfZWRpdC5zYWZldGVuc29ycyUyMiUwQXBpcGVsaW5lJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uWExJbnN0cnVjdFBpeDJQaXhQaXBlbGluZS5mcm9tX3NpbmdsZV9maWxlKGNrcHRfcGF0aCUyQyUyMGNvbmZpZyUzRCUyMmRpZmZ1c2VycyUyRnNkeGwtaW5zdHJ1Y3RwaXgycGl4LTc2OCUyMiUyQyUyMGlzX2Nvc3hsX2VkaXQlM0RUcnVlKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionXLInstructPix2PixPipeline

ckpt_path = <span class="hljs-string">&quot;https://huggingface.co/stabilityai/cosxl/blob/main/cosxl_edit.safetensors&quot;</span>
pipeline = StableDiffusionXLInstructPix2PixPipeline.from_single_file(ckpt_path, config=<span class="hljs-string">&quot;diffusers/sdxl-instructpix2pix-768&quot;</span>, is_cosxl_edit=<span class="hljs-literal">True</span>)`,wrap:!1}}),{c(){t=m("p"),t.innerHTML=u,s=f(),d(p.$$.fragment)},l(o){t=c(o,"P",{"data-svelte-h":!0}),w(t)!=="svelte-1frnudk"&&(t.innerHTML=u),s=r(o),h(p.$$.fragment,o)},m(o,$){n(o,t,$),n(o,s,$),y(p,o,$),a=!0},p:k,i(o){a||(M(p.$$.fragment,o),a=!0)},o(o){g(p.$$.fragment,o),a=!1},d(o){o&&(i(t),i(s)),b(p,o)}}}function ai(U){let t,u='For example, to upcast the attention dimensions in a <a href="/docs/diffusers/pr_7830/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a> pass the <code>upcast_attention</code> parameter.',s,p,a;return p=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTBBJTBBY2twdF9wYXRoJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRnN0YWJpbGl0eWFpJTJGc3RhYmxlLWRpZmZ1c2lvbi14bC1iYXNlLTEuMCUyRmJsb2IlMkZtYWluJTJGc2RfeGxfYmFzZV8xLjBfMC45dmFlLnNhZmV0ZW5zb3JzJTIyJTBBbW9kZWwlMjAlM0QlMjBVTmV0MkRDb25kaXRpb25Nb2RlbC5mcm9tX3NpbmdsZV9maWxlKGNrcHRfcGF0aCUyQyUyMHVwY2FzdF9hdHRlbnRpb24lM0RUcnVlKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel

ckpt_path = <span class="hljs-string">&quot;https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/sd_xl_base_1.0_0.9vae.safetensors&quot;</span>
model = UNet2DConditionModel.from_single_file(ckpt_path, upcast_attention=<span class="hljs-literal">True</span>)`,wrap:!1}}),{c(){t=m("p"),t.innerHTML=u,s=f(),d(p.$$.fragment)},l(o){t=c(o,"P",{"data-svelte-h":!0}),w(t)!=="svelte-19kpybq"&&(t.innerHTML=u),s=r(o),h(p.$$.fragment,o)},m(o,$){n(o,t,$),n(o,s,$),y(p,o,$),a=!0},p:k,i(o){a||(M(p.$$.fragment,o),a=!0)},o(o){g(p.$$.fragment,o),a=!1},d(o){o&&(i(t),i(s)),b(p,o)}}}function oi(U){let t,u,s,p;return t=new B({props:{id:"override",option:"pipeline",$$slots:{default:[ni]},$$scope:{ctx:U}}}),s=new B({props:{id:"override",option:"model",$$slots:{default:[ai]},$$scope:{ctx:U}}}),{c(){d(t.$$.fragment),u=f(),d(s.$$.fragment)},l(a){h(t.$$.fragment,a),u=r(a),h(s.$$.fragment,a)},m(a,o){y(t,a,o),n(a,u,o),y(s,a,o),p=!0},p(a,o){const $={};o&2&&($.$$scope={dirty:o,ctx:a}),t.$set($);const J={};o&2&&(J.$$scope={dirty:o,ctx:a}),s.$set(J)},i(a){p||(M(t.$$.fragment,a),M(s.$$.fragment,a),p=!0)},o(a){g(t.$$.fragment,a),g(s.$$.fragment,a),p=!1},d(a){a&&i(u),b(t,a),b(s,a)}}}function fi(U){let t,u;return t=new _({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGhmX2h1Yl9kb3dubG9hZCUyQyUyMHNuYXBzaG90X2Rvd25sb2FkJTBBJTBBbXlfbG9jYWxfY2hlY2twb2ludF9wYXRoJTIwJTNEJTIwaGZfaHViX2Rvd25sb2FkKCUwQSUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjJzZWdtaW5kJTJGU1NELTFCJTIyJTJDJTBBJTIwJTIwJTIwJTIwZmlsZW5hbWUlM0QlMjJTU0QtMUIuc2FmZXRlbnNvcnMlMjIlMEEpJTBBJTBBbXlfbG9jYWxfY29uZmlnX3BhdGglMjAlM0QlMjBzbmFwc2hvdF9kb3dubG9hZCglMEElMjAlMjAlMjAlMjByZXBvX2lkJTNEJTIyc2VnbWluZCUyRlNTRC0xQiUyMiUyQyUwQSUyMCUyMCUyMCUyMGFsbG93ZWRfcGF0dGVybnMlM0QlNUIlMjIqLmpzb24lMjIlMkMlMjAlMjIqKiUyRiouanNvbiUyMiUyQyUyMCUyMioudHh0JTIyJTJDJTIwJTIyKiolMkYqLnR4dCUyMiU1RCUwQSklMEElMEFwaXBlbGluZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblhMUGlwZWxpbmUuZnJvbV9zaW5nbGVfZmlsZShteV9sb2NhbF9jaGVja3BvaW50X3BhdGglMkMlMjBjb25maWclM0RteV9sb2NhbF9jb25maWdfcGF0aCUyQyUyMGxvY2FsX2ZpbGVzX29ubHklM0RUcnVlKQ==",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download, snapshot_download

my_local_checkpoint_path = hf_hub_download(
    repo_id=<span class="hljs-string">&quot;segmind/SSD-1B&quot;</span>,
    filename=<span class="hljs-string">&quot;SSD-1B.safetensors&quot;</span>
)

my_local_config_path = snapshot_download(
    repo_id=<span class="hljs-string">&quot;segmind/SSD-1B&quot;</span>,
    allowed_patterns=[<span class="hljs-string">&quot;*.json&quot;</span>, <span class="hljs-string">&quot;**/*.json&quot;</span>, <span class="hljs-string">&quot;*.txt&quot;</span>, <span class="hljs-string">&quot;**/*.txt&quot;</span>]
)

pipeline = StableDiffusionXLPipeline.from_single_file(my_local_checkpoint_path, config=my_local_config_path, local_files_only=<span class="hljs-literal">True</span>)`,wrap:!1}}),{c(){d(t.$$.fragment)},l(s){h(t.$$.fragment,s)},m(s,p){y(t,s,p),u=!0},p:k,i(s){u||(M(t.$$.fragment,s),u=!0)},o(s){g(t.$$.fragment,s),u=!1},d(s){b(t,s)}}}function ri(U){let t,u;return t=new _({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGhmX2h1Yl9kb3dubG9hZCUyQyUyMHNuYXBzaG90X2Rvd25sb2FkJTBBJTBBbXlfbG9jYWxfY2hlY2twb2ludF9wYXRoJTIwJTNEJTIwaGZfaHViX2Rvd25sb2FkKCUwQSUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjJzZWdtaW5kJTJGU1NELTFCJTIyJTJDJTBBJTIwJTIwJTIwJTIwZmlsZW5hbWUlM0QlMjJTU0QtMUIuc2FmZXRlbnNvcnMlMjIlMEElMjAlMjAlMjAlMjBsb2NhbF9kaXIlM0QlMjJteV9sb2NhbF9jaGVja3BvaW50cyUyMiUwQSklMEElMEFteV9sb2NhbF9jb25maWdfcGF0aCUyMCUzRCUyMHNuYXBzaG90X2Rvd25sb2FkKCUwQSUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjJzZWdtaW5kJTJGU1NELTFCJTIyJTJDJTBBJTIwJTIwJTIwJTIwYWxsb3dlZF9wYXR0ZXJucyUzRCU1QiUyMiouanNvbiUyMiUyQyUyMCUyMioqJTJGKi5qc29uJTIyJTJDJTIwJTIyKi50eHQlMjIlMkMlMjAlMjIqKiUyRioudHh0JTIyJTVEJTBBJTIwJTIwJTIwJTIwbG9jYWxfZGlyJTNEJTIybXlfbG9jYWxfY29uZmlnJTIyJTBBKSUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uWExQaXBlbGluZS5mcm9tX3NpbmdsZV9maWxlKG15X2xvY2FsX2NoZWNrcG9pbnRfcGF0aCUyQyUyMGNvbmZpZyUzRG15X2xvY2FsX2NvbmZpZ19wYXRoJTJDJTIwbG9jYWxfZmlsZXNfb25seSUzRFRydWUp",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download, snapshot_download

my_local_checkpoint_path = hf_hub_download(
    repo_id=<span class="hljs-string">&quot;segmind/SSD-1B&quot;</span>,
    filename=<span class="hljs-string">&quot;SSD-1B.safetensors&quot;</span>
    local_dir=<span class="hljs-string">&quot;my_local_checkpoints&quot;</span>
)

my_local_config_path = snapshot_download(
    repo_id=<span class="hljs-string">&quot;segmind/SSD-1B&quot;</span>,
    allowed_patterns=[<span class="hljs-string">&quot;*.json&quot;</span>, <span class="hljs-string">&quot;**/*.json&quot;</span>, <span class="hljs-string">&quot;*.txt&quot;</span>, <span class="hljs-string">&quot;**/*.txt&quot;</span>]
    local_dir=<span class="hljs-string">&quot;my_local_config&quot;</span>
)

pipeline = StableDiffusionXLPipeline.from_single_file(my_local_checkpoint_path, config=my_local_config_path, local_files_only=<span class="hljs-literal">True</span>)`,wrap:!1}}),{c(){d(t.$$.fragment)},l(s){h(t.$$.fragment,s)},m(s,p){y(t,s,p),u=!0},p:k,i(s){u||(M(t.$$.fragment,s),u=!0)},o(s){g(t.$$.fragment,s),u=!1},d(s){b(t,s)}}}function pi(U){let t,u,s,p;return t=new B({props:{id:"local",option:"Hub cache directory",$$slots:{default:[fi]},$$scope:{ctx:U}}}),s=new B({props:{id:"local",option:"specific local directory",$$slots:{default:[ri]},$$scope:{ctx:U}}}),{c(){d(t.$$.fragment),u=f(),d(s.$$.fragment)},l(a){h(t.$$.fragment,a),u=r(a),h(s.$$.fragment,a)},m(a,o){y(t,a,o),n(a,u,o),y(s,a,o),p=!0},p(a,o){const $={};o&2&&($.$$scope={dirty:o,ctx:a}),t.$set($);const J={};o&2&&(J.$$scope={dirty:o,ctx:a}),s.$set(J)},i(a){p||(M(t.$$.fragment,a),M(s.$$.fragment,a),p=!0)},o(a){g(t.$$.fragment,a),g(s.$$.fragment,a),p=!1},d(a){a&&i(u),b(t,a),b(s,a)}}}function ui(U){let t,u='In huggingface_hub&gt;=v0.23.0, the <code>local_dir_use_symlinks</code> argument isn’t necessary for the <a href="https://huggingface.co/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.hf_hub_download" rel="nofollow">hf_hub_download</a> and <a href="https://huggingface.co/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.snapshot_download" rel="nofollow">snapshot_download</a> functions.';return{c(){t=m("p"),t.innerHTML=u},l(s){t=c(s,"P",{"data-svelte-h":!0}),w(t)!=="svelte-1475ajo"&&(t.innerHTML=u)},m(s,p){n(s,t,p)},p:k,d(s){s&&i(t)}}}function mi(U){let t,u,s,p,a,o,$,J,Z,C="Diffusion models are saved in various file types and organized in different layouts. Diffusers stores model weights as safetensors files in <em>Diffusers-multifolder</em> layout and it also supports loading files (like safetensors and ckpt files) from a <em>single-file</em> layout which is commonly used in the diffusion ecosystem.",T,j,ut="Each layout has its own benefits and use cases, and this guide will show you how to load the different files and layouts, and how to convert them.",yt,z,Mt,q,Hl='PyTorch model weights are typically saved with Python’s <a href="https://docs.python.org/3/library/pickle.html" rel="nofollow">pickle</a> utility as ckpt or bin files. However, pickle is not secure and pickled files may contain malicious code that can be executed. This vulnerability is a serious concern given the popularity of model sharing. To address this security issue, the <a href="https://hf.co/docs/safetensors" rel="nofollow">Safetensors</a> library was developed as a secure alternative to pickle, which saves models as safetensors files.',gt,D,bt,R,wt,P,Ll='<a href="https://hf.co/docs/safetensors" rel="nofollow">Safetensors</a> is a safe and fast file format for securely storing and loading tensors. Safetensors restricts the header size to limit certain types of attacks, supports lazy loading (useful for distributed setups), and has generally faster loading speeds.',$t,A,Ql='Make sure you have the <a href="https://hf.co/docs/safetensors" rel="nofollow">Safetensors</a> library installed.',Jt,K,Ut,O,El="Safetensors stores weights in a safetensors file. Diffusers loads safetensors files by default if they’re available and the Safetensors library is installed. There are two ways safetensors files can be organized:",Tt,ee,zl='<li>Diffusers-multifolder layout: there may be several separate safetensors files, one for each pipeline component (text encoder, UNet, VAE), organized in subfolders (check out the <a href="https://hf.co/runwayml/stable-diffusion-v1-5/tree/main" rel="nofollow">runwayml/stable-diffusion-v1-5</a> repository as an example)</li> <li>single-file layout: all the model weights may be saved in a single file (check out the <a href="https://hf.co/WarriorMama777/OrangeMixs/tree/main/Models/AbyssOrangeMix" rel="nofollow">WarriorMama777/OrangeMixs</a> repository as an example)</li>',_t,X,Zt,te,jt,le,ql='<a href="https://hf.co/docs/peft/conceptual_guides/adapter#low-rank-adaptation-lora" rel="nofollow">LoRA</a> is a lightweight adapter that is fast and easy to train, making them especially popular for generating images in a certain way or style. These adapters are commonly stored in a safetensors file, and are widely popular on model sharing platforms like <a href="https://civitai.com/" rel="nofollow">civitai</a>.',vt,se,Dl='LoRAs are loaded into a base model with the <a href="/docs/diffusers/pr_7830/en/api/loaders/lora#diffusers.loaders.LoraLoaderMixin.load_lora_weights">load_lora_weights()</a> method.',Gt,ie,Wt,S,Pl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/blueprint-lora.png"/>',kt,ne,xt,I,Ct,ae,Al='PyTorch’s <a href="https://pytorch.org/docs/stable/generated/torch.save.html" rel="nofollow">torch.save</a> function uses Python’s <a href="https://docs.python.org/3/library/pickle.html" rel="nofollow">pickle</a> utility to serialize and save models. These files are saved as a ckpt file and they contain the entire model’s weights.',Bt,oe,Kl='Use the <a href="/docs/diffusers/pr_7830/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method to directly load a ckpt file.',Rt,fe,Xt,re,St,pe,Ol="There are two ways model files are organized, either in a Diffusers-multifolder layout or in a single-file layout. The Diffusers-multifolder layout is the default, and each component file (text encoder, UNet, VAE) is stored in a separate subfolder. Diffusers also supports loading models from a single-file layout where all the components are bundled together.",It,ue,Yt,me,es="The Diffusers-multifolder layout is the default storage layout for Diffusers. Each component’s (text encoder, UNet, VAE) weights are stored in a separate subfolder. The weights can be stored as safetensors or ckpt files.",Nt,Y,ts='<div class="flex-1"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/multifolder-layout.png"/> <figcaption class="mt-2 text-center text-sm text-gray-500">multifolder layout</figcaption></div> <div class="flex-1"><img class="rounded-xl" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/multifolder-unet.png"/> <figcaption class="mt-2 text-center text-sm text-gray-500">UNet subfolder</figcaption></div>',Ft,ce,ls='To load from Diffusers-multifolder layout, use the <a href="/docs/diffusers/pr_7830/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained">from_pretrained()</a> method.',Vt,de,Ht,he,ss="Benefits of using the Diffusers-multifolder layout include:",Lt,v,nt,is="<p>Faster to load each component file individually or in parallel.</p>",Sl,ye,at,ns='Reduced memory usage because you only load the components you need. For example, models like <a href="https://hf.co/stabilityai/sdxl-turbo" rel="nofollow">SDXL Turbo</a>, <a href="https://hf.co/ByteDance/SDXL-Lightning" rel="nofollow">SDXL Lightning</a>, and <a href="https://hf.co/ByteDance/Hyper-SD" rel="nofollow">Hyper-SD</a> have the same components except for the UNet. You can reuse their shared components with the <a href="/docs/diffusers/pr_7830/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pipe">from_pipe()</a> method without consuming any additional memory (take a look at the <a href="./loading#reuse-a-pipeline">Reuse a pipeline</a> guide) and only load the UNet. This way, you don’t need to download redundant components and unnecessarily use more memory.',Il,Me,Yl,ot,as='<p>Reduced storage requirements because if a component, such as the SDXL <a href="https://hf.co/madebyollin/sdxl-vae-fp16-fix" rel="nofollow">VAE</a>, is shared across multiple models, you only need to download and store a single copy of it instead of downloading and storing it multiple times. For 10 SDXL models, this can save ~3.5GB of storage. The storage savings is even greater for newer models like PixArt Sigma, where the <a href="https://hf.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/tree/main/text_encoder" rel="nofollow">text encoder</a> alone is ~19GB!</p>',Nl,ge,ft,os="Flexibility to replace a component in the model with a newer or better version.",Fl,be,Vl,rt,fs='<p>More visibility and information about a model’s components, which are stored in a <a href="https://hf.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/unet/config.json" rel="nofollow">config.json</a> file in each component subfolder.</p>',Qt,we,Et,$e,rs="The single-file layout stores all the model weights in a single file. All the model components (text encoder, UNet, VAE) weights are kept together instead of separately in subfolders. This can be a safetensors or ckpt file.",zt,N,ps='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/single-file-layout.png"/>',qt,Je,us='To load from a single-file layout, use the <a href="/docs/diffusers/pr_7830/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method.',Dt,Ue,Pt,Te,ms="Benefits of using a single-file layout include:",At,_e,cs='<li>Easy compatibility with diffusion interfaces such as <a href="https://github.com/comfyanonymous/ComfyUI" rel="nofollow">ComfyUI</a> or <a href="https://github.com/AUTOMATIC1111/stable-diffusion-webui" rel="nofollow">Automatic1111</a> which commonly use a single-file layout.</li> <li>Easier to manage (download and share) a single file.</li>',Kt,Ze,Ot,je,ds="Diffusers provides many scripts and methods to convert storage layouts and file formats to enable broader support across the diffusion ecosystem.",el,ve,hs='Take a look at the <a href="https://github.com/huggingface/diffusers/tree/main/scripts" rel="nofollow">diffusers/scripts</a> collection to find a script that fits your conversion needs.',tl,F,ll,Ge,ys='For example, to convert a Stable Diffusion XL model stored in Diffusers-multifolder layout to a single-file layout, run the <a href="https://github.com/huggingface/diffusers/blob/main/scripts/convert_diffusers_to_original_sdxl.py" rel="nofollow">convert_diffusers_to_original_sdxl.py</a> script. Provide the path to the model to convert, and the path to save the converted model to. You can optionally specify whether you want to save the model as a safetensors file and whether to save the model in half-precision.',sl,We,il,ke,Ms='You can also save a model to Diffusers-multifolder layout with the <a href="/docs/diffusers/pr_7830/en/api/pipelines/overview#diffusers.DiffusionPipeline.save_pretrained">save_pretrained()</a> method. This creates a directory for you if it doesn’t already exist, and it also saves the files as a safetensors file by default.',nl,xe,al,Ce,gs='Lastly, there are also Spaces, such as <a href="https://hf.co/spaces/diffusers/sd-to-diffusers" rel="nofollow">SD To Diffusers</a> and <a href="https://hf.co/spaces/diffusers/sdxl-to-diffusers" rel="nofollow">SD-XL To Diffusers</a>, that provide a more user-friendly interface for converting models to Diffusers-multifolder layout. This is the easiest and most convenient option for converting layouts, and it’ll open a PR on your model repository with the converted files. However, this option is not as reliable as running a script, and the Space may fail for more complicated models.',ol,Be,fl,Re,bs='Now that you’re familiar with the differences between the Diffusers-multifolder and single-file layout, this section shows you how to load models and pipeline components, customize configuration options for loading, and load local files with the <a href="/docs/diffusers/pr_7830/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method.',rl,Xe,pl,Se,ws='Pass the file path of the pipeline or model to the <a href="/docs/diffusers/pr_7830/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method to load it.',ul,V,ml,Ie,$s='Customize components in the pipeline by passing them directly to the <a href="/docs/diffusers/pr_7830/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method. For example, you can use a different scheduler in a pipeline.',cl,Ye,dl,Ne,Js="Or you could use a ControlNet model in the pipeline.",hl,Fe,yl,Ve,Ml,He,Us='Models have a configuration file that define their attributes like the number of inputs in a UNet. Pipelines configuration options are available in the pipeline’s class. For example, if you look at the <a href="/docs/diffusers/pr_7830/en/api/pipelines/pix2pix#diffusers.StableDiffusionXLInstructPix2PixPipeline">StableDiffusionXLInstructPix2PixPipeline</a> class, there is an option to scale the image latents with the <code>is_cosxl_edit</code> parameter.',gl,Le,Ts="These configuration files can be found in the models Hub repository or another location from which the configuration file originated (for example, a GitHub repository or locally on your device).",bl,H,wl,Qe,_s='While the configuration files specify the pipeline or models default parameters, you can override them by providing the parameters directly to the <a href="/docs/diffusers/pr_7830/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method. Any parameter supported by the model or pipeline class can be configured in this way.',$l,L,Jl,Ee,Ul,ze,Zs='In Diffusers&gt;=v0.28.0, the <a href="/docs/diffusers/pr_7830/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method attempts to configure a pipeline or model by inferring the model type from the keys in the checkpoint file. The inferred model type is used to determine the appropriate model repository on the Hugging Face Hub to configure the model or pipeline.',Tl,qe,js='For example, any single file checkpoint based on the Stable Diffusion XL base model will use the <a href="https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0" rel="nofollow">stabilityai/stable-diffusion-xl-base-1.0</a> model repository to configure the pipeline.',_l,De,vs='But if you’re working in an environment with restricted internet access, you should download the configuration files with the <a href="https://huggingface.co/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.snapshot_download" rel="nofollow">snapshot_download</a> function, and the model checkpoint with the <a href="https://huggingface.co/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.hf_hub_download" rel="nofollow">hf_hub_download</a> function. By default, these files are downloaded to the Hugging Face Hub <a href="https://huggingface.co/docs/huggingface_hub/en/guides/manage-cache" rel="nofollow">cache directory</a>, but you can specify a preferred directory to download the files to with the <code>local_dir</code> parameter.',Zl,Pe,Gs='Pass the configuration and checkpoint paths to the <a href="/docs/diffusers/pr_7830/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method to load locally.',jl,Q,vl,Ae,Gl,E,Wl,Ke,Ws='The <a href="/docs/diffusers/pr_7830/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method relies on the <a href="https://hf.co/docs/huggingface_hub/index" rel="nofollow">huggingface_hub</a> caching mechanism to fetch and store checkpoints and configuration files for models and pipelines. If you’re working with a file system that does not support symlinking, you should download the checkpoint file to a local directory first, and disable symlinking with the <code>local_dir_use_symlink=False</code> parameter in the <a href="https://huggingface.co/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.hf_hub_download" rel="nofollow">hf_hub_download</a> function and <a href="https://huggingface.co/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.snapshot_download" rel="nofollow">snapshot_download</a> functions.',kl,Oe,xl,et,ks="Then you can pass the local paths to the <code>pretrained_model_link_or_path</code> and <code>config</code> parameters.",Cl,tt,Bl,lt,Rl,mt,Xl;return a=new W({props:{title:"Model files and layouts",local:"model-files-and-layouts",headingTag:"h1"}}),$=new Hs({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/other-formats.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/pytorch/other-formats.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/tensorflow/other-formats.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/other-formats.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/pytorch/other-formats.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/tensorflow/other-formats.ipynb"}]}}),z=new W({props:{title:"Files",local:"files",headingTag:"h2"}}),D=new W({props:{title:"safetensors",local:"safetensors",headingTag:"h3"}}),R=new pt({props:{warning:!1,$$slots:{default:[Qs]},$$scope:{ctx:U}}}),K=new _({props:{code:"IXBpcCUyMGluc3RhbGwlMjBzYWZldGVuc29ycw==",highlighted:"!pip install safetensors",wrap:!1}}),X=new ht({props:{id:"safetensors",options:["multifolder","single file"],$$slots:{default:[qs]},$$scope:{ctx:U}}}),te=new W({props:{title:"LoRA files",local:"lora-files",headingTag:"h4"}}),ie=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblhMUGlwZWxpbmUlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQSUyMyUyMGJhc2UlMjBtb2RlbCUwQXBpcGVsaW5lJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uWExQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyTHlrb24lMkZkcmVhbXNoYXBlci14bC0xLTAlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUwQSkudG8oJTIyY3VkYSUyMiklMEElMEElMjMlMjBkb3dubG9hZCUyMExvUkElMjB3ZWlnaHRzJTBBIXdnZXQlMjBodHRwcyUzQSUyRiUyRmNpdml0YWkuY29tJTJGYXBpJTJGZG93bmxvYWQlMkZtb2RlbHMlMkYxNjg3NzYlMjAtTyUyMGJsdWVwcmludGlmeS5zYWZldGVuc29ycyUwQSUwQSUyMyUyMGxvYWQlMjBMb1JBJTIwd2VpZ2h0cyUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUyMi4lMjIlMkMlMjB3ZWlnaHRfbmFtZSUzRCUyMmJsdWVwcmludGlmeS5zYWZldGVuc29ycyUyMiklMEFwcm9tcHQlMjAlM0QlMjAlMjJibDN1cHJpbnQlMkMlMjBhJTIwaGlnaGx5JTIwZGV0YWlsZWQlMjBibHVlcHJpbnQlMjBvZiUyMHRoZSUyMGVtcGlyZSUyMHN0YXRlJTIwYnVpbGRpbmclMkMlMjBleHBsYWluaW5nJTIwaG93JTIwdG8lMjBidWlsZCUyMGFsbCUyMHBhcnRzJTJDJTIwbWFueSUyMHR4dCUyQyUyMGJsdWVwcmludCUyMGdyaWQlMjBiYWNrZHJvcCUyMiUwQW5lZ2F0aXZlX3Byb21wdCUyMCUzRCUyMCUyMmxvd3JlcyUyQyUyMGNyb3BwZWQlMkMlMjB3b3JzdCUyMHF1YWxpdHklMkMlMjBsb3clMjBxdWFsaXR5JTJDJTIwbm9ybWFsJTIwcXVhbGl0eSUyQyUyMGFydGlmYWN0cyUyQyUyMHNpZ25hdHVyZSUyQyUyMHdhdGVybWFyayUyQyUyMHVzZXJuYW1lJTJDJTIwYmx1cnJ5JTJDJTIwbW9yZSUyMHRoYW4lMjBvbmUlMjBicmlkZ2UlMkMlMjBiYWQlMjBhcmNoaXRlY3R1cmUlMjIlMEElMEFpbWFnZSUyMCUzRCUyMHBpcGVsaW5lKCUwQSUyMCUyMCUyMCUyMHByb21wdCUzRHByb21wdCUyQyUwQSUyMCUyMCUyMCUyMG5lZ2F0aXZlX3Byb21wdCUzRG5lZ2F0aXZlX3Byb21wdCUyQyUwQSUyMCUyMCUyMCUyMGdlbmVyYXRvciUzRHRvcmNoLm1hbnVhbF9zZWVkKDApJTJDJTBBKS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2U=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionXLPipeline
<span class="hljs-keyword">import</span> torch

<span class="hljs-comment"># base model</span>
pipeline = StableDiffusionXLPipeline.from_pretrained(
    <span class="hljs-string">&quot;Lykon/dreamshaper-xl-1-0&quot;</span>, torch_dtype=torch.float16, variant=<span class="hljs-string">&quot;fp16&quot;</span>
).to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-comment"># download LoRA weights</span>
!wget https://civitai.com/api/download/models/<span class="hljs-number">168776</span> -O blueprintify.safetensors

<span class="hljs-comment"># load LoRA weights</span>
pipeline.load_lora_weights(<span class="hljs-string">&quot;.&quot;</span>, weight_name=<span class="hljs-string">&quot;blueprintify.safetensors&quot;</span>)
prompt = <span class="hljs-string">&quot;bl3uprint, a highly detailed blueprint of the empire state building, explaining how to build all parts, many txt, blueprint grid backdrop&quot;</span>
negative_prompt = <span class="hljs-string">&quot;lowres, cropped, worst quality, low quality, normal quality, artifacts, signature, watermark, username, blurry, more than one bridge, bad architecture&quot;</span>

image = pipeline(
    prompt=prompt,
    negative_prompt=negative_prompt,
    generator=torch.manual_seed(<span class="hljs-number">0</span>),
).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),ne=new W({props:{title:"ckpt",local:"ckpt",headingTag:"h3"}}),I=new pt({props:{warning:!0,$$slots:{default:[Ds]},$$scope:{ctx:U}}}),fe=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25QaXBlbGluZS5mcm9tX3NpbmdsZV9maWxlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyRmJsb2IlMkZtYWluJTJGdjEtNS1wcnVuZWQuY2twdCUyMiUwQSk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

pipeline = StableDiffusionPipeline.from_single_file(
    <span class="hljs-string">&quot;https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned.ckpt&quot;</span>
)`,wrap:!1}}),re=new W({props:{title:"Storage layout",local:"storage-layout",headingTag:"h2"}}),ue=new W({props:{title:"Diffusers-multifolder",local:"diffusers-multifolder",headingTag:"h3"}}),de=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBJTIwJTIwJTIwJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIlMkMlMEElMjAlMjAlMjAlMjB1c2Vfc2FmZXRlbnNvcnMlM0RUcnVlJTJDJTBBKS50byglMjJjdWRhJTIyKQ==",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>,
    torch_dtype=torch.float16,
    variant=<span class="hljs-string">&quot;fp16&quot;</span>,
    use_safetensors=<span class="hljs-literal">True</span>,
).to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),Me=new _({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uWExQaXBlbGluZSUyQyUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTJDJTIwRXVsZXJEaXNjcmV0ZVNjaGVkdWxlciUwQSUwQSUyMyUyMGRvd25sb2FkJTIwb25lJTIwbW9kZWwlMEFzZHhsX3BpcGVsaW5lJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uWExQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBJTIwJTIwJTIwJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIlMkMlMEElMjAlMjAlMjAlMjB1c2Vfc2FmZXRlbnNvcnMlM0RUcnVlJTJDJTBBKS50byglMjJjdWRhJTIyKSUwQSUwQSUyMyUyMHN3aXRjaCUyMFVOZXQlMjBmb3IlMjBhbm90aGVyJTIwbW9kZWwlMEF1bmV0JTIwJTNEJTIwVU5ldDJEQ29uZGl0aW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnN0YWJpbGl0eWFpJTJGc2R4bC10dXJibyUyMiUyQyUwQSUyMCUyMCUyMCUyMHN1YmZvbGRlciUzRCUyMnVuZXQlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEElMjAlMjAlMjAlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUyQyUwQSUyMCUyMCUyMCUyMHVzZV9zYWZldGVuc29ycyUzRFRydWUlMEEpJTBBJTIzJTIwcmV1c2UlMjBhbGwlMjB0aGUlMjBzYW1lJTIwY29tcG9uZW50cyUyMGluJTIwbmV3JTIwbW9kZWwlMjBleGNlcHQlMjBmb3IlMjB0aGUlMjBVTmV0JTBBdHVyYm9fcGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25YTFBpcGVsaW5lLmZyb21fcGlwZSglMEElMjAlMjAlMjAlMjBzZHhsX3BpcGVsaW5lJTJDJTIwdW5ldCUzRHVuZXQlMkMlMEEpLnRvKCUyMmN1ZGElMjIpJTBBdHVyYm9fcGlwZWxpbmUuc2NoZWR1bGVyJTIwJTNEJTIwRXVsZXJEaXNjcmV0ZVNjaGVkdWxlci5mcm9tX2NvbmZpZyglMEElMjAlMjAlMjAlMjB0dXJib19waXBlbGluZS5zY2hlZHVsZXIuY29uZmlnJTJDJTBBJTIwJTIwJTIwJTIwdGltZXN0ZXAlMkJzcGFjaW5nJTNEJTIydHJhaWxpbmclMjIlMEEpJTBBaW1hZ2UlMjAlM0QlMjB0dXJib19waXBlbGluZSglMEElMjAlMjAlMjAlMjAlMjJhbiUyMGFzdHJvbmF1dCUyMHJpZGluZyUyMGElMjB1bmljb3JuJTIwb24lMjBtYXJzJTIyJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDElMkMlMEElMjAlMjAlMjAlMjBndWlkYW5jZV9zY2FsZSUzRDAuMCUyQyUwQSkuaW1hZ2VzJTVCMCU1RCUwQWltYWdl",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionXLPipeline, UNet2DConditionModel, EulerDiscreteScheduler

<span class="hljs-comment"># download one model</span>
sdxl_pipeline = StableDiffusionXLPipeline.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>,
    torch_dtype=torch.float16,
    variant=<span class="hljs-string">&quot;fp16&quot;</span>,
    use_safetensors=<span class="hljs-literal">True</span>,
).to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-comment"># switch UNet for another model</span>
unet = UNet2DConditionModel.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/sdxl-turbo&quot;</span>,
    subfolder=<span class="hljs-string">&quot;unet&quot;</span>,
    torch_dtype=torch.float16,
    variant=<span class="hljs-string">&quot;fp16&quot;</span>,
    use_safetensors=<span class="hljs-literal">True</span>
)
<span class="hljs-comment"># reuse all the same components in new model except for the UNet</span>
turbo_pipeline = StableDiffusionXLPipeline.from_pipe(
    sdxl_pipeline, unet=unet,
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
turbo_pipeline.scheduler = EulerDiscreteScheduler.from_config(
    turbo_pipeline.scheduler.config,
    timestep+spacing=<span class="hljs-string">&quot;trailing&quot;</span>
)
image = turbo_pipeline(
    <span class="hljs-string">&quot;an astronaut riding a unicorn on mars&quot;</span>,
    num_inference_steps=<span class="hljs-number">1</span>,
    guidance_scale=<span class="hljs-number">0.0</span>,
).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),be=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTJDJTIwQXV0b2VuY29kZXJLTCUwQSUwQXZhZSUyMCUzRCUyMEF1dG9lbmNvZGVyS0wuZnJvbV9wcmV0cmFpbmVkKCUyMm1hZGVieW9sbGluJTJGc2R4bC12YWUtZnAxNi1maXglMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMjB1c2Vfc2FmZXRlbnNvcnMlM0RUcnVlKSUwQXBpcGVsaW5lJTIwJTNEJTIwRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnN0YWJpbGl0eWFpJTJGc3RhYmxlLWRpZmZ1c2lvbi14bC1iYXNlLTEuMCUyMiUyQyUwQSUyMCUyMCUyMCUyMHZhZSUzRHZhZSUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUwQSUyMCUyMCUyMCUyMHZhcmlhbnQlM0QlMjJmcDE2JTIyJTJDJTBBJTIwJTIwJTIwJTIwdXNlX3NhZmV0ZW5zb3JzJTNEVHJ1ZSUyQyUwQSkudG8oJTIyY3VkYSUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline, AutoencoderKL

vae = AutoencoderKL.from_pretrained(<span class="hljs-string">&quot;madebyollin/sdxl-vae-fp16-fix&quot;</span>, torch_dtype=torch.float16, use_safetensors=<span class="hljs-literal">True</span>)
pipeline = DiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>,
    vae=vae,
    torch_dtype=torch.float16,
    variant=<span class="hljs-string">&quot;fp16&quot;</span>,
    use_safetensors=<span class="hljs-literal">True</span>,
).to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),we=new W({props:{title:"Single-file",local:"single-file",headingTag:"h3"}}),Ue=new _({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uWExQaXBlbGluZSUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uWExQaXBlbGluZS5mcm9tX3NpbmdsZV9maWxlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMkZibG9iJTJGbWFpbiUyRnNkX3hsX2Jhc2VfMS4wLnNhZmV0ZW5zb3JzJTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBJTIwJTIwJTIwJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIlMkMlMEElMjAlMjAlMjAlMjB1c2Vfc2FmZXRlbnNvcnMlM0RUcnVlJTJDJTBBKS50byglMjJjdWRhJTIyKQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionXLPipeline

pipeline = StableDiffusionXLPipeline.from_single_file(
    <span class="hljs-string">&quot;https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/sd_xl_base_1.0.safetensors&quot;</span>,
    torch_dtype=torch.float16,
    variant=<span class="hljs-string">&quot;fp16&quot;</span>,
    use_safetensors=<span class="hljs-literal">True</span>,
).to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),Ze=new W({props:{title:"Convert layout and files",local:"convert-layout-and-files",headingTag:"h2"}}),F=new pt({props:{warning:!1,$$slots:{default:[Ps]},$$scope:{ctx:U}}}),We=new _({props:{code:"cHl0aG9uJTIwY29udmVydF9kaWZmdXNlcnNfdG9fb3JpZ2luYWxfc2R4bC5weSUyMC0tbW9kZWxfcGF0aCUyMHBhdGglMkZ0byUyRm1vZGVsJTJGdG8lMkZjb252ZXJ0JTIwLS1jaGVja3BvaW50X3BhdGglMjBwYXRoJTJGdG8lMkZzYXZlJTJGbW9kZWwlMkZ0byUyMC0tdXNlX3NhZmV0ZW5zb3Jz",highlighted:"python convert_diffusers_to_original_sdxl.py --model_path path/to/model/to/convert --checkpoint_path path/to/save/model/to --use_safetensors",wrap:!1}}),xe=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblhMUGlwZWxpbmUlMEElMEFwaXBlbGluZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblhMUGlwZWxpbmUuZnJvbV9zaW5nbGVfZmlsZSglMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTJGYmxvYiUyRm1haW4lMkZzZF94bF9iYXNlXzEuMC5zYWZldGVuc29ycyUyMiUyQyUwQSklMEFwaXBlbGluZS5zYXZlX3ByZXRyYWluZWQoKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionXLPipeline

pipeline = StableDiffusionXLPipeline.from_single_file(
    <span class="hljs-string">&quot;https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/sd_xl_base_1.0.safetensors&quot;</span>,
)
pipeline.save_pretrained()`,wrap:!1}}),Be=new W({props:{title:"Single-file layout usage",local:"single-file-layout-usage",headingTag:"h2"}}),Xe=new W({props:{title:"Load a pipeline or model",local:"load-a-pipeline-or-model",headingTag:"h3"}}),V=new ht({props:{id:"pipeline-model",options:["pipeline","model"],$$slots:{default:[Os]},$$scope:{ctx:U}}}),Ye=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblhMUGlwZWxpbmUlMkMlMjBERElNU2NoZWR1bGVyJTBBJTBBY2twdF9wYXRoJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRnN0YWJpbGl0eWFpJTJGc3RhYmxlLWRpZmZ1c2lvbi14bC1iYXNlLTEuMCUyRmJsb2IlMkZtYWluJTJGc2RfeGxfYmFzZV8xLjBfMC45dmFlLnNhZmV0ZW5zb3JzJTIyJTBBc2NoZWR1bGVyJTIwJTNEJTIwRERJTVNjaGVkdWxlcigpJTBBcGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25YTFBpcGVsaW5lLmZyb21fc2luZ2xlX2ZpbGUoY2twdF9wYXRoJTJDJTIwc2NoZWR1bGVyJTNEc2NoZWR1bGVyKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionXLPipeline, DDIMScheduler

ckpt_path = <span class="hljs-string">&quot;https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/sd_xl_base_1.0_0.9vae.safetensors&quot;</span>
scheduler = DDIMScheduler()
pipeline = StableDiffusionXLPipeline.from_single_file(ckpt_path, scheduler=scheduler)`,wrap:!1}}),Fe=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvbkNvbnRyb2xOZXRQaXBlbGluZSUyQyUyMENvbnRyb2xOZXRNb2RlbCUwQSUwQWNrcHRfcGF0aCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyRmJsb2IlMkZtYWluJTJGdjEtNS1wcnVuZWQtZW1hb25seS5zYWZldGVuc29ycyUyMiUwQWNvbnRyb2xuZXQlMjAlM0QlMjBDb250cm9sTmV0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmxsbHlhc3ZpZWwlMkZjb250cm9sX3YxMXBfc2QxNV9jYW5ueSUyMiklMEFwaXBlbGluZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvbkNvbnRyb2xOZXRQaXBlbGluZS5mcm9tX3NpbmdsZV9maWxlKGNrcHRfcGF0aCUyQyUyMGNvbnRyb2xuZXQlM0Rjb250cm9sbmV0KQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionControlNetPipeline, ControlNetModel

ckpt_path = <span class="hljs-string">&quot;https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned-emaonly.safetensors&quot;</span>
controlnet = ControlNetModel.from_pretrained(<span class="hljs-string">&quot;lllyasviel/control_v11p_sd15_canny&quot;</span>)
pipeline = StableDiffusionControlNetPipeline.from_single_file(ckpt_path, controlnet=controlnet)`,wrap:!1}}),Ve=new W({props:{title:"Customize configuration options",local:"customize-configuration-options",headingTag:"h3"}}),H=new ht({props:{id:"config-file",options:["Hub configuration file","original configuration file"],$$slots:{default:[ii]},$$scope:{ctx:U}}}),L=new ht({props:{id:"override",options:["pipeline","model"],$$slots:{default:[oi]},$$scope:{ctx:U}}}),Ee=new W({props:{title:"Local files",local:"local-files",headingTag:"h3"}}),Q=new ht({props:{id:"local",options:["Hub cache directory","specific local directory"],$$slots:{default:[pi]},$$scope:{ctx:U}}}),Ae=new W({props:{title:"Local files without symlink",local:"local-files-without-symlink",headingTag:"h4"}}),E=new pt({props:{warning:!1,$$slots:{default:[ui]},$$scope:{ctx:U}}}),Oe=new _({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGhmX2h1Yl9kb3dubG9hZCUyQyUyMHNuYXBzaG90X2Rvd25sb2FkJTBBJTBBbXlfbG9jYWxfY2hlY2twb2ludF9wYXRoJTIwJTNEJTIwaGZfaHViX2Rvd25sb2FkKCUwQSUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjJzZWdtaW5kJTJGU1NELTFCJTIyJTJDJTBBJTIwJTIwJTIwJTIwZmlsZW5hbWUlM0QlMjJTU0QtMUIuc2FmZXRlbnNvcnMlMjIlMEElMjAlMjAlMjAlMjBsb2NhbF9kaXIlM0QlMjJteV9sb2NhbF9jaGVja3BvaW50cyUyMiUyQyUwQSUyMCUyMCUyMCUyMGxvY2FsX2Rpcl91c2Vfc3ltbGlua3MlM0RGYWxzZSUwQSklMEFwcmludCglMjJNeSUyMGxvY2FsJTIwY2hlY2twb2ludCUzQSUyMCUyMiUyQyUyMG15X2xvY2FsX2NoZWNrcG9pbnRfcGF0aCklMEElMEFteV9sb2NhbF9jb25maWdfcGF0aCUyMCUzRCUyMHNuYXBzaG90X2Rvd25sb2FkKCUwQSUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjJzZWdtaW5kJTJGU1NELTFCJTIyJTJDJTBBJTIwJTIwJTIwJTIwYWxsb3dlZF9wYXR0ZXJucyUzRCU1QiUyMiouanNvbiUyMiUyQyUyMCUyMioqJTJGKi5qc29uJTIyJTJDJTIwJTIyKi50eHQlMjIlMkMlMjAlMjIqKiUyRioudHh0JTIyJTVEJTBBJTIwJTIwJTIwJTIwbG9jYWxfZGlyX3VzZV9zeW1saW5rcyUzREZhbHNlJTJDJTBBKSUwQXByaW50KCUyMk15JTIwbG9jYWwlMjBjb25maWclM0ElMjAlMjIlMkMlMjBteV9sb2NhbF9jb25maWdfcGF0aCklMEE=",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download, snapshot_download

my_local_checkpoint_path = hf_hub_download(
    repo_id=<span class="hljs-string">&quot;segmind/SSD-1B&quot;</span>,
    filename=<span class="hljs-string">&quot;SSD-1B.safetensors&quot;</span>
    local_dir=<span class="hljs-string">&quot;my_local_checkpoints&quot;</span>,
    local_dir_use_symlinks=<span class="hljs-literal">False</span>
)
<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;My local checkpoint: &quot;</span>, my_local_checkpoint_path)

my_local_config_path = snapshot_download(
    repo_id=<span class="hljs-string">&quot;segmind/SSD-1B&quot;</span>,
    allowed_patterns=[<span class="hljs-string">&quot;*.json&quot;</span>, <span class="hljs-string">&quot;**/*.json&quot;</span>, <span class="hljs-string">&quot;*.txt&quot;</span>, <span class="hljs-string">&quot;**/*.txt&quot;</span>]
    local_dir_use_symlinks=<span class="hljs-literal">False</span>,
)
<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;My local config: &quot;</span>, my_local_config_path)
`,wrap:!1}}),tt=new _({props:{code:"cGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25YTFBpcGVsaW5lLmZyb21fc2luZ2xlX2ZpbGUobXlfbG9jYWxfY2hlY2twb2ludF9wYXRoJTJDJTIwY29uZmlnJTNEbXlfbG9jYWxfY29uZmlnX3BhdGglMkMlMjBsb2NhbF9maWxlc19vbmx5JTNEVHJ1ZSk=",highlighted:'pipeline = StableDiffusionXLPipeline.from_single_file(my_local_checkpoint_path, config=my_local_config_path, local_files_only=<span class="hljs-literal">True</span>)',wrap:!1}}),lt=new Ls({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/using-diffusers/other-formats.md"}}),{c(){t=m("meta"),u=f(),s=m("p"),p=f(),d(a.$$.fragment),o=f(),d($.$$.fragment),J=f(),Z=m("p"),Z.innerHTML=C,T=f(),j=m("p"),j.textContent=ut,yt=f(),d(z.$$.fragment),Mt=f(),q=m("p"),q.innerHTML=Hl,gt=f(),d(D.$$.fragment),bt=f(),d(R.$$.fragment),wt=f(),P=m("p"),P.innerHTML=Ll,$t=f(),A=m("p"),A.innerHTML=Ql,Jt=f(),d(K.$$.fragment),Ut=f(),O=m("p"),O.textContent=El,Tt=f(),ee=m("ol"),ee.innerHTML=zl,_t=f(),d(X.$$.fragment),Zt=f(),d(te.$$.fragment),jt=f(),le=m("p"),le.innerHTML=ql,vt=f(),se=m("p"),se.innerHTML=Dl,Gt=f(),d(ie.$$.fragment),Wt=f(),S=m("div"),S.innerHTML=Pl,kt=f(),d(ne.$$.fragment),xt=f(),d(I.$$.fragment),Ct=f(),ae=m("p"),ae.innerHTML=Al,Bt=f(),oe=m("p"),oe.innerHTML=Kl,Rt=f(),d(fe.$$.fragment),Xt=f(),d(re.$$.fragment),St=f(),pe=m("p"),pe.textContent=Ol,It=f(),d(ue.$$.fragment),Yt=f(),me=m("p"),me.textContent=es,Nt=f(),Y=m("div"),Y.innerHTML=ts,Ft=f(),ce=m("p"),ce.innerHTML=ls,Vt=f(),d(de.$$.fragment),Ht=f(),he=m("p"),he.textContent=ss,Lt=f(),v=m("ol"),nt=m("li"),nt.innerHTML=is,Sl=f(),ye=m("li"),at=m("p"),at.innerHTML=ns,Il=f(),d(Me.$$.fragment),Yl=f(),ot=m("li"),ot.innerHTML=as,Nl=f(),ge=m("li"),ft=m("p"),ft.textContent=os,Fl=f(),d(be.$$.fragment),Vl=f(),rt=m("li"),rt.innerHTML=fs,Qt=f(),d(we.$$.fragment),Et=f(),$e=m("p"),$e.textContent=rs,zt=f(),N=m("div"),N.innerHTML=ps,qt=f(),Je=m("p"),Je.innerHTML=us,Dt=f(),d(Ue.$$.fragment),Pt=f(),Te=m("p"),Te.textContent=ms,At=f(),_e=m("ol"),_e.innerHTML=cs,Kt=f(),d(Ze.$$.fragment),Ot=f(),je=m("p"),je.textContent=ds,el=f(),ve=m("p"),ve.innerHTML=hs,tl=f(),d(F.$$.fragment),ll=f(),Ge=m("p"),Ge.innerHTML=ys,sl=f(),d(We.$$.fragment),il=f(),ke=m("p"),ke.innerHTML=Ms,nl=f(),d(xe.$$.fragment),al=f(),Ce=m("p"),Ce.innerHTML=gs,ol=f(),d(Be.$$.fragment),fl=f(),Re=m("p"),Re.innerHTML=bs,rl=f(),d(Xe.$$.fragment),pl=f(),Se=m("p"),Se.innerHTML=ws,ul=f(),d(V.$$.fragment),ml=f(),Ie=m("p"),Ie.innerHTML=$s,cl=f(),d(Ye.$$.fragment),dl=f(),Ne=m("p"),Ne.textContent=Js,hl=f(),d(Fe.$$.fragment),yl=f(),d(Ve.$$.fragment),Ml=f(),He=m("p"),He.innerHTML=Us,gl=f(),Le=m("p"),Le.textContent=Ts,bl=f(),d(H.$$.fragment),wl=f(),Qe=m("p"),Qe.innerHTML=_s,$l=f(),d(L.$$.fragment),Jl=f(),d(Ee.$$.fragment),Ul=f(),ze=m("p"),ze.innerHTML=Zs,Tl=f(),qe=m("p"),qe.innerHTML=js,_l=f(),De=m("p"),De.innerHTML=vs,Zl=f(),Pe=m("p"),Pe.innerHTML=Gs,jl=f(),d(Q.$$.fragment),vl=f(),d(Ae.$$.fragment),Gl=f(),d(E.$$.fragment),Wl=f(),Ke=m("p"),Ke.innerHTML=Ws,kl=f(),d(Oe.$$.fragment),xl=f(),et=m("p"),et.innerHTML=ks,Cl=f(),d(tt.$$.fragment),Bl=f(),d(lt.$$.fragment),Rl=f(),mt=m("p"),this.h()},l(e){const l=Vs("svelte-u9bgzb",document.head);t=c(l,"META",{name:!0,content:!0}),l.forEach(i),u=r(e),s=c(e,"P",{}),ct(s).forEach(i),p=r(e),h(a.$$.fragment,e),o=r(e),h($.$$.fragment,e),J=r(e),Z=c(e,"P",{"data-svelte-h":!0}),w(Z)!=="svelte-kxjzqb"&&(Z.innerHTML=C),T=r(e),j=c(e,"P",{"data-svelte-h":!0}),w(j)!=="svelte-i9ya2i"&&(j.textContent=ut),yt=r(e),h(z.$$.fragment,e),Mt=r(e),q=c(e,"P",{"data-svelte-h":!0}),w(q)!=="svelte-11pybq1"&&(q.innerHTML=Hl),gt=r(e),h(D.$$.fragment,e),bt=r(e),h(R.$$.fragment,e),wt=r(e),P=c(e,"P",{"data-svelte-h":!0}),w(P)!=="svelte-9jg8rl"&&(P.innerHTML=Ll),$t=r(e),A=c(e,"P",{"data-svelte-h":!0}),w(A)!=="svelte-curlg7"&&(A.innerHTML=Ql),Jt=r(e),h(K.$$.fragment,e),Ut=r(e),O=c(e,"P",{"data-svelte-h":!0}),w(O)!=="svelte-1yget19"&&(O.textContent=El),Tt=r(e),ee=c(e,"OL",{"data-svelte-h":!0}),w(ee)!=="svelte-cdtgge"&&(ee.innerHTML=zl),_t=r(e),h(X.$$.fragment,e),Zt=r(e),h(te.$$.fragment,e),jt=r(e),le=c(e,"P",{"data-svelte-h":!0}),w(le)!=="svelte-f23adm"&&(le.innerHTML=ql),vt=r(e),se=c(e,"P",{"data-svelte-h":!0}),w(se)!=="svelte-h3t8x0"&&(se.innerHTML=Dl),Gt=r(e),h(ie.$$.fragment,e),Wt=r(e),S=c(e,"DIV",{class:!0,"data-svelte-h":!0}),w(S)!=="svelte-pgqu2t"&&(S.innerHTML=Pl),kt=r(e),h(ne.$$.fragment,e),xt=r(e),h(I.$$.fragment,e),Ct=r(e),ae=c(e,"P",{"data-svelte-h":!0}),w(ae)!=="svelte-1vcmkmh"&&(ae.innerHTML=Al),Bt=r(e),oe=c(e,"P",{"data-svelte-h":!0}),w(oe)!=="svelte-kaogoq"&&(oe.innerHTML=Kl),Rt=r(e),h(fe.$$.fragment,e),Xt=r(e),h(re.$$.fragment,e),St=r(e),pe=c(e,"P",{"data-svelte-h":!0}),w(pe)!=="svelte-bc37k5"&&(pe.textContent=Ol),It=r(e),h(ue.$$.fragment,e),Yt=r(e),me=c(e,"P",{"data-svelte-h":!0}),w(me)!=="svelte-r6jgt3"&&(me.textContent=es),Nt=r(e),Y=c(e,"DIV",{class:!0,"data-svelte-h":!0}),w(Y)!=="svelte-1taq59g"&&(Y.innerHTML=ts),Ft=r(e),ce=c(e,"P",{"data-svelte-h":!0}),w(ce)!=="svelte-1u82vdt"&&(ce.innerHTML=ls),Vt=r(e),h(de.$$.fragment,e),Ht=r(e),he=c(e,"P",{"data-svelte-h":!0}),w(he)!=="svelte-1s9uno7"&&(he.textContent=ss),Lt=r(e),v=c(e,"OL",{});var x=ct(v);nt=c(x,"LI",{"data-svelte-h":!0}),w(nt)!=="svelte-1ev5mj8"&&(nt.innerHTML=is),Sl=r(x),ye=c(x,"LI",{});var st=ct(ye);at=c(st,"P",{"data-svelte-h":!0}),w(at)!=="svelte-q7g9no"&&(at.innerHTML=ns),Il=r(st),h(Me.$$.fragment,st),st.forEach(i),Yl=r(x),ot=c(x,"LI",{"data-svelte-h":!0}),w(ot)!=="svelte-vp6v5d"&&(ot.innerHTML=as),Nl=r(x),ge=c(x,"LI",{});var it=ct(ge);ft=c(it,"P",{"data-svelte-h":!0}),w(ft)!=="svelte-1acwn3q"&&(ft.textContent=os),Fl=r(it),h(be.$$.fragment,it),it.forEach(i),Vl=r(x),rt=c(x,"LI",{"data-svelte-h":!0}),w(rt)!=="svelte-xph0z2"&&(rt.innerHTML=fs),x.forEach(i),Qt=r(e),h(we.$$.fragment,e),Et=r(e),$e=c(e,"P",{"data-svelte-h":!0}),w($e)!=="svelte-2us5xv"&&($e.textContent=rs),zt=r(e),N=c(e,"DIV",{class:!0,"data-svelte-h":!0}),w(N)!=="svelte-ysl4o1"&&(N.innerHTML=ps),qt=r(e),Je=c(e,"P",{"data-svelte-h":!0}),w(Je)!=="svelte-1ffqal"&&(Je.innerHTML=us),Dt=r(e),h(Ue.$$.fragment,e),Pt=r(e),Te=c(e,"P",{"data-svelte-h":!0}),w(Te)!=="svelte-1yex5cv"&&(Te.textContent=ms),At=r(e),_e=c(e,"OL",{"data-svelte-h":!0}),w(_e)!=="svelte-v6m4il"&&(_e.innerHTML=cs),Kt=r(e),h(Ze.$$.fragment,e),Ot=r(e),je=c(e,"P",{"data-svelte-h":!0}),w(je)!=="svelte-kszp4r"&&(je.textContent=ds),el=r(e),ve=c(e,"P",{"data-svelte-h":!0}),w(ve)!=="svelte-llrwg1"&&(ve.innerHTML=hs),tl=r(e),h(F.$$.fragment,e),ll=r(e),Ge=c(e,"P",{"data-svelte-h":!0}),w(Ge)!=="svelte-r41ob9"&&(Ge.innerHTML=ys),sl=r(e),h(We.$$.fragment,e),il=r(e),ke=c(e,"P",{"data-svelte-h":!0}),w(ke)!=="svelte-1w9i5ss"&&(ke.innerHTML=Ms),nl=r(e),h(xe.$$.fragment,e),al=r(e),Ce=c(e,"P",{"data-svelte-h":!0}),w(Ce)!=="svelte-71tdpy"&&(Ce.innerHTML=gs),ol=r(e),h(Be.$$.fragment,e),fl=r(e),Re=c(e,"P",{"data-svelte-h":!0}),w(Re)!=="svelte-scqpcq"&&(Re.innerHTML=bs),rl=r(e),h(Xe.$$.fragment,e),pl=r(e),Se=c(e,"P",{"data-svelte-h":!0}),w(Se)!=="svelte-1yaxnad"&&(Se.innerHTML=ws),ul=r(e),h(V.$$.fragment,e),ml=r(e),Ie=c(e,"P",{"data-svelte-h":!0}),w(Ie)!=="svelte-dp0vlh"&&(Ie.innerHTML=$s),cl=r(e),h(Ye.$$.fragment,e),dl=r(e),Ne=c(e,"P",{"data-svelte-h":!0}),w(Ne)!=="svelte-mgaprw"&&(Ne.textContent=Js),hl=r(e),h(Fe.$$.fragment,e),yl=r(e),h(Ve.$$.fragment,e),Ml=r(e),He=c(e,"P",{"data-svelte-h":!0}),w(He)!=="svelte-fo45os"&&(He.innerHTML=Us),gl=r(e),Le=c(e,"P",{"data-svelte-h":!0}),w(Le)!=="svelte-h4okww"&&(Le.textContent=Ts),bl=r(e),h(H.$$.fragment,e),wl=r(e),Qe=c(e,"P",{"data-svelte-h":!0}),w(Qe)!=="svelte-hnubws"&&(Qe.innerHTML=_s),$l=r(e),h(L.$$.fragment,e),Jl=r(e),h(Ee.$$.fragment,e),Ul=r(e),ze=c(e,"P",{"data-svelte-h":!0}),w(ze)!=="svelte-1sy16f0"&&(ze.innerHTML=Zs),Tl=r(e),qe=c(e,"P",{"data-svelte-h":!0}),w(qe)!=="svelte-5d71tq"&&(qe.innerHTML=js),_l=r(e),De=c(e,"P",{"data-svelte-h":!0}),w(De)!=="svelte-1qs3hmf"&&(De.innerHTML=vs),Zl=r(e),Pe=c(e,"P",{"data-svelte-h":!0}),w(Pe)!=="svelte-1m334eu"&&(Pe.innerHTML=Gs),jl=r(e),h(Q.$$.fragment,e),vl=r(e),h(Ae.$$.fragment,e),Gl=r(e),h(E.$$.fragment,e),Wl=r(e),Ke=c(e,"P",{"data-svelte-h":!0}),w(Ke)!=="svelte-e3y6vr"&&(Ke.innerHTML=Ws),kl=r(e),h(Oe.$$.fragment,e),xl=r(e),et=c(e,"P",{"data-svelte-h":!0}),w(et)!=="svelte-15leuyd"&&(et.innerHTML=ks),Cl=r(e),h(tt.$$.fragment,e),Bl=r(e),h(lt.$$.fragment,e),Rl=r(e),mt=c(e,"P",{}),ct(mt).forEach(i),this.h()},h(){dt(t,"name","hf:doc:metadata"),dt(t,"content",ci),dt(S,"class","flex justify-center"),dt(Y,"class","flex flex-row gap-4"),dt(N,"class","flex justify-center")},m(e,l){G(document.head,t),n(e,u,l),n(e,s,l),n(e,p,l),y(a,e,l),n(e,o,l),y($,e,l),n(e,J,l),n(e,Z,l),n(e,T,l),n(e,j,l),n(e,yt,l),y(z,e,l),n(e,Mt,l),n(e,q,l),n(e,gt,l),y(D,e,l),n(e,bt,l),y(R,e,l),n(e,wt,l),n(e,P,l),n(e,$t,l),n(e,A,l),n(e,Jt,l),y(K,e,l),n(e,Ut,l),n(e,O,l),n(e,Tt,l),n(e,ee,l),n(e,_t,l),y(X,e,l),n(e,Zt,l),y(te,e,l),n(e,jt,l),n(e,le,l),n(e,vt,l),n(e,se,l),n(e,Gt,l),y(ie,e,l),n(e,Wt,l),n(e,S,l),n(e,kt,l),y(ne,e,l),n(e,xt,l),y(I,e,l),n(e,Ct,l),n(e,ae,l),n(e,Bt,l),n(e,oe,l),n(e,Rt,l),y(fe,e,l),n(e,Xt,l),y(re,e,l),n(e,St,l),n(e,pe,l),n(e,It,l),y(ue,e,l),n(e,Yt,l),n(e,me,l),n(e,Nt,l),n(e,Y,l),n(e,Ft,l),n(e,ce,l),n(e,Vt,l),y(de,e,l),n(e,Ht,l),n(e,he,l),n(e,Lt,l),n(e,v,l),G(v,nt),G(v,Sl),G(v,ye),G(ye,at),G(ye,Il),y(Me,ye,null),G(v,Yl),G(v,ot),G(v,Nl),G(v,ge),G(ge,ft),G(ge,Fl),y(be,ge,null),G(v,Vl),G(v,rt),n(e,Qt,l),y(we,e,l),n(e,Et,l),n(e,$e,l),n(e,zt,l),n(e,N,l),n(e,qt,l),n(e,Je,l),n(e,Dt,l),y(Ue,e,l),n(e,Pt,l),n(e,Te,l),n(e,At,l),n(e,_e,l),n(e,Kt,l),y(Ze,e,l),n(e,Ot,l),n(e,je,l),n(e,el,l),n(e,ve,l),n(e,tl,l),y(F,e,l),n(e,ll,l),n(e,Ge,l),n(e,sl,l),y(We,e,l),n(e,il,l),n(e,ke,l),n(e,nl,l),y(xe,e,l),n(e,al,l),n(e,Ce,l),n(e,ol,l),y(Be,e,l),n(e,fl,l),n(e,Re,l),n(e,rl,l),y(Xe,e,l),n(e,pl,l),n(e,Se,l),n(e,ul,l),y(V,e,l),n(e,ml,l),n(e,Ie,l),n(e,cl,l),y(Ye,e,l),n(e,dl,l),n(e,Ne,l),n(e,hl,l),y(Fe,e,l),n(e,yl,l),y(Ve,e,l),n(e,Ml,l),n(e,He,l),n(e,gl,l),n(e,Le,l),n(e,bl,l),y(H,e,l),n(e,wl,l),n(e,Qe,l),n(e,$l,l),y(L,e,l),n(e,Jl,l),y(Ee,e,l),n(e,Ul,l),n(e,ze,l),n(e,Tl,l),n(e,qe,l),n(e,_l,l),n(e,De,l),n(e,Zl,l),n(e,Pe,l),n(e,jl,l),y(Q,e,l),n(e,vl,l),y(Ae,e,l),n(e,Gl,l),y(E,e,l),n(e,Wl,l),n(e,Ke,l),n(e,kl,l),y(Oe,e,l),n(e,xl,l),n(e,et,l),n(e,Cl,l),y(tt,e,l),n(e,Bl,l),y(lt,e,l),n(e,Rl,l),n(e,mt,l),Xl=!0},p(e,[l]){const x={};l&2&&(x.$$scope={dirty:l,ctx:e}),R.$set(x);const st={};l&2&&(st.$$scope={dirty:l,ctx:e}),X.$set(st);const it={};l&2&&(it.$$scope={dirty:l,ctx:e}),I.$set(it);const xs={};l&2&&(xs.$$scope={dirty:l,ctx:e}),F.$set(xs);const Cs={};l&2&&(Cs.$$scope={dirty:l,ctx:e}),V.$set(Cs);const Bs={};l&2&&(Bs.$$scope={dirty:l,ctx:e}),H.$set(Bs);const Rs={};l&2&&(Rs.$$scope={dirty:l,ctx:e}),L.$set(Rs);const Xs={};l&2&&(Xs.$$scope={dirty:l,ctx:e}),Q.$set(Xs);const Ss={};l&2&&(Ss.$$scope={dirty:l,ctx:e}),E.$set(Ss)},i(e){Xl||(M(a.$$.fragment,e),M($.$$.fragment,e),M(z.$$.fragment,e),M(D.$$.fragment,e),M(R.$$.fragment,e),M(K.$$.fragment,e),M(X.$$.fragment,e),M(te.$$.fragment,e),M(ie.$$.fragment,e),M(ne.$$.fragment,e),M(I.$$.fragment,e),M(fe.$$.fragment,e),M(re.$$.fragment,e),M(ue.$$.fragment,e),M(de.$$.fragment,e),M(Me.$$.fragment,e),M(be.$$.fragment,e),M(we.$$.fragment,e),M(Ue.$$.fragment,e),M(Ze.$$.fragment,e),M(F.$$.fragment,e),M(We.$$.fragment,e),M(xe.$$.fragment,e),M(Be.$$.fragment,e),M(Xe.$$.fragment,e),M(V.$$.fragment,e),M(Ye.$$.fragment,e),M(Fe.$$.fragment,e),M(Ve.$$.fragment,e),M(H.$$.fragment,e),M(L.$$.fragment,e),M(Ee.$$.fragment,e),M(Q.$$.fragment,e),M(Ae.$$.fragment,e),M(E.$$.fragment,e),M(Oe.$$.fragment,e),M(tt.$$.fragment,e),M(lt.$$.fragment,e),Xl=!0)},o(e){g(a.$$.fragment,e),g($.$$.fragment,e),g(z.$$.fragment,e),g(D.$$.fragment,e),g(R.$$.fragment,e),g(K.$$.fragment,e),g(X.$$.fragment,e),g(te.$$.fragment,e),g(ie.$$.fragment,e),g(ne.$$.fragment,e),g(I.$$.fragment,e),g(fe.$$.fragment,e),g(re.$$.fragment,e),g(ue.$$.fragment,e),g(de.$$.fragment,e),g(Me.$$.fragment,e),g(be.$$.fragment,e),g(we.$$.fragment,e),g(Ue.$$.fragment,e),g(Ze.$$.fragment,e),g(F.$$.fragment,e),g(We.$$.fragment,e),g(xe.$$.fragment,e),g(Be.$$.fragment,e),g(Xe.$$.fragment,e),g(V.$$.fragment,e),g(Ye.$$.fragment,e),g(Fe.$$.fragment,e),g(Ve.$$.fragment,e),g(H.$$.fragment,e),g(L.$$.fragment,e),g(Ee.$$.fragment,e),g(Q.$$.fragment,e),g(Ae.$$.fragment,e),g(E.$$.fragment,e),g(Oe.$$.fragment,e),g(tt.$$.fragment,e),g(lt.$$.fragment,e),Xl=!1},d(e){e&&(i(u),i(s),i(p),i(o),i(J),i(Z),i(T),i(j),i(yt),i(Mt),i(q),i(gt),i(bt),i(wt),i(P),i($t),i(A),i(Jt),i(Ut),i(O),i(Tt),i(ee),i(_t),i(Zt),i(jt),i(le),i(vt),i(se),i(Gt),i(Wt),i(S),i(kt),i(xt),i(Ct),i(ae),i(Bt),i(oe),i(Rt),i(Xt),i(St),i(pe),i(It),i(Yt),i(me),i(Nt),i(Y),i(Ft),i(ce),i(Vt),i(Ht),i(he),i(Lt),i(v),i(Qt),i(Et),i($e),i(zt),i(N),i(qt),i(Je),i(Dt),i(Pt),i(Te),i(At),i(_e),i(Kt),i(Ot),i(je),i(el),i(ve),i(tl),i(ll),i(Ge),i(sl),i(il),i(ke),i(nl),i(al),i(Ce),i(ol),i(fl),i(Re),i(rl),i(pl),i(Se),i(ul),i(ml),i(Ie),i(cl),i(dl),i(Ne),i(hl),i(yl),i(Ml),i(He),i(gl),i(Le),i(bl),i(wl),i(Qe),i($l),i(Jl),i(Ul),i(ze),i(Tl),i(qe),i(_l),i(De),i(Zl),i(Pe),i(jl),i(vl),i(Gl),i(Wl),i(Ke),i(kl),i(xl),i(et),i(Cl),i(Bl),i(Rl),i(mt)),i(t),b(a,e),b($,e),b(z,e),b(D,e),b(R,e),b(K,e),b(X,e),b(te,e),b(ie,e),b(ne,e),b(I,e),b(fe,e),b(re,e),b(ue,e),b(de,e),b(Me),b(be),b(we,e),b(Ue,e),b(Ze,e),b(F,e),b(We,e),b(xe,e),b(Be,e),b(Xe,e),b(V,e),b(Ye,e),b(Fe,e),b(Ve,e),b(H,e),b(L,e),b(Ee,e),b(Q,e),b(Ae,e),b(E,e),b(Oe,e),b(tt,e),b(lt,e)}}}const ci='{"title":"Model files and layouts","local":"model-files-and-layouts","sections":[{"title":"Files","local":"files","sections":[{"title":"safetensors","local":"safetensors","sections":[{"title":"LoRA files","local":"lora-files","sections":[],"depth":4}],"depth":3},{"title":"ckpt","local":"ckpt","sections":[],"depth":3}],"depth":2},{"title":"Storage layout","local":"storage-layout","sections":[{"title":"Diffusers-multifolder","local":"diffusers-multifolder","sections":[],"depth":3},{"title":"Single-file","local":"single-file","sections":[],"depth":3}],"depth":2},{"title":"Convert layout and files","local":"convert-layout-and-files","sections":[],"depth":2},{"title":"Single-file layout usage","local":"single-file-layout-usage","sections":[{"title":"Load a pipeline or model","local":"load-a-pipeline-or-model","sections":[],"depth":3},{"title":"Customize configuration options","local":"customize-configuration-options","sections":[],"depth":3},{"title":"Local files","local":"local-files","sections":[{"title":"Local files without symlink","local":"local-files-without-symlink","sections":[],"depth":4}],"depth":3}],"depth":2}],"depth":1}';function di(U){return Ys(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ji extends Ns{constructor(t){super(),Fs(this,t,di,mi,Is,{})}}export{Ji as component};
