import{s as Is,o as Ss,n as W}from"../chunks/scheduler.8c3d61f6.js";import{S as Fs,i as Vs,g as m,s as f,r as d,A as Ns,h as c,f as i,c as r,j as ct,u as h,x as w,k as dt,y as v,a as n,v as y,d as M,t as b,w as g}from"../chunks/index.da70eac4.js";import{T as pt}from"../chunks/Tip.1d9b8c37.js";import{C as _}from"../chunks/CodeBlock.00a903b3.js";import{D as Ls}from"../chunks/DocNotebookDropdown.02900f6b.js";import{H as k,E as Hs}from"../chunks/EditOnGithub.1e64e623.js";import{H as ht,a as B}from"../chunks/HfOption.c1483eb1.js";function Es(T){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:W,d(s){s&&i(t)}}}function Qs(T){let t,u='Use the <a href="/docs/diffusers/pr_10001/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:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmxlLWRpZmZ1c2lvbi12MS01JTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwdXNlX3NhZmV0ZW5zb3JzJTNEVHJ1ZSUwQSk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

pipeline = DiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;stable-diffusion-v1-5/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-13w2tgh"&&(t.innerHTML=u),s=r(o),h(p.$$.fragment,o)},m(o,$){n(o,t,$),n(o,s,$),y(p,o,$),a=!0},p:W,i(o){a||(M(p.$$.fragment,o),a=!0)},o(o){b(p.$$.fragment,o),a=!1},d(o){o&&(i(t),i(s)),g(p,o)}}}function zs(T){let t,u='Use the <a href="/docs/diffusers/pr_10001/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-mrk6lm"&&(t.innerHTML=u),s=r(o),h(p.$$.fragment,o)},m(o,$){n(o,t,$),n(o,s,$),y(p,o,$),a=!0},p:W,i(o){a||(M(p.$$.fragment,o),a=!0)},o(o){b(p.$$.fragment,o),a=!1},d(o){o&&(i(t),i(s)),g(p,o)}}}function qs(T){let t,u,s,p;return t=new B({props:{id:"safetensors",option:"multifolder",$$slots:{default:[Qs]},$$scope:{ctx:T}}}),s=new B({props:{id:"safetensors",option:"single file",$$slots:{default:[zs]},$$scope:{ctx:T}}}),{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){b(t.$$.fragment,a),b(s.$$.fragment,a),p=!1},d(a){a&&i(u),g(t,a),g(s,a)}}}function Ds(T){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:W,d(s){s&&i(t)}}}function Ps(T){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:W,d(s){s&&i(t)}}}function As(T){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:W,i(s){u||(M(t.$$.fragment,s),u=!0)},o(s){b(t.$$.fragment,s),u=!1},d(s){g(t,s)}}}function Ks(T){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:W,i(s){u||(M(t.$$.fragment,s),u=!0)},o(s){b(t.$$.fragment,s),u=!1},d(s){g(t,s)}}}function Os(T){let t,u,s,p;return t=new B({props:{id:"pipeline-model",option:"pipeline",$$slots:{default:[As]},$$scope:{ctx:T}}}),s=new B({props:{id:"pipeline-model",option:"model",$$slots:{default:[Ks]},$$scope:{ctx:T}}}),{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){b(t.$$.fragment,a),b(s.$$.fragment,a),p=!1},d(a){a&&i(u),g(t,a),g(s,a)}}}function ei(T){let t,u='The <a href="/docs/diffusers/pr_10001/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-1ie9bp8"&&(t.innerHTML=u)},m(s,p){n(s,t,p)},p:W,d(s){s&&i(t)}}}function ti(T){let t,u,s,p='The <a href="/docs/diffusers/pr_10001/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:T}}}),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(U){h(t.$$.fragment,U),u=r(U),s=c(U,"P",{"data-svelte-h":!0}),w(s)!=="svelte-rljm1k"&&(s.innerHTML=p),a=r(U),h(o.$$.fragment,U),$=r(U),J=c(U,"P",{"data-svelte-h":!0}),w(J)!=="svelte-vgyhxu"&&(J.innerHTML=Z)},m(U,G){y(t,U,G),n(U,u,G),n(U,s,G),n(U,a,G),y(o,U,G),n(U,$,G),n(U,J,G),C=!0},p(U,G){const ut={};G&2&&(ut.$$scope={dirty:G,ctx:U}),t.$set(ut)},i(U){C||(M(t.$$.fragment,U),M(o.$$.fragment,U),C=!0)},o(U){b(t.$$.fragment,U),b(o.$$.fragment,U),C=!1},d(U){U&&(i(u),i(s),i(a),i($),i(J)),g(t,U),g(o,U)}}}function li(T){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:W,d(o){o&&(i(t),i(s),i(p))}}}function si(T){let t,u='The <a href="/docs/diffusers/pr_10001/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:T}}}),{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-10fl9nl"&&(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){b(p.$$.fragment,J),b(o.$$.fragment,J),$=!1},d(J){J&&(i(t),i(s),i(a)),g(p,J),g(o,J)}}}function ii(T){let t,u,s,p;return t=new B({props:{id:"config-file",option:"Hub configuration file",$$slots:{default:[ti]},$$scope:{ctx:T}}}),s=new B({props:{id:"config-file",option:"original configuration file",$$slots:{default:[si]},$$scope:{ctx:T}}}),{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){b(t.$$.fragment,a),b(s.$$.fragment,a),p=!1},d(a){a&&i(u),g(t,a),g(s,a)}}}function ni(T){let t,u='For example, to scale the image latents in <a href="/docs/diffusers/pr_10001/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-1lex6i6"&&(t.innerHTML=u),s=r(o),h(p.$$.fragment,o)},m(o,$){n(o,t,$),n(o,s,$),y(p,o,$),a=!0},p:W,i(o){a||(M(p.$$.fragment,o),a=!0)},o(o){b(p.$$.fragment,o),a=!1},d(o){o&&(i(t),i(s)),g(p,o)}}}function ai(T){let t,u='For example, to upcast the attention dimensions in a <a href="/docs/diffusers/pr_10001/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-1qnjg3k"&&(t.innerHTML=u),s=r(o),h(p.$$.fragment,o)},m(o,$){n(o,t,$),n(o,s,$),y(p,o,$),a=!0},p:W,i(o){a||(M(p.$$.fragment,o),a=!0)},o(o){b(p.$$.fragment,o),a=!1},d(o){o&&(i(t),i(s)),g(p,o)}}}function oi(T){let t,u,s,p;return t=new B({props:{id:"override",option:"pipeline",$$slots:{default:[ni]},$$scope:{ctx:T}}}),s=new B({props:{id:"override",option:"model",$$slots:{default:[ai]},$$scope:{ctx:T}}}),{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){b(t.$$.fragment,a),b(s.$$.fragment,a),p=!1},d(a){a&&i(u),g(t,a),g(s,a)}}}function fi(T){let t,u;return t=new _({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGhmX2h1Yl9kb3dubG9hZCUyQyUyMHNuYXBzaG90X2Rvd25sb2FkJTBBJTBBbXlfbG9jYWxfY2hlY2twb2ludF9wYXRoJTIwJTNEJTIwaGZfaHViX2Rvd25sb2FkKCUwQSUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjJzZWdtaW5kJTJGU1NELTFCJTIyJTJDJTBBJTIwJTIwJTIwJTIwZmlsZW5hbWUlM0QlMjJTU0QtMUIuc2FmZXRlbnNvcnMlMjIlMEEpJTBBJTBBbXlfbG9jYWxfY29uZmlnX3BhdGglMjAlM0QlMjBzbmFwc2hvdF9kb3dubG9hZCglMEElMjAlMjAlMjAlMjByZXBvX2lkJTNEJTIyc2VnbWluZCUyRlNTRC0xQiUyMiUyQyUwQSUyMCUyMCUyMCUyMGFsbG93X3BhdHRlcm5zJTNEJTVCJTIyKi5qc29uJTIyJTJDJTIwJTIyKiolMkYqLmpzb24lMjIlMkMlMjAlMjIqLnR4dCUyMiUyQyUyMCUyMioqJTJGKi50eHQlMjIlNUQlMEEpJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25YTFBpcGVsaW5lLmZyb21fc2luZ2xlX2ZpbGUobXlfbG9jYWxfY2hlY2twb2ludF9wYXRoJTJDJTIwY29uZmlnJTNEbXlfbG9jYWxfY29uZmlnX3BhdGglMkMlMjBsb2NhbF9maWxlc19vbmx5JTNEVHJ1ZSk=",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>,
    allow_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:W,i(s){u||(M(t.$$.fragment,s),u=!0)},o(s){b(t.$$.fragment,s),u=!1},d(s){g(t,s)}}}function ri(T){let t,u;return t=new _({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGhmX2h1Yl9kb3dubG9hZCUyQyUyMHNuYXBzaG90X2Rvd25sb2FkJTBBJTBBbXlfbG9jYWxfY2hlY2twb2ludF9wYXRoJTIwJTNEJTIwaGZfaHViX2Rvd25sb2FkKCUwQSUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjJzZWdtaW5kJTJGU1NELTFCJTIyJTJDJTBBJTIwJTIwJTIwJTIwZmlsZW5hbWUlM0QlMjJTU0QtMUIuc2FmZXRlbnNvcnMlMjIlMEElMjAlMjAlMjAlMjBsb2NhbF9kaXIlM0QlMjJteV9sb2NhbF9jaGVja3BvaW50cyUyMiUwQSklMEElMEFteV9sb2NhbF9jb25maWdfcGF0aCUyMCUzRCUyMHNuYXBzaG90X2Rvd25sb2FkKCUwQSUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjJzZWdtaW5kJTJGU1NELTFCJTIyJTJDJTBBJTIwJTIwJTIwJTIwYWxsb3dfcGF0dGVybnMlM0QlNUIlMjIqLmpzb24lMjIlMkMlMjAlMjIqKiUyRiouanNvbiUyMiUyQyUyMCUyMioudHh0JTIyJTJDJTIwJTIyKiolMkYqLnR4dCUyMiU1RCUwQSUyMCUyMCUyMCUyMGxvY2FsX2RpciUzRCUyMm15X2xvY2FsX2NvbmZpZyUyMiUwQSklMEElMEFwaXBlbGluZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblhMUGlwZWxpbmUuZnJvbV9zaW5nbGVfZmlsZShteV9sb2NhbF9jaGVja3BvaW50X3BhdGglMkMlMjBjb25maWclM0RteV9sb2NhbF9jb25maWdfcGF0aCUyQyUyMGxvY2FsX2ZpbGVzX29ubHklM0RUcnVlKQ==",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>,
    allow_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:W,i(s){u||(M(t.$$.fragment,s),u=!0)},o(s){b(t.$$.fragment,s),u=!1},d(s){g(t,s)}}}function pi(T){let t,u,s,p;return t=new B({props:{id:"local",option:"Hub cache directory",$$slots:{default:[fi]},$$scope:{ctx:T}}}),s=new B({props:{id:"local",option:"specific local directory",$$slots:{default:[ri]},$$scope:{ctx:T}}}),{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){b(t.$$.fragment,a),b(s.$$.fragment,a),p=!1},d(a){a&&i(u),g(t,a),g(s,a)}}}function ui(T){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:W,d(s){s&&i(t)}}}function mi(T){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.",U,G,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,Ll='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.',bt,D,gt,R,wt,P,Hl='<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,El='Make sure you have the <a href="https://hf.co/docs/safetensors" rel="nofollow">Safetensors</a> library installed.',Jt,K,Tt,O,Ql="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:",Ut,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/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/main" rel="nofollow">stable-diffusion-v1-5/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,Gt,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>.',jt,se,Dl='LoRAs are loaded into a base model with the <a href="/docs/diffusers/pr_10001/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> method.',vt,ie,kt,Y,Pl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/blueprint-lora.png"/>',Wt,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_10001/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,Yt,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,St,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.",Ft,S,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>',Vt,ce,ls='To load from Diffusers-multifolder layout, use the <a href="/docs/diffusers/pr_10001/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained">from_pretrained()</a> method.',Nt,de,Lt,he,ss="Benefits of using the Diffusers-multifolder layout include:",Ht,j,nt,is="<p>Faster to load each component file individually or in parallel.</p>",Yl,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_10001/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,Sl,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>',Fl,be,ft,os="Flexibility to replace a component in the model with a newer or better version.",Vl,ge,Nl,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>',Et,we,Qt,$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,F,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_10001/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method.',Dt,Te,Pt,Ue,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,Ge,ds="Diffusers provides many scripts and methods to convert storage layouts and file formats to enable broader support across the diffusion ecosystem.",el,je,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,V,ll,ve,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,ke,il,We,Ms='You can also save a model to Diffusers-multifolder layout with the <a href="/docs/diffusers/pr_10001/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,bs='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,gs='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_10001/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method.',rl,Xe,pl,Ye,ws='Pass the file path of the pipeline or model to the <a href="/docs/diffusers/pr_10001/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method to load it.',ul,N,ml,Ie,$s='Customize components in the pipeline by passing them directly to the <a href="/docs/diffusers/pr_10001/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,Se,dl,Fe,Js="Or you could use a ControlNet model in the pipeline.",hl,Ve,yl,Ne,Ml,Le,Ts='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_10001/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.',bl,He,Us="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).",gl,L,wl,Ee,_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_10001/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,H,Jl,Qe,Tl,ze,Zs='In Diffusers&gt;=v0.28.0, the <a href="/docs/diffusers/pr_10001/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.',Ul,qe,Gs='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,js='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,vs='Pass the configuration and checkpoint paths to the <a href="/docs/diffusers/pr_10001/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method to load locally.',Gl,E,jl,Ae,vl,Q,kl,Ke,ks='The <a href="/docs/diffusers/pr_10001/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.',Wl,Oe,xl,et,Ws="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 k({props:{title:"Model files and layouts",local:"model-files-and-layouts",headingTag:"h1"}}),$=new Ls({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 k({props:{title:"Files",local:"files",headingTag:"h2"}}),D=new k({props:{title:"safetensors",local:"safetensors",headingTag:"h3"}}),R=new pt({props:{warning:!1,$$slots:{default:[Es]},$$scope:{ctx:T}}}),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:T}}}),te=new k({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 k({props:{title:"ckpt",local:"ckpt",headingTag:"h3"}}),I=new pt({props:{warning:!0,$$slots:{default:[Ds]},$$scope:{ctx:T}}}),fe=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25QaXBlbGluZS5mcm9tX3NpbmdsZV9maWxlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMkZibG9iJTJGbWFpbiUyRnYxLTUtcHJ1bmVkLmNrcHQlMjIlMEEp",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/stable-diffusion-v1-5/stable-diffusion-v1-5/blob/main/v1-5-pruned.ckpt&quot;</span>
)`,wrap:!1}}),re=new k({props:{title:"Storage layout",local:"storage-layout",headingTag:"h2"}}),ue=new k({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}}),ge=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 k({props:{title:"Single-file",local:"single-file",headingTag:"h3"}}),Te=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 k({props:{title:"Convert layout and files",local:"convert-layout-and-files",headingTag:"h2"}}),V=new pt({props:{warning:!1,$$slots:{default:[Ps]},$$scope:{ctx:T}}}),ke=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 k({props:{title:"Single-file layout usage",local:"single-file-layout-usage",headingTag:"h2"}}),Xe=new k({props:{title:"Load a pipeline or model",local:"load-a-pipeline-or-model",headingTag:"h3"}}),N=new ht({props:{id:"pipeline-model",options:["pipeline","model"],$$slots:{default:[Os]},$$scope:{ctx:T}}}),Se=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}}),Ve=new _({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvbkNvbnRyb2xOZXRQaXBlbGluZSUyQyUyMENvbnRyb2xOZXRNb2RlbCUwQSUwQWNrcHRfcGF0aCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMkZibG9iJTJGbWFpbiUyRnYxLTUtcHJ1bmVkLWVtYW9ubHkuc2FmZXRlbnNvcnMlMjIlMEFjb250cm9sbmV0JTIwJTNEJTIwQ29udHJvbE5ldE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJsbGx5YXN2aWVsJTJGY29udHJvbF92MTFwX3NkMTVfY2FubnklMjIpJTBBcGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25Db250cm9sTmV0UGlwZWxpbmUuZnJvbV9zaW5nbGVfZmlsZShja3B0X3BhdGglMkMlMjBjb250cm9sbmV0JTNEY29udHJvbG5ldCk=",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/stable-diffusion-v1-5/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}}),Ne=new k({props:{title:"Customize configuration options",local:"customize-configuration-options",headingTag:"h3"}}),L=new ht({props:{id:"config-file",options:["Hub configuration file","original configuration file"],$$slots:{default:[ii]},$$scope:{ctx:T}}}),H=new ht({props:{id:"override",options:["pipeline","model"],$$slots:{default:[oi]},$$scope:{ctx:T}}}),Qe=new k({props:{title:"Local files",local:"local-files",headingTag:"h3"}}),E=new ht({props:{id:"local",options:["Hub cache directory","specific local directory"],$$slots:{default:[pi]},$$scope:{ctx:T}}}),Ae=new k({props:{title:"Local files without symlink",local:"local-files-without-symlink",headingTag:"h4"}}),Q=new pt({props:{warning:!1,$$slots:{default:[ui]},$$scope:{ctx:T}}}),Oe=new _({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGhmX2h1Yl9kb3dubG9hZCUyQyUyMHNuYXBzaG90X2Rvd25sb2FkJTBBJTBBbXlfbG9jYWxfY2hlY2twb2ludF9wYXRoJTIwJTNEJTIwaGZfaHViX2Rvd25sb2FkKCUwQSUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjJzZWdtaW5kJTJGU1NELTFCJTIyJTJDJTBBJTIwJTIwJTIwJTIwZmlsZW5hbWUlM0QlMjJTU0QtMUIuc2FmZXRlbnNvcnMlMjIlMEElMjAlMjAlMjAlMjBsb2NhbF9kaXIlM0QlMjJteV9sb2NhbF9jaGVja3BvaW50cyUyMiUyQyUwQSUyMCUyMCUyMCUyMGxvY2FsX2Rpcl91c2Vfc3ltbGlua3MlM0RGYWxzZSUwQSklMEFwcmludCglMjJNeSUyMGxvY2FsJTIwY2hlY2twb2ludCUzQSUyMCUyMiUyQyUyMG15X2xvY2FsX2NoZWNrcG9pbnRfcGF0aCklMEElMEFteV9sb2NhbF9jb25maWdfcGF0aCUyMCUzRCUyMHNuYXBzaG90X2Rvd25sb2FkKCUwQSUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjJzZWdtaW5kJTJGU1NELTFCJTIyJTJDJTBBJTIwJTIwJTIwJTIwYWxsb3dfcGF0dGVybnMlM0QlNUIlMjIqLmpzb24lMjIlMkMlMjAlMjIqKiUyRiouanNvbiUyMiUyQyUyMCUyMioudHh0JTIyJTJDJTIwJTIyKiolMkYqLnR4dCUyMiU1RCUwQSUyMCUyMCUyMCUyMGxvY2FsX2Rpcl91c2Vfc3ltbGlua3MlM0RGYWxzZSUyQyUwQSklMEFwcmludCglMjJNeSUyMGxvY2FsJTIwY29uZmlnJTNBJTIwJTIyJTJDJTIwbXlfbG9jYWxfY29uZmlnX3BhdGgp",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>,
    allow_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 Hs({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,U=f(),G=m("p"),G.textContent=ut,yt=f(),d(z.$$.fragment),Mt=f(),q=m("p"),q.innerHTML=Ll,bt=f(),d(D.$$.fragment),gt=f(),d(R.$$.fragment),wt=f(),P=m("p"),P.innerHTML=Hl,$t=f(),A=m("p"),A.innerHTML=El,Jt=f(),d(K.$$.fragment),Tt=f(),O=m("p"),O.textContent=Ql,Ut=f(),ee=m("ol"),ee.innerHTML=zl,_t=f(),d(X.$$.fragment),Zt=f(),d(te.$$.fragment),Gt=f(),le=m("p"),le.innerHTML=ql,jt=f(),se=m("p"),se.innerHTML=Dl,vt=f(),d(ie.$$.fragment),kt=f(),Y=m("div"),Y.innerHTML=Pl,Wt=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),Yt=f(),pe=m("p"),pe.textContent=Ol,It=f(),d(ue.$$.fragment),St=f(),me=m("p"),me.textContent=es,Ft=f(),S=m("div"),S.innerHTML=ts,Vt=f(),ce=m("p"),ce.innerHTML=ls,Nt=f(),d(de.$$.fragment),Lt=f(),he=m("p"),he.textContent=ss,Ht=f(),j=m("ol"),nt=m("li"),nt.innerHTML=is,Yl=f(),ye=m("li"),at=m("p"),at.innerHTML=ns,Il=f(),d(Me.$$.fragment),Sl=f(),ot=m("li"),ot.innerHTML=as,Fl=f(),be=m("li"),ft=m("p"),ft.textContent=os,Vl=f(),d(ge.$$.fragment),Nl=f(),rt=m("li"),rt.innerHTML=fs,Et=f(),d(we.$$.fragment),Qt=f(),$e=m("p"),$e.textContent=rs,zt=f(),F=m("div"),F.innerHTML=ps,qt=f(),Je=m("p"),Je.innerHTML=us,Dt=f(),d(Te.$$.fragment),Pt=f(),Ue=m("p"),Ue.textContent=ms,At=f(),_e=m("ol"),_e.innerHTML=cs,Kt=f(),d(Ze.$$.fragment),Ot=f(),Ge=m("p"),Ge.textContent=ds,el=f(),je=m("p"),je.innerHTML=hs,tl=f(),d(V.$$.fragment),ll=f(),ve=m("p"),ve.innerHTML=ys,sl=f(),d(ke.$$.fragment),il=f(),We=m("p"),We.innerHTML=Ms,nl=f(),d(xe.$$.fragment),al=f(),Ce=m("p"),Ce.innerHTML=bs,ol=f(),d(Be.$$.fragment),fl=f(),Re=m("p"),Re.innerHTML=gs,rl=f(),d(Xe.$$.fragment),pl=f(),Ye=m("p"),Ye.innerHTML=ws,ul=f(),d(N.$$.fragment),ml=f(),Ie=m("p"),Ie.innerHTML=$s,cl=f(),d(Se.$$.fragment),dl=f(),Fe=m("p"),Fe.textContent=Js,hl=f(),d(Ve.$$.fragment),yl=f(),d(Ne.$$.fragment),Ml=f(),Le=m("p"),Le.innerHTML=Ts,bl=f(),He=m("p"),He.textContent=Us,gl=f(),d(L.$$.fragment),wl=f(),Ee=m("p"),Ee.innerHTML=_s,$l=f(),d(H.$$.fragment),Jl=f(),d(Qe.$$.fragment),Tl=f(),ze=m("p"),ze.innerHTML=Zs,Ul=f(),qe=m("p"),qe.innerHTML=Gs,_l=f(),De=m("p"),De.innerHTML=js,Zl=f(),Pe=m("p"),Pe.innerHTML=vs,Gl=f(),d(E.$$.fragment),jl=f(),d(Ae.$$.fragment),vl=f(),d(Q.$$.fragment),kl=f(),Ke=m("p"),Ke.innerHTML=ks,Wl=f(),d(Oe.$$.fragment),xl=f(),et=m("p"),et.innerHTML=Ws,Cl=f(),d(tt.$$.fragment),Bl=f(),d(lt.$$.fragment),Rl=f(),mt=m("p"),this.h()},l(e){const l=Ns("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),U=r(e),G=c(e,"P",{"data-svelte-h":!0}),w(G)!=="svelte-i9ya2i"&&(G.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=Ll),bt=r(e),h(D.$$.fragment,e),gt=r(e),h(R.$$.fragment,e),wt=r(e),P=c(e,"P",{"data-svelte-h":!0}),w(P)!=="svelte-9jg8rl"&&(P.innerHTML=Hl),$t=r(e),A=c(e,"P",{"data-svelte-h":!0}),w(A)!=="svelte-curlg7"&&(A.innerHTML=El),Jt=r(e),h(K.$$.fragment,e),Tt=r(e),O=c(e,"P",{"data-svelte-h":!0}),w(O)!=="svelte-1yget19"&&(O.textContent=Ql),Ut=r(e),ee=c(e,"OL",{"data-svelte-h":!0}),w(ee)!=="svelte-1kpaoly"&&(ee.innerHTML=zl),_t=r(e),h(X.$$.fragment,e),Zt=r(e),h(te.$$.fragment,e),Gt=r(e),le=c(e,"P",{"data-svelte-h":!0}),w(le)!=="svelte-f23adm"&&(le.innerHTML=ql),jt=r(e),se=c(e,"P",{"data-svelte-h":!0}),w(se)!=="svelte-qpwo70"&&(se.innerHTML=Dl),vt=r(e),h(ie.$$.fragment,e),kt=r(e),Y=c(e,"DIV",{class:!0,"data-svelte-h":!0}),w(Y)!=="svelte-pgqu2t"&&(Y.innerHTML=Pl),Wt=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-1jvt0z4"&&(oe.innerHTML=Kl),Rt=r(e),h(fe.$$.fragment,e),Xt=r(e),h(re.$$.fragment,e),Yt=r(e),pe=c(e,"P",{"data-svelte-h":!0}),w(pe)!=="svelte-bc37k5"&&(pe.textContent=Ol),It=r(e),h(ue.$$.fragment,e),St=r(e),me=c(e,"P",{"data-svelte-h":!0}),w(me)!=="svelte-r6jgt3"&&(me.textContent=es),Ft=r(e),S=c(e,"DIV",{class:!0,"data-svelte-h":!0}),w(S)!=="svelte-1taq59g"&&(S.innerHTML=ts),Vt=r(e),ce=c(e,"P",{"data-svelte-h":!0}),w(ce)!=="svelte-1ey0eox"&&(ce.innerHTML=ls),Nt=r(e),h(de.$$.fragment,e),Lt=r(e),he=c(e,"P",{"data-svelte-h":!0}),w(he)!=="svelte-1s9uno7"&&(he.textContent=ss),Ht=r(e),j=c(e,"OL",{});var x=ct(j);nt=c(x,"LI",{"data-svelte-h":!0}),w(nt)!=="svelte-1ev5mj8"&&(nt.innerHTML=is),Yl=r(x),ye=c(x,"LI",{});var st=ct(ye);at=c(st,"P",{"data-svelte-h":!0}),w(at)!=="svelte-1u3ssm6"&&(at.innerHTML=ns),Il=r(st),h(Me.$$.fragment,st),st.forEach(i),Sl=r(x),ot=c(x,"LI",{"data-svelte-h":!0}),w(ot)!=="svelte-vp6v5d"&&(ot.innerHTML=as),Fl=r(x),be=c(x,"LI",{});var it=ct(be);ft=c(it,"P",{"data-svelte-h":!0}),w(ft)!=="svelte-1acwn3q"&&(ft.textContent=os),Vl=r(it),h(ge.$$.fragment,it),it.forEach(i),Nl=r(x),rt=c(x,"LI",{"data-svelte-h":!0}),w(rt)!=="svelte-xph0z2"&&(rt.innerHTML=fs),x.forEach(i),Et=r(e),h(we.$$.fragment,e),Qt=r(e),$e=c(e,"P",{"data-svelte-h":!0}),w($e)!=="svelte-2us5xv"&&($e.textContent=rs),zt=r(e),F=c(e,"DIV",{class:!0,"data-svelte-h":!0}),w(F)!=="svelte-ysl4o1"&&(F.innerHTML=ps),qt=r(e),Je=c(e,"P",{"data-svelte-h":!0}),w(Je)!=="svelte-uveuiv"&&(Je.innerHTML=us),Dt=r(e),h(Te.$$.fragment,e),Pt=r(e),Ue=c(e,"P",{"data-svelte-h":!0}),w(Ue)!=="svelte-1yex5cv"&&(Ue.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),Ge=c(e,"P",{"data-svelte-h":!0}),w(Ge)!=="svelte-kszp4r"&&(Ge.textContent=ds),el=r(e),je=c(e,"P",{"data-svelte-h":!0}),w(je)!=="svelte-llrwg1"&&(je.innerHTML=hs),tl=r(e),h(V.$$.fragment,e),ll=r(e),ve=c(e,"P",{"data-svelte-h":!0}),w(ve)!=="svelte-r41ob9"&&(ve.innerHTML=ys),sl=r(e),h(ke.$$.fragment,e),il=r(e),We=c(e,"P",{"data-svelte-h":!0}),w(We)!=="svelte-1g3m8sy"&&(We.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=bs),ol=r(e),h(Be.$$.fragment,e),fl=r(e),Re=c(e,"P",{"data-svelte-h":!0}),w(Re)!=="svelte-17kv0t0"&&(Re.innerHTML=gs),rl=r(e),h(Xe.$$.fragment,e),pl=r(e),Ye=c(e,"P",{"data-svelte-h":!0}),w(Ye)!=="svelte-110zqxv"&&(Ye.innerHTML=ws),ul=r(e),h(N.$$.fragment,e),ml=r(e),Ie=c(e,"P",{"data-svelte-h":!0}),w(Ie)!=="svelte-i3kbsf"&&(Ie.innerHTML=$s),cl=r(e),h(Se.$$.fragment,e),dl=r(e),Fe=c(e,"P",{"data-svelte-h":!0}),w(Fe)!=="svelte-mgaprw"&&(Fe.textContent=Js),hl=r(e),h(Ve.$$.fragment,e),yl=r(e),h(Ne.$$.fragment,e),Ml=r(e),Le=c(e,"P",{"data-svelte-h":!0}),w(Le)!=="svelte-ad6i18"&&(Le.innerHTML=Ts),bl=r(e),He=c(e,"P",{"data-svelte-h":!0}),w(He)!=="svelte-h4okww"&&(He.textContent=Us),gl=r(e),h(L.$$.fragment,e),wl=r(e),Ee=c(e,"P",{"data-svelte-h":!0}),w(Ee)!=="svelte-585xum"&&(Ee.innerHTML=_s),$l=r(e),h(H.$$.fragment,e),Jl=r(e),h(Qe.$$.fragment,e),Tl=r(e),ze=c(e,"P",{"data-svelte-h":!0}),w(ze)!=="svelte-1vr6cka"&&(ze.innerHTML=Zs),Ul=r(e),qe=c(e,"P",{"data-svelte-h":!0}),w(qe)!=="svelte-5d71tq"&&(qe.innerHTML=Gs),_l=r(e),De=c(e,"P",{"data-svelte-h":!0}),w(De)!=="svelte-1qs3hmf"&&(De.innerHTML=js),Zl=r(e),Pe=c(e,"P",{"data-svelte-h":!0}),w(Pe)!=="svelte-caap2i"&&(Pe.innerHTML=vs),Gl=r(e),h(E.$$.fragment,e),jl=r(e),h(Ae.$$.fragment,e),vl=r(e),h(Q.$$.fragment,e),kl=r(e),Ke=c(e,"P",{"data-svelte-h":!0}),w(Ke)!=="svelte-idty31"&&(Ke.innerHTML=ks),Wl=r(e),h(Oe.$$.fragment,e),xl=r(e),et=c(e,"P",{"data-svelte-h":!0}),w(et)!=="svelte-15leuyd"&&(et.innerHTML=Ws),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(Y,"class","flex justify-center"),dt(S,"class","flex flex-row gap-4"),dt(F,"class","flex justify-center")},m(e,l){v(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,U,l),n(e,G,l),n(e,yt,l),y(z,e,l),n(e,Mt,l),n(e,q,l),n(e,bt,l),y(D,e,l),n(e,gt,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,Tt,l),n(e,O,l),n(e,Ut,l),n(e,ee,l),n(e,_t,l),y(X,e,l),n(e,Zt,l),y(te,e,l),n(e,Gt,l),n(e,le,l),n(e,jt,l),n(e,se,l),n(e,vt,l),y(ie,e,l),n(e,kt,l),n(e,Y,l),n(e,Wt,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,Yt,l),n(e,pe,l),n(e,It,l),y(ue,e,l),n(e,St,l),n(e,me,l),n(e,Ft,l),n(e,S,l),n(e,Vt,l),n(e,ce,l),n(e,Nt,l),y(de,e,l),n(e,Lt,l),n(e,he,l),n(e,Ht,l),n(e,j,l),v(j,nt),v(j,Yl),v(j,ye),v(ye,at),v(ye,Il),y(Me,ye,null),v(j,Sl),v(j,ot),v(j,Fl),v(j,be),v(be,ft),v(be,Vl),y(ge,be,null),v(j,Nl),v(j,rt),n(e,Et,l),y(we,e,l),n(e,Qt,l),n(e,$e,l),n(e,zt,l),n(e,F,l),n(e,qt,l),n(e,Je,l),n(e,Dt,l),y(Te,e,l),n(e,Pt,l),n(e,Ue,l),n(e,At,l),n(e,_e,l),n(e,Kt,l),y(Ze,e,l),n(e,Ot,l),n(e,Ge,l),n(e,el,l),n(e,je,l),n(e,tl,l),y(V,e,l),n(e,ll,l),n(e,ve,l),n(e,sl,l),y(ke,e,l),n(e,il,l),n(e,We,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,Ye,l),n(e,ul,l),y(N,e,l),n(e,ml,l),n(e,Ie,l),n(e,cl,l),y(Se,e,l),n(e,dl,l),n(e,Fe,l),n(e,hl,l),y(Ve,e,l),n(e,yl,l),y(Ne,e,l),n(e,Ml,l),n(e,Le,l),n(e,bl,l),n(e,He,l),n(e,gl,l),y(L,e,l),n(e,wl,l),n(e,Ee,l),n(e,$l,l),y(H,e,l),n(e,Jl,l),y(Qe,e,l),n(e,Tl,l),n(e,ze,l),n(e,Ul,l),n(e,qe,l),n(e,_l,l),n(e,De,l),n(e,Zl,l),n(e,Pe,l),n(e,Gl,l),y(E,e,l),n(e,jl,l),y(Ae,e,l),n(e,vl,l),y(Q,e,l),n(e,kl,l),n(e,Ke,l),n(e,Wl,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}),V.$set(xs);const Cs={};l&2&&(Cs.$$scope={dirty:l,ctx:e}),N.$set(Cs);const Bs={};l&2&&(Bs.$$scope={dirty:l,ctx:e}),L.$set(Bs);const Rs={};l&2&&(Rs.$$scope={dirty:l,ctx:e}),H.$set(Rs);const Xs={};l&2&&(Xs.$$scope={dirty:l,ctx:e}),E.$set(Xs);const Ys={};l&2&&(Ys.$$scope={dirty:l,ctx:e}),Q.$set(Ys)},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(ge.$$.fragment,e),M(we.$$.fragment,e),M(Te.$$.fragment,e),M(Ze.$$.fragment,e),M(V.$$.fragment,e),M(ke.$$.fragment,e),M(xe.$$.fragment,e),M(Be.$$.fragment,e),M(Xe.$$.fragment,e),M(N.$$.fragment,e),M(Se.$$.fragment,e),M(Ve.$$.fragment,e),M(Ne.$$.fragment,e),M(L.$$.fragment,e),M(H.$$.fragment,e),M(Qe.$$.fragment,e),M(E.$$.fragment,e),M(Ae.$$.fragment,e),M(Q.$$.fragment,e),M(Oe.$$.fragment,e),M(tt.$$.fragment,e),M(lt.$$.fragment,e),Xl=!0)},o(e){b(a.$$.fragment,e),b($.$$.fragment,e),b(z.$$.fragment,e),b(D.$$.fragment,e),b(R.$$.fragment,e),b(K.$$.fragment,e),b(X.$$.fragment,e),b(te.$$.fragment,e),b(ie.$$.fragment,e),b(ne.$$.fragment,e),b(I.$$.fragment,e),b(fe.$$.fragment,e),b(re.$$.fragment,e),b(ue.$$.fragment,e),b(de.$$.fragment,e),b(Me.$$.fragment,e),b(ge.$$.fragment,e),b(we.$$.fragment,e),b(Te.$$.fragment,e),b(Ze.$$.fragment,e),b(V.$$.fragment,e),b(ke.$$.fragment,e),b(xe.$$.fragment,e),b(Be.$$.fragment,e),b(Xe.$$.fragment,e),b(N.$$.fragment,e),b(Se.$$.fragment,e),b(Ve.$$.fragment,e),b(Ne.$$.fragment,e),b(L.$$.fragment,e),b(H.$$.fragment,e),b(Qe.$$.fragment,e),b(E.$$.fragment,e),b(Ae.$$.fragment,e),b(Q.$$.fragment,e),b(Oe.$$.fragment,e),b(tt.$$.fragment,e),b(lt.$$.fragment,e),Xl=!1},d(e){e&&(i(u),i(s),i(p),i(o),i(J),i(Z),i(U),i(G),i(yt),i(Mt),i(q),i(bt),i(gt),i(wt),i(P),i($t),i(A),i(Jt),i(Tt),i(O),i(Ut),i(ee),i(_t),i(Zt),i(Gt),i(le),i(jt),i(se),i(vt),i(kt),i(Y),i(Wt),i(xt),i(Ct),i(ae),i(Bt),i(oe),i(Rt),i(Xt),i(Yt),i(pe),i(It),i(St),i(me),i(Ft),i(S),i(Vt),i(ce),i(Nt),i(Lt),i(he),i(Ht),i(j),i(Et),i(Qt),i($e),i(zt),i(F),i(qt),i(Je),i(Dt),i(Pt),i(Ue),i(At),i(_e),i(Kt),i(Ot),i(Ge),i(el),i(je),i(tl),i(ll),i(ve),i(sl),i(il),i(We),i(nl),i(al),i(Ce),i(ol),i(fl),i(Re),i(rl),i(pl),i(Ye),i(ul),i(ml),i(Ie),i(cl),i(dl),i(Fe),i(hl),i(yl),i(Ml),i(Le),i(bl),i(He),i(gl),i(wl),i(Ee),i($l),i(Jl),i(Tl),i(ze),i(Ul),i(qe),i(_l),i(De),i(Zl),i(Pe),i(Gl),i(jl),i(vl),i(kl),i(Ke),i(Wl),i(xl),i(et),i(Cl),i(Bl),i(Rl),i(mt)),i(t),g(a,e),g($,e),g(z,e),g(D,e),g(R,e),g(K,e),g(X,e),g(te,e),g(ie,e),g(ne,e),g(I,e),g(fe,e),g(re,e),g(ue,e),g(de,e),g(Me),g(ge),g(we,e),g(Te,e),g(Ze,e),g(V,e),g(ke,e),g(xe,e),g(Be,e),g(Xe,e),g(N,e),g(Se,e),g(Ve,e),g(Ne,e),g(L,e),g(H,e),g(Qe,e),g(E,e),g(Ae,e),g(Q,e),g(Oe,e),g(tt,e),g(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(T){return Ss(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ji extends Fs{constructor(t){super(),Vs(this,t,di,mi,Is,{})}}export{Ji as component};
