import{s as Je,o as Le,n as ve}from"../chunks/scheduler.8c3d61f6.js";import{S as je,i as We,g as d,s as l,r as u,A as Ce,h as f,f as o,c as a,j as z,u as g,x as T,k as Q,y as m,a as s,v as h,d as _,t as b,w as M}from"../chunks/index.589a98e8.js";import{T as Ge}from"../chunks/Tip.42aa8582.js";import{D as ue}from"../chunks/Docstring.c1070b88.js";import{C as Ie}from"../chunks/CodeBlock.36627b28.js";import{E as Ue}from"../chunks/ExampleCodeBlock.53ef45e9.js";import{H as ee,E as Ne}from"../chunks/EditOnGithub.e5a8d9cb.js";function He(Z){let n,c='Read the <a href="../../using-diffusers/other-formats">Model files and layouts</a> guide to learn more about the Diffusers-multifolder layout versus the single-file layout, and how to load models stored in these different layouts.';return{c(){n=d("p"),n.innerHTML=c},l(t){n=f(t,"P",{"data-svelte-h":!0}),T(n)!=="svelte-7ol9a4"&&(n.innerHTML=c)},m(t,p){s(t,n,p)},p:ve,d(t){t&&o(n)}}}function Be(Z){let n,c="Examples:",t,p,x;return p=new Ie({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBJTIzJTIwRG93bmxvYWQlMjBwaXBlbGluZSUyMGZyb20lMjBodWdnaW5nZmFjZS5jbyUyMGFuZCUyMGNhY2hlLiUwQXBpcGVsaW5lJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9zaW5nbGVfZmlsZSglMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGV2Fycmlvck1hbWE3NzclMkZPcmFuZ2VNaXhzJTJGYmxvYiUyRm1haW4lMkZNb2RlbHMlMkZBYnlzc09yYW5nZU1peCUyRkFieXNzT3JhbmdlTWl4LnNhZmV0ZW5zb3JzJTIyJTBBKSUwQSUwQSUyMyUyMERvd25sb2FkJTIwcGlwZWxpbmUlMjBmcm9tJTIwbG9jYWwlMjBmaWxlJTBBJTIzJTIwZmlsZSUyMGlzJTIwZG93bmxvYWRlZCUyMHVuZGVyJTIwLiUyRnYxLTUtcHJ1bmVkLWVtYW9ubHkuY2twdCUwQXBpcGVsaW5lJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9zaW5nbGVfZmlsZSglMjIuJTJGdjEtNS1wcnVuZWQtZW1hb25seS5ja3B0JTIyKSUwQSUwQSUyMyUyMEVuYWJsZSUyMGZsb2F0MTYlMjBhbmQlMjBtb3ZlJTIwdG8lMjBHUFUlMEFwaXBlbGluZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lLmZyb21fc2luZ2xlX2ZpbGUoJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTJGYmxvYiUyRm1haW4lMkZ2MS01LXBydW5lZC1lbWFvbmx5LmNrcHQlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEEpJTBBcGlwZWxpbmUudG8oJTIyY3VkYSUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download pipeline from huggingface.co and cache.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = StableDiffusionPipeline.from_single_file(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/WarriorMama777/OrangeMixs/blob/main/Models/AbyssOrangeMix/AbyssOrangeMix.safetensors&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download pipeline from local file</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># file is downloaded under ./v1-5-pruned-emaonly.ckpt</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = StableDiffusionPipeline.from_single_file(<span class="hljs-string">&quot;./v1-5-pruned-emaonly.ckpt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Enable float16 and move to GPU</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = StableDiffusionPipeline.from_single_file(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned-emaonly.ckpt&quot;</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),{c(){n=d("p"),n.textContent=c,t=l(),u(p.$$.fragment)},l(r){n=f(r,"P",{"data-svelte-h":!0}),T(n)!=="svelte-kvfsh7"&&(n.textContent=c),t=a(r),g(p.$$.fragment,r)},m(r,y){s(r,n,y),s(r,t,y),h(p,r,y),x=!0},p:ve,i(r){x||(_(p.$$.fragment,r),x=!0)},o(r){b(p.$$.fragment,r),x=!1},d(r){r&&(o(n),o(t)),M(p,r)}}}function Ve(Z){let n,c;return n=new Ie({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZUNhc2NhZGVVTmV0JTBBJTBBY2twdF9wYXRoJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRnN0YWJpbGl0eWFpJTJGc3RhYmxlLWNhc2NhZGUlMkZibG9iJTJGbWFpbiUyRnN0YWdlX2JfbGl0ZS5zYWZldGVuc29ycyUyMiUwQW1vZGVsJTIwJTNEJTIwU3RhYmxlQ2FzY2FkZVVOZXQuZnJvbV9zaW5nbGVfZmlsZShja3B0X3BhdGgp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableCascadeUNet

<span class="hljs-meta">&gt;&gt;&gt; </span>ckpt_path = <span class="hljs-string">&quot;https://huggingface.co/stabilityai/stable-cascade/blob/main/stage_b_lite.safetensors&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = StableCascadeUNet.from_single_file(ckpt_path)`,wrap:!1}}),{c(){u(n.$$.fragment)},l(t){g(n.$$.fragment,t)},m(t,p){h(n,t,p),c=!0},p:ve,i(t){c||(_(n.$$.fragment,t),c=!0)},o(t){b(n.$$.fragment,t),c=!1},d(t){M(n,t)}}}function Ee(Z){let n,c,t,p,x,r,y,$e='The <a href="/docs/diffusers/v0.29.2/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method allows you to load:',ie,J,Se="<li>a model stored in a single file, which is useful if you’re working with models from the diffusion ecosystem, like Automatic1111, and commonly rely on a single-file layout to store and share models</li> <li>a model stored in their originally distributed layout, which is useful if you’re working with models finetuned with other services, and want to load it directly into Diffusers model objects and pipelines</li>",oe,D,ne,L,te,j,Te='<li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline">StableDiffusionPipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline">StableDiffusionImg2ImgPipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline">StableDiffusionInpaintPipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/controlnet#diffusers.StableDiffusionControlNetPipeline">StableDiffusionControlNetPipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/controlnet#diffusers.StableDiffusionControlNetImg2ImgPipeline">StableDiffusionControlNetImg2ImgPipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/controlnet#diffusers.StableDiffusionControlNetInpaintPipeline">StableDiffusionControlNetInpaintPipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/stable_diffusion/upscale#diffusers.StableDiffusionUpscalePipeline">StableDiffusionUpscalePipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/stable_diffusion/stable_diffusion_xl#diffusers.StableDiffusionXLPipeline">StableDiffusionXLPipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/stable_diffusion/stable_diffusion_xl#diffusers.StableDiffusionXLImg2ImgPipeline">StableDiffusionXLImg2ImgPipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/stable_diffusion/stable_diffusion_xl#diffusers.StableDiffusionXLInpaintPipeline">StableDiffusionXLInpaintPipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/pix2pix#diffusers.StableDiffusionXLInstructPix2PixPipeline">StableDiffusionXLInstructPix2PixPipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/controlnet_sdxl#diffusers.StableDiffusionXLControlNetPipeline">StableDiffusionXLControlNetPipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/stable_diffusion/k_diffusion#diffusers.StableDiffusionXLKDiffusionPipeline">StableDiffusionXLKDiffusionPipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/stable_diffusion/stable_diffusion_3#diffusers.StableDiffusion3Pipeline">StableDiffusion3Pipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/latent_consistency_models#diffusers.LatentConsistencyModelPipeline">LatentConsistencyModelPipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/latent_consistency_models#diffusers.LatentConsistencyModelImg2ImgPipeline">LatentConsistencyModelImg2ImgPipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/controlnetxs#diffusers.StableDiffusionControlNetXSPipeline">StableDiffusionControlNetXSPipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/controlnetxs_sdxl#diffusers.StableDiffusionXLControlNetXSPipeline">StableDiffusionXLControlNetXSPipeline</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/ledits_pp#diffusers.LEditsPPPipelineStableDiffusion">LEditsPPPipelineStableDiffusion</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/ledits_pp#diffusers.LEditsPPPipelineStableDiffusionXL">LEditsPPPipelineStableDiffusionXL</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/pipelines/pia#diffusers.PIAPipeline">PIAPipeline</a></li>',se,W,le,C,Fe='<li><a href="/docs/diffusers/v0.29.2/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a></li> <li><code>StableCascadeUNet</code></li> <li><a href="/docs/diffusers/v0.29.2/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/models/controlnet#diffusers.ControlNetModel">ControlNetModel</a></li> <li><a href="/docs/diffusers/v0.29.2/en/api/models/sd3_transformer2d#diffusers.SD3Transformer2DModel">SD3Transformer2DModel</a></li>',ae,G,re,w,N,ge,R,Pe='Load model weights saved in the <code>.ckpt</code> format into a <a href="/docs/diffusers/v0.29.2/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>.',he,$,H,_e,X,ke=`Instantiate a <a href="/docs/diffusers/v0.29.2/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a> from pretrained pipeline weights saved in the <code>.ckpt</code> or <code>.safetensors</code>
format. The pipeline is set in evaluation mode (<code>model.eval()</code>) by default.`,be,U,de,B,fe,v,V,Me,O,Ze="Load pretrained weights saved in the <code>.ckpt</code> or <code>.safetensors</code> format into a model.",xe,S,E,ye,A,De=`Instantiate a model from pretrained weights saved in the original <code>.ckpt</code> or <code>.safetensors</code> format. The model
is set in evaluation mode (<code>model.eval()</code>) by default.`,we,I,pe,Y,ce,K,me;return x=new ee({props:{title:"Single files",local:"single-files",headingTag:"h1"}}),D=new Ge({props:{warning:!1,$$slots:{default:[He]},$$scope:{ctx:Z}}}),L=new ee({props:{title:"Supported pipelines",local:"supported-pipelines",headingTag:"h2"}}),W=new ee({props:{title:"Supported models",local:"supported-models",headingTag:"h2"}}),G=new ee({props:{title:"FromSingleFileMixin",local:"diffusers.loaders.FromSingleFileMixin",headingTag:"h2"}}),N=new ue({props:{name:"class diffusers.loaders.FromSingleFileMixin",anchor:"diffusers.loaders.FromSingleFileMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.29.2/src/diffusers/loaders/single_file.py#L265"}}),H=new ue({props:{name:"from_single_file",anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file",parameters:[{name:"pretrained_model_link_or_path",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.pretrained_model_link_or_path",description:`<strong>pretrained_model_link_or_path</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Can be either:<ul>
<li>A link to the <code>.ckpt</code> file (for example
<code>&quot;https://huggingface.co/&lt;repo_id&gt;/blob/main/&lt;path_to_file&gt;.ckpt&quot;</code>) on the Hub.</li>
<li>A path to a <em>file</em> containing all pipeline weights.</li>
</ul>`,name:"pretrained_model_link_or_path"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code> or <code>torch.dtype</code>, <em>optional</em>) &#x2014;
Override the default <code>torch.dtype</code> and load the model with another dtype.`,name:"torch_dtype"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.
resume_download &#x2014;
Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
of Diffusers.`,name:"cache_dir"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.token",description:`<strong>token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"token"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.original_config_file",description:`<strong>original_config_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The path to the original config file that was used to train the model. If not provided, the config file
will be inferred from the checkpoint file.`,name:"original_config_file"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.config",description:`<strong>config</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Can be either:<ul>
<li>A string, the <em>repo id</em> (for example <code>CompVis/ldm-text2im-large-256</code>) of a pretrained pipeline
hosted on the Hub.</li>
<li>A path to a <em>directory</em> (for example <code>./my_pipeline_directory/</code>) containing the pipeline
component configs in Diffusers format.</li>
</ul>`,name:"config"},{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) &#x2014;
Can be used to overwrite load and saveable variables (the pipeline components of the specific pipeline
class). The overwritten components are passed directly to the pipelines <code>__init__</code> method. See example
below for more information.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.29.2/src/diffusers/loaders/single_file.py#L270"}}),U=new Ue({props:{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.example",$$slots:{default:[Be]},$$scope:{ctx:Z}}}),B=new ee({props:{title:"FromOriginalModelMixin",local:"diffusers.loaders.FromOriginalModelMixin",headingTag:"h2"}}),V=new ue({props:{name:"class diffusers.loaders.FromOriginalModelMixin",anchor:"diffusers.loaders.FromOriginalModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.29.2/src/diffusers/loaders/single_file_model.py#L86"}}),E=new ue({props:{name:"from_single_file",anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file",parameters:[{name:"pretrained_model_link_or_path_or_dict",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.pretrained_model_link_or_path_or_dict",description:`<strong>pretrained_model_link_or_path_or_dict</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Can be either:<ul>
<li>A link to the <code>.safetensors</code> or <code>.ckpt</code> file (for example
<code>&quot;https://huggingface.co/&lt;repo_id&gt;/blob/main/&lt;path_to_file&gt;.safetensors&quot;</code>) on the Hub.</li>
<li>A path to a local <em>file</em> containing the weights of the component model.</li>
<li>A state dict containing the component model weights.</li>
</ul>`,name:"pretrained_model_link_or_path_or_dict"},{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.config",description:`<strong>config</strong> (<code>str</code>, <em>optional</em>) &#x2014;<ul>
<li>A string, the <em>repo id</em> (for example <code>CompVis/ldm-text2im-large-256</code>) of a pretrained pipeline hosted
on the Hub.</li>
<li>A path to a <em>directory</em> (for example <code>./my_pipeline_directory/</code>) containing the pipeline component
configs in Diffusers format.</li>
</ul>`,name:"config"},{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
The subfolder location of a model file within a larger model repository on the Hub or locally.`,name:"subfolder"},{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.original_config",description:`<strong>original_config</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Dict or path to a yaml file containing the configuration for the model in its original format.
If a dict is provided, it will be used to initialize the model configuration.`,name:"original_config"},{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code> or <code>torch.dtype</code>, <em>optional</em>) &#x2014;
Override the default <code>torch.dtype</code> and load the model with another dtype. If <code>&quot;auto&quot;</code> is passed, the
dtype is automatically derived from the model&#x2019;s weights.`,name:"torch_dtype"},{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to True, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.token",description:`<strong>token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"token"},{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) &#x2014;
Can be used to overwrite load and saveable variables (for example the pipeline components of the
specific pipeline class). The overwritten components are directly passed to the pipelines <code>__init__</code>
method. See example below for more information.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.29.2/src/diffusers/loaders/single_file_model.py#L91"}}),I=new Ue({props:{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.example",$$slots:{default:[Ve]},$$scope:{ctx:Z}}}),Y=new Ne({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/loaders/single_file.md"}}),{c(){n=d("meta"),c=l(),t=d("p"),p=l(),u(x.$$.fragment),r=l(),y=d("p"),y.innerHTML=$e,ie=l(),J=d("ul"),J.innerHTML=Se,oe=l(),u(D.$$.fragment),ne=l(),u(L.$$.fragment),te=l(),j=d("ul"),j.innerHTML=Te,se=l(),u(W.$$.fragment),le=l(),C=d("ul"),C.innerHTML=Fe,ae=l(),u(G.$$.fragment),re=l(),w=d("div"),u(N.$$.fragment),ge=l(),R=d("p"),R.innerHTML=Pe,he=l(),$=d("div"),u(H.$$.fragment),_e=l(),X=d("p"),X.innerHTML=ke,be=l(),u(U.$$.fragment),de=l(),u(B.$$.fragment),fe=l(),v=d("div"),u(V.$$.fragment),Me=l(),O=d("p"),O.innerHTML=Ze,xe=l(),S=d("div"),u(E.$$.fragment),ye=l(),A=d("p"),A.innerHTML=De,we=l(),u(I.$$.fragment),pe=l(),u(Y.$$.fragment),ce=l(),K=d("p"),this.h()},l(e){const i=Ce("svelte-u9bgzb",document.head);n=f(i,"META",{name:!0,content:!0}),i.forEach(o),c=a(e),t=f(e,"P",{}),z(t).forEach(o),p=a(e),g(x.$$.fragment,e),r=a(e),y=f(e,"P",{"data-svelte-h":!0}),T(y)!=="svelte-198mwb1"&&(y.innerHTML=$e),ie=a(e),J=f(e,"UL",{"data-svelte-h":!0}),T(J)!=="svelte-4h4p7d"&&(J.innerHTML=Se),oe=a(e),g(D.$$.fragment,e),ne=a(e),g(L.$$.fragment,e),te=a(e),j=f(e,"UL",{"data-svelte-h":!0}),T(j)!=="svelte-14ecx0w"&&(j.innerHTML=Te),se=a(e),g(W.$$.fragment,e),le=a(e),C=f(e,"UL",{"data-svelte-h":!0}),T(C)!=="svelte-1we39ya"&&(C.innerHTML=Fe),ae=a(e),g(G.$$.fragment,e),re=a(e),w=f(e,"DIV",{class:!0});var F=z(w);g(N.$$.fragment,F),ge=a(F),R=f(F,"P",{"data-svelte-h":!0}),T(R)!=="svelte-2dbsrm"&&(R.innerHTML=Pe),he=a(F),$=f(F,"DIV",{class:!0});var P=z($);g(H.$$.fragment,P),_e=a(P),X=f(P,"P",{"data-svelte-h":!0}),T(X)!=="svelte-1mnptmz"&&(X.innerHTML=ke),be=a(P),g(U.$$.fragment,P),P.forEach(o),F.forEach(o),de=a(e),g(B.$$.fragment,e),fe=a(e),v=f(e,"DIV",{class:!0});var k=z(v);g(V.$$.fragment,k),Me=a(k),O=f(k,"P",{"data-svelte-h":!0}),T(O)!=="svelte-1angwv3"&&(O.innerHTML=Ze),xe=a(k),S=f(k,"DIV",{class:!0});var q=z(S);g(E.$$.fragment,q),ye=a(q),A=f(q,"P",{"data-svelte-h":!0}),T(A)!=="svelte-vw4n4o"&&(A.innerHTML=De),we=a(q),g(I.$$.fragment,q),q.forEach(o),k.forEach(o),pe=a(e),g(Y.$$.fragment,e),ce=a(e),K=f(e,"P",{}),z(K).forEach(o),this.h()},h(){Q(n,"name","hf:doc:metadata"),Q(n,"content",Ye),Q($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Q(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Q(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Q(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,i){m(document.head,n),s(e,c,i),s(e,t,i),s(e,p,i),h(x,e,i),s(e,r,i),s(e,y,i),s(e,ie,i),s(e,J,i),s(e,oe,i),h(D,e,i),s(e,ne,i),h(L,e,i),s(e,te,i),s(e,j,i),s(e,se,i),h(W,e,i),s(e,le,i),s(e,C,i),s(e,ae,i),h(G,e,i),s(e,re,i),s(e,w,i),h(N,w,null),m(w,ge),m(w,R),m(w,he),m(w,$),h(H,$,null),m($,_e),m($,X),m($,be),h(U,$,null),s(e,de,i),h(B,e,i),s(e,fe,i),s(e,v,i),h(V,v,null),m(v,Me),m(v,O),m(v,xe),m(v,S),h(E,S,null),m(S,ye),m(S,A),m(S,we),h(I,S,null),s(e,pe,i),h(Y,e,i),s(e,ce,i),s(e,K,i),me=!0},p(e,[i]){const F={};i&2&&(F.$$scope={dirty:i,ctx:e}),D.$set(F);const P={};i&2&&(P.$$scope={dirty:i,ctx:e}),U.$set(P);const k={};i&2&&(k.$$scope={dirty:i,ctx:e}),I.$set(k)},i(e){me||(_(x.$$.fragment,e),_(D.$$.fragment,e),_(L.$$.fragment,e),_(W.$$.fragment,e),_(G.$$.fragment,e),_(N.$$.fragment,e),_(H.$$.fragment,e),_(U.$$.fragment,e),_(B.$$.fragment,e),_(V.$$.fragment,e),_(E.$$.fragment,e),_(I.$$.fragment,e),_(Y.$$.fragment,e),me=!0)},o(e){b(x.$$.fragment,e),b(D.$$.fragment,e),b(L.$$.fragment,e),b(W.$$.fragment,e),b(G.$$.fragment,e),b(N.$$.fragment,e),b(H.$$.fragment,e),b(U.$$.fragment,e),b(B.$$.fragment,e),b(V.$$.fragment,e),b(E.$$.fragment,e),b(I.$$.fragment,e),b(Y.$$.fragment,e),me=!1},d(e){e&&(o(c),o(t),o(p),o(r),o(y),o(ie),o(J),o(oe),o(ne),o(te),o(j),o(se),o(le),o(C),o(ae),o(re),o(w),o(de),o(fe),o(v),o(pe),o(ce),o(K)),o(n),M(x,e),M(D,e),M(L,e),M(W,e),M(G,e),M(N),M(H),M(U),M(B,e),M(V),M(E),M(I),M(Y,e)}}}const Ye='{"title":"Single files","local":"single-files","sections":[{"title":"Supported pipelines","local":"supported-pipelines","sections":[],"depth":2},{"title":"Supported models","local":"supported-models","sections":[],"depth":2},{"title":"FromSingleFileMixin","local":"diffusers.loaders.FromSingleFileMixin","sections":[],"depth":2},{"title":"FromOriginalModelMixin","local":"diffusers.loaders.FromOriginalModelMixin","sections":[],"depth":2}],"depth":1}';function Re(Z){return Le(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ei extends je{constructor(n){super(),We(this,n,Re,Ee,Je,{})}}export{ei as component};
