import{s as Le,o as je,n as Ie}from"../chunks/scheduler.8c3d61f6.js";import{S as Ce,i as We,g as d,s as t,r as c,A as Ge,h as f,f as o,c as l,j as Q,u,x as T,k as E,y as p,a as n,v as g,d as h,t as _,w as b}from"../chunks/index.da70eac4.js";import{D as ue}from"../chunks/Docstring.367be9ed.js";import{C as Ue}from"../chunks/CodeBlock.a9c4becf.js";import{E as De}from"../chunks/ExampleCodeBlock.dd9ee828.js";import{H as ee,E as Ne}from"../chunks/getInferenceSnippets.cb466318.js";function Be(R){let s,x="Examples:",a,m,y;return m=new Ue({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBJTIzJTIwRG93bmxvYWQlMjBwaXBlbGluZSUyMGZyb20lMjBodWdnaW5nZmFjZS5jbyUyMGFuZCUyMGNhY2hlLiUwQXBpcGVsaW5lJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9zaW5nbGVfZmlsZSglMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGV2Fycmlvck1hbWE3NzclMkZPcmFuZ2VNaXhzJTJGYmxvYiUyRm1haW4lMkZNb2RlbHMlMkZBYnlzc09yYW5nZU1peCUyRkFieXNzT3JhbmdlTWl4LnNhZmV0ZW5zb3JzJTIyJTBBKSUwQSUwQSUyMyUyMERvd25sb2FkJTIwcGlwZWxpbmUlMjBmcm9tJTIwbG9jYWwlMjBmaWxlJTBBJTIzJTIwZmlsZSUyMGlzJTIwZG93bmxvYWRlZCUyMHVuZGVyJTIwLiUyRnYxLTUtcHJ1bmVkLWVtYW9ubHkuY2twdCUwQXBpcGVsaW5lJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9zaW5nbGVfZmlsZSglMjIuJTJGdjEtNS1wcnVuZWQtZW1hb25seS5ja3B0JTIyKSUwQSUwQSUyMyUyMEVuYWJsZSUyMGZsb2F0MTYlMjBhbmQlMjBtb3ZlJTIwdG8lMjBHUFUlMEFwaXBlbGluZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lLmZyb21fc2luZ2xlX2ZpbGUoJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyRmJsb2IlMkZtYWluJTJGdjEtNS1wcnVuZWQtZW1hb25seS5ja3B0JTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKSUwQXBpcGVsaW5lLnRvKCUyMmN1ZGElMjIp",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/stable-diffusion-v1-5/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(){s=d("p"),s.textContent=x,a=t(),c(m.$$.fragment)},l(r){s=f(r,"P",{"data-svelte-h":!0}),T(s)!=="svelte-kvfsh7"&&(s.textContent=x),a=l(r),u(m.$$.fragment,r)},m(r,M){n(r,s,M),n(r,a,M),g(m,r,M),y=!0},p:Ie,i(r){y||(h(m.$$.fragment,r),y=!0)},o(r){_(m.$$.fragment,r),y=!1},d(r){r&&(o(s),o(a)),b(m,r)}}}function He(R){let s,x;return s=new Ue({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(){c(s.$$.fragment)},l(a){u(s.$$.fragment,a)},m(a,m){g(s,a,m),x=!0},p:Ie,i(a){x||(h(s.$$.fragment,a),x=!0)},o(a){_(s.$$.fragment,a),x=!1},d(a){b(s,a)}}}function Ve(R){let s,x,a,m,y,r,M,$e='The <a href="/docs/diffusers/main/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> method allows you to load:',ie,D,ve="<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,P,Se='<p>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.</p>',ne,I,se,U,Te='<li><a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline">StableDiffusionPipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline">StableDiffusionImg2ImgPipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline">StableDiffusionInpaintPipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/controlnet#diffusers.StableDiffusionControlNetPipeline">StableDiffusionControlNetPipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/controlnet#diffusers.StableDiffusionControlNetImg2ImgPipeline">StableDiffusionControlNetImg2ImgPipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/controlnet#diffusers.StableDiffusionControlNetInpaintPipeline">StableDiffusionControlNetInpaintPipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/upscale#diffusers.StableDiffusionUpscalePipeline">StableDiffusionUpscalePipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/stable_diffusion_xl#diffusers.StableDiffusionXLPipeline">StableDiffusionXLPipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/stable_diffusion_xl#diffusers.StableDiffusionXLImg2ImgPipeline">StableDiffusionXLImg2ImgPipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/stable_diffusion_xl#diffusers.StableDiffusionXLInpaintPipeline">StableDiffusionXLInpaintPipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/pix2pix#diffusers.StableDiffusionXLInstructPix2PixPipeline">StableDiffusionXLInstructPix2PixPipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/controlnet_sdxl#diffusers.StableDiffusionXLControlNetPipeline">StableDiffusionXLControlNetPipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/k_diffusion#diffusers.StableDiffusionXLKDiffusionPipeline">StableDiffusionXLKDiffusionPipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/stable_diffusion_3#diffusers.StableDiffusion3Pipeline">StableDiffusion3Pipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/latent_consistency_models#diffusers.LatentConsistencyModelPipeline">LatentConsistencyModelPipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/latent_consistency_models#diffusers.LatentConsistencyModelImg2ImgPipeline">LatentConsistencyModelImg2ImgPipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/controlnetxs#diffusers.StableDiffusionControlNetXSPipeline">StableDiffusionControlNetXSPipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/controlnetxs_sdxl#diffusers.StableDiffusionXLControlNetXSPipeline">StableDiffusionXLControlNetXSPipeline</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/ledits_pp#diffusers.LEditsPPPipelineStableDiffusion">LEditsPPPipelineStableDiffusion</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/ledits_pp#diffusers.LEditsPPPipelineStableDiffusionXL">LEditsPPPipelineStableDiffusionXL</a></li> <li><a href="/docs/diffusers/main/en/api/pipelines/pia#diffusers.PIAPipeline">PIAPipeline</a></li>',te,L,le,j,Fe='<li><a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a></li> <li><code>StableCascadeUNet</code></li> <li><a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a></li> <li><a href="/docs/diffusers/main/en/api/models/controlnet#diffusers.ControlNetModel">ControlNetModel</a></li> <li><a href="/docs/diffusers/main/en/api/models/sd3_transformer2d#diffusers.SD3Transformer2DModel">SD3Transformer2DModel</a></li> <li><a href="/docs/diffusers/main/en/api/models/flux_transformer#diffusers.FluxTransformer2DModel">FluxTransformer2DModel</a></li>',ae,C,re,w,W,ge,X,ke='Load model weights saved in the <code>.ckpt</code> format into a <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>.',he,v,G,_e,O,Pe=`Instantiate a <a href="/docs/diffusers/main/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,J,de,N,fe,$,B,xe,Y,Je="Load pretrained weights saved in the <code>.ckpt</code> or <code>.safetensors</code> format into a model.",ye,S,H,Me,q,Ze=`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,Z,pe,V,me,K,ce;return y=new ee({props:{title:"Single files",local:"single-files",headingTag:"h1"}}),I=new ee({props:{title:"Supported pipelines",local:"supported-pipelines",headingTag:"h2"}}),L=new ee({props:{title:"Supported models",local:"supported-models",headingTag:"h2"}}),C=new ee({props:{title:"FromSingleFileMixin",local:"diffusers.loaders.FromSingleFileMixin",headingTag:"h2"}}),W=new ue({props:{name:"class diffusers.loaders.FromSingleFileMixin",anchor:"diffusers.loaders.FromSingleFileMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/single_file.py#L266"}}),G=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:</p>
<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.`,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:</p>
<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.disable_mmap",description:`<strong>disable_mmap</strong> (&#x2018;bool&#x2019;, <em>optional</em>, defaults to &#x2018;False&#x2019;) &#x2014;
Whether to disable mmap when loading a Safetensors model. This option can perform better when the model
is on a network mount or hard drive.`,name:"disable_mmap"},{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/main/src/diffusers/loaders/single_file.py#L271"}}),J=new De({props:{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.example",$$slots:{default:[Be]},$$scope:{ctx:R}}}),N=new ee({props:{title:"FromOriginalModelMixin",local:"diffusers.loaders.FromOriginalModelMixin",headingTag:"h2"}}),B=new ue({props:{name:"class diffusers.loaders.FromOriginalModelMixin",anchor:"diffusers.loaders.FromOriginalModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/single_file_model.py#L194"}}),H=new ue({props:{name:"from_single_file",anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file",parameters:[{name:"pretrained_model_link_or_path_or_dict",val:": typing.Optional[str] = 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:</p>
<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;</p>
<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>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.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.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.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code> if torch version &gt;= 1.9.0 and &#x2014;
is_accelerate_available() else <code>False</code>): Speed up model loading only loading the pretrained weights and
not initializing the weights. This also tries to not use more than 1x model size in CPU memory
(including peak memory) while loading the model. Only supported for PyTorch &gt;= 1.9.0. If you are using
an older version of PyTorch, setting this argument to <code>True</code> will raise an error.`,name:"low_cpu_mem_usage"},{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.disable_mmap",description:`<strong>disable_mmap</strong> (&#x2018;bool&#x2019;, <em>optional</em>, defaults to &#x2018;False&#x2019;) &#x2014;
Whether to disable mmap when loading a Safetensors model. This option can perform better when the model
is on a network mount or hard drive, which may not handle the seeky-ness of mmap very well.`,name:"disable_mmap"},{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/main/src/diffusers/loaders/single_file_model.py#L199"}}),Z=new De({props:{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.example",$$slots:{default:[He]},$$scope:{ctx:R}}}),V=new Ne({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/loaders/single_file.md"}}),{c(){s=d("meta"),x=t(),a=d("p"),m=t(),c(y.$$.fragment),r=t(),M=d("p"),M.innerHTML=$e,ie=t(),D=d("ul"),D.innerHTML=ve,oe=t(),P=d("blockquote"),P.innerHTML=Se,ne=t(),c(I.$$.fragment),se=t(),U=d("ul"),U.innerHTML=Te,te=t(),c(L.$$.fragment),le=t(),j=d("ul"),j.innerHTML=Fe,ae=t(),c(C.$$.fragment),re=t(),w=d("div"),c(W.$$.fragment),ge=t(),X=d("p"),X.innerHTML=ke,he=t(),v=d("div"),c(G.$$.fragment),_e=t(),O=d("p"),O.innerHTML=Pe,be=t(),c(J.$$.fragment),de=t(),c(N.$$.fragment),fe=t(),$=d("div"),c(B.$$.fragment),xe=t(),Y=d("p"),Y.innerHTML=Je,ye=t(),S=d("div"),c(H.$$.fragment),Me=t(),q=d("p"),q.innerHTML=Ze,we=t(),c(Z.$$.fragment),pe=t(),c(V.$$.fragment),me=t(),K=d("p"),this.h()},l(e){const i=Ge("svelte-u9bgzb",document.head);s=f(i,"META",{name:!0,content:!0}),i.forEach(o),x=l(e),a=f(e,"P",{}),Q(a).forEach(o),m=l(e),u(y.$$.fragment,e),r=l(e),M=f(e,"P",{"data-svelte-h":!0}),T(M)!=="svelte-qpwkxd"&&(M.innerHTML=$e),ie=l(e),D=f(e,"UL",{"data-svelte-h":!0}),T(D)!=="svelte-4h4p7d"&&(D.innerHTML=ve),oe=l(e),P=f(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),T(P)!=="svelte-1izmoqn"&&(P.innerHTML=Se),ne=l(e),u(I.$$.fragment,e),se=l(e),U=f(e,"UL",{"data-svelte-h":!0}),T(U)!=="svelte-1yab7oc"&&(U.innerHTML=Te),te=l(e),u(L.$$.fragment,e),le=l(e),j=f(e,"UL",{"data-svelte-h":!0}),T(j)!=="svelte-ke012g"&&(j.innerHTML=Fe),ae=l(e),u(C.$$.fragment,e),re=l(e),w=f(e,"DIV",{class:!0});var F=Q(w);u(W.$$.fragment,F),ge=l(F),X=f(F,"P",{"data-svelte-h":!0}),T(X)!=="svelte-11v9qjy"&&(X.innerHTML=ke),he=l(F),v=f(F,"DIV",{class:!0});var k=Q(v);u(G.$$.fragment,k),_e=l(k),O=f(k,"P",{"data-svelte-h":!0}),T(O)!=="svelte-pmqrln"&&(O.innerHTML=Pe),be=l(k),u(J.$$.fragment,k),k.forEach(o),F.forEach(o),de=l(e),u(N.$$.fragment,e),fe=l(e),$=f(e,"DIV",{class:!0});var z=Q($);u(B.$$.fragment,z),xe=l(z),Y=f(z,"P",{"data-svelte-h":!0}),T(Y)!=="svelte-1angwv3"&&(Y.innerHTML=Je),ye=l(z),S=f(z,"DIV",{class:!0});var A=Q(S);u(H.$$.fragment,A),Me=l(A),q=f(A,"P",{"data-svelte-h":!0}),T(q)!=="svelte-vw4n4o"&&(q.innerHTML=Ze),we=l(A),u(Z.$$.fragment,A),A.forEach(o),z.forEach(o),pe=l(e),u(V.$$.fragment,e),me=l(e),K=f(e,"P",{}),Q(K).forEach(o),this.h()},h(){E(s,"name","hf:doc:metadata"),E(s,"content",Ee),E(P,"class","tip"),E(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),E(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),E(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),E($,"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){p(document.head,s),n(e,x,i),n(e,a,i),n(e,m,i),g(y,e,i),n(e,r,i),n(e,M,i),n(e,ie,i),n(e,D,i),n(e,oe,i),n(e,P,i),n(e,ne,i),g(I,e,i),n(e,se,i),n(e,U,i),n(e,te,i),g(L,e,i),n(e,le,i),n(e,j,i),n(e,ae,i),g(C,e,i),n(e,re,i),n(e,w,i),g(W,w,null),p(w,ge),p(w,X),p(w,he),p(w,v),g(G,v,null),p(v,_e),p(v,O),p(v,be),g(J,v,null),n(e,de,i),g(N,e,i),n(e,fe,i),n(e,$,i),g(B,$,null),p($,xe),p($,Y),p($,ye),p($,S),g(H,S,null),p(S,Me),p(S,q),p(S,we),g(Z,S,null),n(e,pe,i),g(V,e,i),n(e,me,i),n(e,K,i),ce=!0},p(e,[i]){const F={};i&2&&(F.$$scope={dirty:i,ctx:e}),J.$set(F);const k={};i&2&&(k.$$scope={dirty:i,ctx:e}),Z.$set(k)},i(e){ce||(h(y.$$.fragment,e),h(I.$$.fragment,e),h(L.$$.fragment,e),h(C.$$.fragment,e),h(W.$$.fragment,e),h(G.$$.fragment,e),h(J.$$.fragment,e),h(N.$$.fragment,e),h(B.$$.fragment,e),h(H.$$.fragment,e),h(Z.$$.fragment,e),h(V.$$.fragment,e),ce=!0)},o(e){_(y.$$.fragment,e),_(I.$$.fragment,e),_(L.$$.fragment,e),_(C.$$.fragment,e),_(W.$$.fragment,e),_(G.$$.fragment,e),_(J.$$.fragment,e),_(N.$$.fragment,e),_(B.$$.fragment,e),_(H.$$.fragment,e),_(Z.$$.fragment,e),_(V.$$.fragment,e),ce=!1},d(e){e&&(o(x),o(a),o(m),o(r),o(M),o(ie),o(D),o(oe),o(P),o(ne),o(se),o(U),o(te),o(le),o(j),o(ae),o(re),o(w),o(de),o(fe),o($),o(pe),o(me),o(K)),o(s),b(y,e),b(I,e),b(L,e),b(C,e),b(W),b(G),b(J),b(N,e),b(B),b(H),b(Z),b(V,e)}}}const Ee='{"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(R){return je(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Qe extends Ce{constructor(s){super(),We(this,s,Re,Ve,Le,{})}}export{Qe as component};
