import{s as Oe,o as Re,n as le}from"../chunks/scheduler.182ea377.js";import{S as Ye,i as He,g as m,s as l,r as u,A as De,h as p,f as i,c as a,j as L,u as _,x as y,k as A,y as f,a as d,v as b,d as w,t as x,w as M}from"../chunks/index.abf12888.js";import{T as Be}from"../chunks/Tip.230e2334.js";import{D as se}from"../chunks/Docstring.93f6f462.js";import{C as We}from"../chunks/CodeBlock.57fe6e13.js";import{E as je}from"../chunks/ExampleCodeBlock.658f5cd6.js";import{H as be}from"../chunks/Heading.16916d63.js";function ze($){let o,g='To learn more about how to load single file weights, see the <a href="../../using-diffusers/other-formats">Load different Stable Diffusion formats</a> loading guide.';return{c(){o=m("p"),o.innerHTML=g},l(s){o=p(s,"P",{"data-svelte-h":!0}),y(o)!=="svelte-1d80t6b"&&(o.innerHTML=g)},m(s,r){d(s,o,r)},p:le,d(s){s&&i(o)}}}function Pe($){let o,g="Examples:",s,r,c;return r=new We({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBJTIzJTIwRG93bmxvYWQlMjBwaXBlbGluZSUyMGZyb20lMjBodWdnaW5nZmFjZS5jbyUyMGFuZCUyMGNhY2hlLiUwQXBpcGVsaW5lJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9zaW5nbGVfZmlsZSglMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGV2Fycmlvck1hbWE3NzclMkZPcmFuZ2VNaXhzJTJGYmxvYiUyRm1haW4lMkZNb2RlbHMlMkZBYnlzc09yYW5nZU1peCUyRkFieXNzT3JhbmdlTWl4LnNhZmV0ZW5zb3JzJTIyJTBBKSUwQSUwQSUyMyUyMERvd25sb2FkJTIwcGlwZWxpbmUlMjBmcm9tJTIwbG9jYWwlMjBmaWxlJTBBJTIzJTIwZmlsZSUyMGlzJTIwZG93bmxvYWRlZCUyMHVuZGVyJTIwLiUyRnYxLTUtcHJ1bmVkLWVtYW9ubHkuY2twdCUwQXBpcGVsaW5lJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9zaW5nbGVfZmlsZSglMjIuJTJGdjEtNS1wcnVuZWQtZW1hb25seSUyMiklMEElMEElMjMlMjBFbmFibGUlMjBmbG9hdDE2JTIwYW5kJTIwbW92ZSUyMHRvJTIwR1BVJTBBcGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25QaXBlbGluZS5mcm9tX3NpbmdsZV9maWxlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyRmJsb2IlMkZtYWluJTJGdjEtNS1wcnVuZWQtZW1hb25seS5ja3B0JTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKSUwQXBpcGVsaW5lLnRvKCUyMmN1ZGElMjIp",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&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(){o=m("p"),o.textContent=g,s=l(),u(r.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),y(o)!=="svelte-kvfsh7"&&(o.textContent=g),s=a(t),_(r.$$.fragment,t)},m(t,h){d(t,o,h),d(t,s,h),b(r,t,h),c=!0},p:le,i(t){c||(w(r.$$.fragment,t),c=!0)},o(t){x(r.$$.fragment,t),c=!1},d(t){t&&(i(o),i(s)),M(r,t)}}}function qe($){let o,g=`Make sure to pass both <code>image_size</code> and <code>scaling_factor</code> to <code>from_single_file()</code> if you’re loading
a VAE from SDXL or a Stable Diffusion v2 model or higher.`;return{c(){o=m("p"),o.innerHTML=g},l(s){o=p(s,"P",{"data-svelte-h":!0}),y(o)!=="svelte-29ildn"&&(o.innerHTML=g)},m(s,r){d(s,o,r)},p:le,d(s){s&&i(o)}}}function Xe($){let o,g="Examples:",s,r,c;return r=new We({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9lbmNvZGVyS0wlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGc3RhYmlsaXR5YWklMkZzZC12YWUtZnQtbXNlLW9yaWdpbmFsJTJGYmxvYiUyRm1haW4lMkZ2YWUtZnQtbXNlLTg0MDAwMC1lbWEtcHJ1bmVkLnNhZmV0ZW5zb3JzJTIyJTIwJTIwJTIzJTIwY2FuJTIwYWxzbyUyMGJlJTIwbG9jYWwlMjBmaWxlJTBBbW9kZWwlMjAlM0QlMjBBdXRvZW5jb2RlcktMLmZyb21fc2luZ2xlX2ZpbGUodXJsKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoencoderKL

url = <span class="hljs-string">&quot;https://huggingface.co/stabilityai/sd-vae-ft-mse-original/blob/main/vae-ft-mse-840000-ema-pruned.safetensors&quot;</span>  <span class="hljs-comment"># can also be local file</span>
model = AutoencoderKL.from_single_file(url)`,wrap:!1}}),{c(){o=m("p"),o.textContent=g,s=l(),u(r.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),y(o)!=="svelte-kvfsh7"&&(o.textContent=g),s=a(t),_(r.$$.fragment,t)},m(t,h){d(t,o,h),d(t,s,h),b(r,t,h),c=!0},p:le,i(t){c||(w(r.$$.fragment,t),c=!0)},o(t){x(r.$$.fragment,t),c=!1},d(t){t&&(i(o),i(s)),M(r,t)}}}function Qe($){let o,g="Examples:",s,r,c;return r=new We({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvbkNvbnRyb2xOZXRQaXBlbGluZSUyQyUyMENvbnRyb2xOZXRNb2RlbCUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZsbGx5YXN2aWVsJTJGQ29udHJvbE5ldC12MS0xJTJGYmxvYiUyRm1haW4lMkZjb250cm9sX3YxMXBfc2QxNV9jYW5ueS5wdGglMjIlMjAlMjAlMjMlMjBjYW4lMjBhbHNvJTIwYmUlMjBhJTIwbG9jYWwlMjBwYXRoJTBBbW9kZWwlMjAlM0QlMjBDb250cm9sTmV0TW9kZWwuZnJvbV9zaW5nbGVfZmlsZSh1cmwpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTJGYmxvYiUyRm1haW4lMkZ2MS01LXBydW5lZC5zYWZldGVuc29ycyUyMiUyMCUyMCUyMyUyMGNhbiUyMGFsc28lMjBiZSUyMGElMjBsb2NhbCUyMHBhdGglMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uQ29udHJvbE5ldFBpcGVsaW5lLmZyb21fc2luZ2xlX2ZpbGUodXJsJTJDJTIwY29udHJvbG5ldCUzRGNvbnRyb2xuZXQp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionControlNetPipeline, ControlNetModel

url = <span class="hljs-string">&quot;https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_canny.pth&quot;</span>  <span class="hljs-comment"># can also be a local path</span>
model = ControlNetModel.from_single_file(url)

url = <span class="hljs-string">&quot;https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned.safetensors&quot;</span>  <span class="hljs-comment"># can also be a local path</span>
pipe = StableDiffusionControlNetPipeline.from_single_file(url, controlnet=controlnet)`,wrap:!1}}),{c(){o=m("p"),o.textContent=g,s=l(),u(r.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),y(o)!=="svelte-kvfsh7"&&(o.textContent=g),s=a(t),_(r.$$.fragment,t)},m(t,h){d(t,o,h),d(t,s,h),b(r,t,h),c=!0},p:le,i(t){c||(w(r.$$.fragment,t),c=!0)},o(t){x(r.$$.fragment,t),c=!1},d(t){t&&(i(o),i(s)),M(r,t)}}}function Ke($){let o,g,s,r,c,t,h,Ne="Diffusers supports loading pretrained pipeline (or model) weights stored in a single file, such as a <code>ckpt</code> or <code>safetensors</code> file. These single file types are typically produced from community trained models. There are three classes for loading single file weights:",ae,B,Ge='<li><code>FromSingleFileMixin</code> supports loading pretrained pipeline weights stored in a single file, which can either be a <code>ckpt</code> or <code>safetensors</code> file.</li> <li><code>FromOriginalVAEMixin</code> supports loading a pretrained <a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a> from pretrained ControlNet weights stored in a single file, which can either be a <code>ckpt</code> or <code>safetensors</code> file.</li> <li><code>FromOriginalControlnetMixin</code> supports loading pretrained ControlNet weights stored in a single file, which can either be a <code>ckpt</code> or <code>safetensors</code> file.</li>',de,G,fe,O,ce,T,R,we,Q,Ie='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>.',xe,Z,Y,Me,K,Se=`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,I,me,H,pe,F,D,$e,ee,Ve='Load pretrained AutoencoderKL weights saved in the <code>.ckpt</code> or <code>.safetensors</code> format into a <a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>.',ve,v,z,Te,oe,Ee=`Instantiate a <a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a> from pretrained ControlNet weights saved in the original <code>.ckpt</code> or
<code>.safetensors</code> format. The pipeline is set in evaluation mode (<code>model.eval()</code>) by default.`,Fe,S,ke,V,ge,P,he,k,q,Je,te,Le='Load pretrained ControlNet weights saved in the <code>.ckpt</code> or <code>.safetensors</code> format into a <a href="/docs/diffusers/main/en/api/models/controlnet#diffusers.ControlNetModel">ControlNetModel</a>.',Ze,C,X,Ce,ne,Ae=`Instantiate a <a href="/docs/diffusers/main/en/api/models/controlnet#diffusers.ControlNetModel">ControlNetModel</a> from pretrained ControlNet weights saved in the original <code>.ckpt</code> or
<code>.safetensors</code> format. The pipeline is set in evaluation mode (<code>model.eval()</code>) by default.`,Ue,E,ue,re,_e;return c=new be({props:{title:"Single files",local:"single-files",headingTag:"h1"}}),G=new Be({props:{$$slots:{default:[ze]},$$scope:{ctx:$}}}),O=new be({props:{title:"FromSingleFileMixin",local:"diffusers.loaders.FromSingleFileMixin",headingTag:"h2"}}),R=new se({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#L137"}}),Y=new se({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.`,name:"cache_dir"},{anchor:"diffusers.loaders.FromSingleFileMixin.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.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.use_safetensors",description:`<strong>use_safetensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If set to <code>None</code>, the safetensors weights are downloaded if they&#x2019;re available <strong>and</strong> if the
safetensors library is installed. If set to <code>True</code>, the model is forcibly loaded from safetensors
weights. If set to <code>False</code>, safetensors weights are not loaded.`,name:"use_safetensors"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/single_file.py#L142"}}),I=new je({props:{anchor:"diffusers.loaders.FromSingleFileMixin.from_single_file.example",$$slots:{default:[Pe]},$$scope:{ctx:$}}}),H=new be({props:{title:"FromOriginalVAEMixin",local:"diffusers.loaders.FromOriginalVAEMixin",headingTag:"h2"}}),D=new se({props:{name:"class diffusers.loaders.FromOriginalVAEMixin",anchor:"diffusers.loaders.FromOriginalVAEMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/autoencoder.py#L23"}}),z=new se({props:{name:"from_single_file",anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file",parameters:[{name:"pretrained_model_link_or_path",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.FromOriginalVAEMixin.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.FromOriginalVAEMixin.from_single_file.config_file",description:`<strong>config_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Filepath to the configuration YAML file associated with the model. If not provided it will default to:
<a href="https://raw.githubusercontent.com/CompVis/stable-diffusion/main/configs/stable-diffusion/v1-inference.yaml" rel="nofollow">https://raw.githubusercontent.com/CompVis/stable-diffusion/main/configs/stable-diffusion/v1-inference.yaml</a>`,name:"config_file"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.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.FromOriginalVAEMixin.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.FromOriginalVAEMixin.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.FromOriginalVAEMixin.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.FromOriginalVAEMixin.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.FromOriginalVAEMixin.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.FromOriginalVAEMixin.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.FromOriginalVAEMixin.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.FromOriginalVAEMixin.from_single_file.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The image size the model was trained on. Use 512 for all Stable Diffusion v1 models and the Stable
Diffusion v2 base model. Use 768 for Stable Diffusion v2.`,name:"image_size"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.scaling_factor",description:`<strong>scaling_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 0.18215) &#x2014;
The component-wise standard deviation of the trained latent space computed using the first batch of the
training set. This is used to scale the latent space to have unit variance when training the diffusion
model. The latents are scaled with the formula <code>z = z * scaling_factor</code> before being passed to the
diffusion model. When decoding, the latents are scaled back to the original scale with the formula: <code>z = 1 / scaling_factor * z</code>. For more details, refer to sections 4.3.2 and D.1 of the <a href="https://arxiv.org/abs/2112.10752" rel="nofollow">High-Resolution
Image Synthesis with Latent Diffusion Models</a> paper.`,name:"scaling_factor"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.use_safetensors",description:`<strong>use_safetensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If set to <code>None</code>, the safetensors weights are downloaded if they&#x2019;re available <strong>and</strong> if the
safetensors library is installed. If set to <code>True</code>, the model is forcibly loaded from safetensors
weights. If set to <code>False</code>, safetensors weights are not loaded.`,name:"use_safetensors"},{anchor:"diffusers.loaders.FromOriginalVAEMixin.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/autoencoder.py#L28"}}),S=new Be({props:{warning:!0,$$slots:{default:[qe]},$$scope:{ctx:$}}}),V=new je({props:{anchor:"diffusers.loaders.FromOriginalVAEMixin.from_single_file.example",$$slots:{default:[Xe]},$$scope:{ctx:$}}}),P=new be({props:{title:"FromOriginalControlnetMixin",local:"diffusers.loaders.FromOriginalControlNetMixin",headingTag:"h2"}}),q=new se({props:{name:"class diffusers.loaders.FromOriginalControlNetMixin",anchor:"diffusers.loaders.FromOriginalControlNetMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/controlnet.py#L23"}}),X=new se({props:{name:"from_single_file",anchor:"diffusers.loaders.FromOriginalControlNetMixin.from_single_file",parameters:[{name:"pretrained_model_link_or_path",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.FromOriginalControlNetMixin.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.FromOriginalControlNetMixin.from_single_file.config_file",description:`<strong>config_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Filepath to the configuration YAML file associated with the model. If not provided it will default to:
<a href="https://raw.githubusercontent.com/lllyasviel/ControlNet/main/models/cldm_v15.yaml" rel="nofollow">https://raw.githubusercontent.com/lllyasviel/ControlNet/main/models/cldm_v15.yaml</a>`,name:"config_file"},{anchor:"diffusers.loaders.FromOriginalControlNetMixin.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.FromOriginalControlNetMixin.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.FromOriginalControlNetMixin.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.FromOriginalControlNetMixin.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.FromOriginalControlNetMixin.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.FromOriginalControlNetMixin.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.FromOriginalControlNetMixin.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.FromOriginalControlNetMixin.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.FromOriginalControlNetMixin.from_single_file.use_safetensors",description:`<strong>use_safetensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If set to <code>None</code>, the safetensors weights are downloaded if they&#x2019;re available <strong>and</strong> if the
safetensors library is installed. If set to <code>True</code>, the model is forcibly loaded from safetensors
weights. If set to <code>False</code>, safetensors weights are not loaded.`,name:"use_safetensors"},{anchor:"diffusers.loaders.FromOriginalControlNetMixin.from_single_file.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The image size the model was trained on. Use 512 for all Stable Diffusion v1 models and the Stable
Diffusion v2 base model. Use 768 for Stable Diffusion v2.`,name:"image_size"},{anchor:"diffusers.loaders.FromOriginalControlNetMixin.from_single_file.upcast_attention",description:`<strong>upcast_attention</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Whether the attention computation should always be upcasted.`,name:"upcast_attention"},{anchor:"diffusers.loaders.FromOriginalControlNetMixin.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/controlnet.py#L28"}}),E=new je({props:{anchor:"diffusers.loaders.FromOriginalControlNetMixin.from_single_file.example",$$slots:{default:[Qe]},$$scope:{ctx:$}}}),{c(){o=m("meta"),g=l(),s=m("p"),r=l(),u(c.$$.fragment),t=l(),h=m("p"),h.innerHTML=Ne,ae=l(),B=m("ul"),B.innerHTML=Ge,de=l(),u(G.$$.fragment),fe=l(),u(O.$$.fragment),ce=l(),T=m("div"),u(R.$$.fragment),we=l(),Q=m("p"),Q.innerHTML=Ie,xe=l(),Z=m("div"),u(Y.$$.fragment),Me=l(),K=m("p"),K.innerHTML=Se,ye=l(),u(I.$$.fragment),me=l(),u(H.$$.fragment),pe=l(),F=m("div"),u(D.$$.fragment),$e=l(),ee=m("p"),ee.innerHTML=Ve,ve=l(),v=m("div"),u(z.$$.fragment),Te=l(),oe=m("p"),oe.innerHTML=Ee,Fe=l(),u(S.$$.fragment),ke=l(),u(V.$$.fragment),ge=l(),u(P.$$.fragment),he=l(),k=m("div"),u(q.$$.fragment),Je=l(),te=m("p"),te.innerHTML=Le,Ze=l(),C=m("div"),u(X.$$.fragment),Ce=l(),ne=m("p"),ne.innerHTML=Ae,Ue=l(),u(E.$$.fragment),ue=l(),re=m("p"),this.h()},l(e){const n=De("svelte-u9bgzb",document.head);o=p(n,"META",{name:!0,content:!0}),n.forEach(i),g=a(e),s=p(e,"P",{}),L(s).forEach(i),r=a(e),_(c.$$.fragment,e),t=a(e),h=p(e,"P",{"data-svelte-h":!0}),y(h)!=="svelte-1waiuhn"&&(h.innerHTML=Ne),ae=a(e),B=p(e,"UL",{"data-svelte-h":!0}),y(B)!=="svelte-btej2e"&&(B.innerHTML=Ge),de=a(e),_(G.$$.fragment,e),fe=a(e),_(O.$$.fragment,e),ce=a(e),T=p(e,"DIV",{class:!0});var U=L(T);_(R.$$.fragment,U),we=a(U),Q=p(U,"P",{"data-svelte-h":!0}),y(Q)!=="svelte-11v9qjy"&&(Q.innerHTML=Ie),xe=a(U),Z=p(U,"DIV",{class:!0});var j=L(Z);_(Y.$$.fragment,j),Me=a(j),K=p(j,"P",{"data-svelte-h":!0}),y(K)!=="svelte-pmqrln"&&(K.innerHTML=Se),ye=a(j),_(I.$$.fragment,j),j.forEach(i),U.forEach(i),me=a(e),_(H.$$.fragment,e),pe=a(e),F=p(e,"DIV",{class:!0});var W=L(F);_(D.$$.fragment,W),$e=a(W),ee=p(W,"P",{"data-svelte-h":!0}),y(ee)!=="svelte-rijvye"&&(ee.innerHTML=Ve),ve=a(W),v=p(W,"DIV",{class:!0});var J=L(v);_(z.$$.fragment,J),Te=a(J),oe=p(J,"P",{"data-svelte-h":!0}),y(oe)!=="svelte-hmojnk"&&(oe.innerHTML=Ee),Fe=a(J),_(S.$$.fragment,J),ke=a(J),_(V.$$.fragment,J),J.forEach(i),W.forEach(i),ge=a(e),_(P.$$.fragment,e),he=a(e),k=p(e,"DIV",{class:!0});var N=L(k);_(q.$$.fragment,N),Je=a(N),te=p(N,"P",{"data-svelte-h":!0}),y(te)!=="svelte-1xsfbj6"&&(te.innerHTML=Le),Ze=a(N),C=p(N,"DIV",{class:!0});var ie=L(C);_(X.$$.fragment,ie),Ce=a(ie),ne=p(ie,"P",{"data-svelte-h":!0}),y(ne)!=="svelte-1sfw6v0"&&(ne.innerHTML=Ae),Ue=a(ie),_(E.$$.fragment,ie),ie.forEach(i),N.forEach(i),ue=a(e),re=p(e,"P",{}),L(re).forEach(i),this.h()},h(){A(o,"name","hf:doc:metadata"),A(o,"content",eo),A(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(k,"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,n){f(document.head,o),d(e,g,n),d(e,s,n),d(e,r,n),b(c,e,n),d(e,t,n),d(e,h,n),d(e,ae,n),d(e,B,n),d(e,de,n),b(G,e,n),d(e,fe,n),b(O,e,n),d(e,ce,n),d(e,T,n),b(R,T,null),f(T,we),f(T,Q),f(T,xe),f(T,Z),b(Y,Z,null),f(Z,Me),f(Z,K),f(Z,ye),b(I,Z,null),d(e,me,n),b(H,e,n),d(e,pe,n),d(e,F,n),b(D,F,null),f(F,$e),f(F,ee),f(F,ve),f(F,v),b(z,v,null),f(v,Te),f(v,oe),f(v,Fe),b(S,v,null),f(v,ke),b(V,v,null),d(e,ge,n),b(P,e,n),d(e,he,n),d(e,k,n),b(q,k,null),f(k,Je),f(k,te),f(k,Ze),f(k,C),b(X,C,null),f(C,Ce),f(C,ne),f(C,Ue),b(E,C,null),d(e,ue,n),d(e,re,n),_e=!0},p(e,[n]){const U={};n&2&&(U.$$scope={dirty:n,ctx:e}),G.$set(U);const j={};n&2&&(j.$$scope={dirty:n,ctx:e}),I.$set(j);const W={};n&2&&(W.$$scope={dirty:n,ctx:e}),S.$set(W);const J={};n&2&&(J.$$scope={dirty:n,ctx:e}),V.$set(J);const N={};n&2&&(N.$$scope={dirty:n,ctx:e}),E.$set(N)},i(e){_e||(w(c.$$.fragment,e),w(G.$$.fragment,e),w(O.$$.fragment,e),w(R.$$.fragment,e),w(Y.$$.fragment,e),w(I.$$.fragment,e),w(H.$$.fragment,e),w(D.$$.fragment,e),w(z.$$.fragment,e),w(S.$$.fragment,e),w(V.$$.fragment,e),w(P.$$.fragment,e),w(q.$$.fragment,e),w(X.$$.fragment,e),w(E.$$.fragment,e),_e=!0)},o(e){x(c.$$.fragment,e),x(G.$$.fragment,e),x(O.$$.fragment,e),x(R.$$.fragment,e),x(Y.$$.fragment,e),x(I.$$.fragment,e),x(H.$$.fragment,e),x(D.$$.fragment,e),x(z.$$.fragment,e),x(S.$$.fragment,e),x(V.$$.fragment,e),x(P.$$.fragment,e),x(q.$$.fragment,e),x(X.$$.fragment,e),x(E.$$.fragment,e),_e=!1},d(e){e&&(i(g),i(s),i(r),i(t),i(h),i(ae),i(B),i(de),i(fe),i(ce),i(T),i(me),i(pe),i(F),i(ge),i(he),i(k),i(ue),i(re)),i(o),M(c,e),M(G,e),M(O,e),M(R),M(Y),M(I),M(H,e),M(D),M(z),M(S),M(V),M(P,e),M(q),M(X),M(E)}}}const eo='{"title":"Single files","local":"single-files","sections":[{"title":"FromSingleFileMixin","local":"diffusers.loaders.FromSingleFileMixin","sections":[],"depth":2},{"title":"FromOriginalVAEMixin","local":"diffusers.loaders.FromOriginalVAEMixin","sections":[],"depth":2},{"title":"FromOriginalControlnetMixin","local":"diffusers.loaders.FromOriginalControlNetMixin","sections":[],"depth":2}],"depth":1}';function oo($){return Re(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class fo extends Ye{constructor(o){super(),He(this,o,oo,Ke,Oe,{})}}export{fo as component};
