import{s as Ce,o as We,n as Le}from"../chunks/scheduler.53228c21.js";import{S as Ge,i as Ne,e as d,s,c as m,h as Be,a as f,d as o,b as l,f as K,g as c,j as T,k as R,l as p,m as n,n as u,t as g,o as h,p as _}from"../chunks/index.100fac89.js";import{C as He}from"../chunks/CopyLLMTxtMenu.2cdbb51f.js";import{D as he}from"../chunks/Docstring.d46840f1.js";import{C as je}from"../chunks/CodeBlock.d30a6509.js";import{E as Ue}from"../chunks/ExampleCodeBlock.220b4f6e.js";import{H as ie,E as Ve}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.3fcbbc76.js";function Ee(X){let t,x="Examples:",a,b,y;return b=new je({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(){t=d("p"),t.textContent=x,a=s(),m(b.$$.fragment)},l(r){t=f(r,"P",{"data-svelte-h":!0}),T(t)!=="svelte-kvfsh7"&&(t.textContent=x),a=l(r),c(b.$$.fragment,r)},m(r,M){n(r,t,M),n(r,a,M),u(b,r,M),y=!0},p:Le,i(r){y||(g(b.$$.fragment,r),y=!0)},o(r){h(b.$$.fragment,r),y=!1},d(r){r&&(o(t),o(a)),_(b,r)}}}function Re(X){let t,x;return t=new je({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(){m(t.$$.fragment)},l(a){c(t.$$.fragment,a)},m(a,b){u(t,a,b),x=!0},p:Le,i(a){x||(g(t.$$.fragment,a),x=!0)},o(a){h(t.$$.fragment,a),x=!1},d(a){_(t,a)}}}function Xe(X){let t,x,a,b,y,r,M,oe,D,Se='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:',ne,I,Te="<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>",te,P,Fe='<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>',se,U,le,L,ke='<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>',ae,j,re,C,Pe='<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>',de,W,fe,w,G,_e,O,Je='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>.',be,v,N,xe,Y,Ze=`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.`,ye,J,pe,B,me,$,H,Me,q,De="Load pretrained weights saved in the <code>.ckpt</code> or <code>.safetensors</code> format into a model.",we,S,V,$e,z,Ie=`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.`,ve,Z,ce,E,ue,ee,ge;return y=new He({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),M=new ie({props:{title:"Single files",local:"single-files",headingTag:"h1"}}),U=new ie({props:{title:"Supported pipelines",local:"supported-pipelines",headingTag:"h2"}}),j=new ie({props:{title:"Supported models",local:"supported-models",headingTag:"h2"}}),W=new ie({props:{title:"FromSingleFileMixin",local:"diffusers.loaders.FromSingleFileMixin",headingTag:"h2"}}),G=new he({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"}}),N=new he({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 Ue({props:{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.example",$$slots:{default:[Ee]},$$scope:{ctx:X}}}),B=new ie({props:{title:"FromOriginalModelMixin",local:"diffusers.loaders.FromOriginalModelMixin",headingTag:"h2"}}),H=new he({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"}}),V=new he({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 Ue({props:{anchor:"diffusers.loaders.FromOriginalModelMixin.from_single_file.example",$$slots:{default:[Re]},$$scope:{ctx:X}}}),E=new Ve({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/loaders/single_file.md"}}),{c(){t=d("meta"),x=s(),a=d("p"),b=s(),m(y.$$.fragment),r=s(),m(M.$$.fragment),oe=s(),D=d("p"),D.innerHTML=Se,ne=s(),I=d("ul"),I.innerHTML=Te,te=s(),P=d("blockquote"),P.innerHTML=Fe,se=s(),m(U.$$.fragment),le=s(),L=d("ul"),L.innerHTML=ke,ae=s(),m(j.$$.fragment),re=s(),C=d("ul"),C.innerHTML=Pe,de=s(),m(W.$$.fragment),fe=s(),w=d("div"),m(G.$$.fragment),_e=s(),O=d("p"),O.innerHTML=Je,be=s(),v=d("div"),m(N.$$.fragment),xe=s(),Y=d("p"),Y.innerHTML=Ze,ye=s(),m(J.$$.fragment),pe=s(),m(B.$$.fragment),me=s(),$=d("div"),m(H.$$.fragment),Me=s(),q=d("p"),q.innerHTML=De,we=s(),S=d("div"),m(V.$$.fragment),$e=s(),z=d("p"),z.innerHTML=Ie,ve=s(),m(Z.$$.fragment),ce=s(),m(E.$$.fragment),ue=s(),ee=d("p"),this.h()},l(e){const i=Be("svelte-u9bgzb",document.head);t=f(i,"META",{name:!0,content:!0}),i.forEach(o),x=l(e),a=f(e,"P",{}),K(a).forEach(o),b=l(e),c(y.$$.fragment,e),r=l(e),c(M.$$.fragment,e),oe=l(e),D=f(e,"P",{"data-svelte-h":!0}),T(D)!=="svelte-qpwkxd"&&(D.innerHTML=Se),ne=l(e),I=f(e,"UL",{"data-svelte-h":!0}),T(I)!=="svelte-4h4p7d"&&(I.innerHTML=Te),te=l(e),P=f(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),T(P)!=="svelte-1izmoqn"&&(P.innerHTML=Fe),se=l(e),c(U.$$.fragment,e),le=l(e),L=f(e,"UL",{"data-svelte-h":!0}),T(L)!=="svelte-1yab7oc"&&(L.innerHTML=ke),ae=l(e),c(j.$$.fragment,e),re=l(e),C=f(e,"UL",{"data-svelte-h":!0}),T(C)!=="svelte-ke012g"&&(C.innerHTML=Pe),de=l(e),c(W.$$.fragment,e),fe=l(e),w=f(e,"DIV",{class:!0});var F=K(w);c(G.$$.fragment,F),_e=l(F),O=f(F,"P",{"data-svelte-h":!0}),T(O)!=="svelte-11v9qjy"&&(O.innerHTML=Je),be=l(F),v=f(F,"DIV",{class:!0});var k=K(v);c(N.$$.fragment,k),xe=l(k),Y=f(k,"P",{"data-svelte-h":!0}),T(Y)!=="svelte-pmqrln"&&(Y.innerHTML=Ze),ye=l(k),c(J.$$.fragment,k),k.forEach(o),F.forEach(o),pe=l(e),c(B.$$.fragment,e),me=l(e),$=f(e,"DIV",{class:!0});var A=K($);c(H.$$.fragment,A),Me=l(A),q=f(A,"P",{"data-svelte-h":!0}),T(q)!=="svelte-1angwv3"&&(q.innerHTML=De),we=l(A),S=f(A,"DIV",{class:!0});var Q=K(S);c(V.$$.fragment,Q),$e=l(Q),z=f(Q,"P",{"data-svelte-h":!0}),T(z)!=="svelte-vw4n4o"&&(z.innerHTML=Ie),ve=l(Q),c(Z.$$.fragment,Q),Q.forEach(o),A.forEach(o),ce=l(e),c(E.$$.fragment,e),ue=l(e),ee=f(e,"P",{}),K(ee).forEach(o),this.h()},h(){R(t,"name","hf:doc:metadata"),R(t,"content",Oe),R(P,"class","tip"),R(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),R(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),R(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),R($,"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,t),n(e,x,i),n(e,a,i),n(e,b,i),u(y,e,i),n(e,r,i),u(M,e,i),n(e,oe,i),n(e,D,i),n(e,ne,i),n(e,I,i),n(e,te,i),n(e,P,i),n(e,se,i),u(U,e,i),n(e,le,i),n(e,L,i),n(e,ae,i),u(j,e,i),n(e,re,i),n(e,C,i),n(e,de,i),u(W,e,i),n(e,fe,i),n(e,w,i),u(G,w,null),p(w,_e),p(w,O),p(w,be),p(w,v),u(N,v,null),p(v,xe),p(v,Y),p(v,ye),u(J,v,null),n(e,pe,i),u(B,e,i),n(e,me,i),n(e,$,i),u(H,$,null),p($,Me),p($,q),p($,we),p($,S),u(V,S,null),p(S,$e),p(S,z),p(S,ve),u(Z,S,null),n(e,ce,i),u(E,e,i),n(e,ue,i),n(e,ee,i),ge=!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){ge||(g(y.$$.fragment,e),g(M.$$.fragment,e),g(U.$$.fragment,e),g(j.$$.fragment,e),g(W.$$.fragment,e),g(G.$$.fragment,e),g(N.$$.fragment,e),g(J.$$.fragment,e),g(B.$$.fragment,e),g(H.$$.fragment,e),g(V.$$.fragment,e),g(Z.$$.fragment,e),g(E.$$.fragment,e),ge=!0)},o(e){h(y.$$.fragment,e),h(M.$$.fragment,e),h(U.$$.fragment,e),h(j.$$.fragment,e),h(W.$$.fragment,e),h(G.$$.fragment,e),h(N.$$.fragment,e),h(J.$$.fragment,e),h(B.$$.fragment,e),h(H.$$.fragment,e),h(V.$$.fragment,e),h(Z.$$.fragment,e),h(E.$$.fragment,e),ge=!1},d(e){e&&(o(x),o(a),o(b),o(r),o(oe),o(D),o(ne),o(I),o(te),o(P),o(se),o(le),o(L),o(ae),o(re),o(C),o(de),o(fe),o(w),o(pe),o(me),o($),o(ce),o(ue),o(ee)),o(t),_(y,e),_(M,e),_(U,e),_(j,e),_(W,e),_(G),_(N),_(J),_(B,e),_(H),_(V),_(Z),_(E,e)}}}const Oe='{"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 Ye(X){return We(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class oi extends Ge{constructor(t){super(),Ne(this,t,Ye,Xe,Ce,{})}}export{oi as component};
