Buckets:

rtrm's picture
download
raw
80.7 kB
import{s as $a,o as Ta,n as V}from"../chunks/scheduler.182ea377.js";import{S as Ua,i as Ja,g as l,s as n,p as f,x as va,H as ja,A as ka,h as i,f as d,c as r,j as U,q as u,m as p,y as _a,B as Za,k as w,v as t,a as x,r as h,d as g,t as M,u as b}from"../chunks/index.008d68e4.js";import{T as xa}from"../chunks/Tip.4f096367.js";import{D as k}from"../chunks/Docstring.7aec8b85.js";import{C as L}from"../chunks/CodeBlock.5ed6eb7b.js";import{I as go}from"../chunks/IconCopyLink.96bbb92b.js";import{E as Q}from"../chunks/ExampleCodeBlock.23e54afe.js";function Ca(J){let s,_=`⚠️ When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`;return{c(){s=l("p"),s.textContent=_},l(c){s=i(c,"P",{"data-svelte-h":!0}),p(s)!=="svelte-17p1lpg"&&(s.textContent=_)},m(c,a){x(c,s,a)},p:V,d(c){c&&d(s)}}}function Ga(J){let s,_="Examples:",c,a,m;return a=new L({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwVU5ldDJEQ29uZGl0aW9uTW9kZWwlMEFmcm9tJTIweGZvcm1lcnMub3BzJTIwaW1wb3J0JTIwTWVtb3J5RWZmaWNpZW50QXR0ZW50aW9uRmxhc2hBdHRlbnRpb25PcCUwQSUwQW1vZGVsJTIwJTNEJTIwVU5ldDJEQ29uZGl0aW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnN0YWJpbGl0eWFpJTJGc3RhYmxlLWRpZmZ1c2lvbi0yLTElMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJ1bmV0JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKSUwQW1vZGVsJTIwJTNEJTIwbW9kZWwudG8oJTIyY3VkYSUyMiklMEFtb2RlbC5lbmFibGVfeGZvcm1lcnNfbWVtb3J5X2VmZmljaWVudF9hdHRlbnRpb24oYXR0ZW50aW9uX29wJTNETWVtb3J5RWZmaWNpZW50QXR0ZW50aW9uRmxhc2hBdHRlbnRpb25PcCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> xformers.ops <span class="hljs-keyword">import</span> MemoryEfficientAttentionFlashAttentionOp
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UNet2DConditionModel.from_pretrained(
<span class="hljs-meta">... </span> <span class="hljs-string">&quot;stabilityai/stable-diffusion-2-1&quot;</span>, subfolder=<span class="hljs-string">&quot;unet&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = model.to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)`}}),{c(){s=l("p"),s.textContent=_,c=n(),f(a.$$.fragment)},l(e){s=i(e,"P",{"data-svelte-h":!0}),p(s)!=="svelte-kvfsh7"&&(s.textContent=_),c=r(e),u(a.$$.fragment,e)},m(e,v){x(e,s,v),x(e,c,v),h(a,e,v),m=!0},p:V,i(e){m||(g(a.$$.fragment,e),m=!0)},o(e){M(a.$$.fragment,e),m=!1},d(e){e&&(d(s),d(c)),b(a,e)}}}function Ia(J){let s,_=`To use private or <a href="https://huggingface.co/docs/hub/models-gated#gated-models" rel="nofollow">gated models</a>, log-in with
<code>huggingface-cli login</code>. You can also activate the special
<a href="https://huggingface.co/diffusers/installation.html#offline-mode" rel="nofollow">“offline-mode”</a> to use this method in a
firewalled environment.`;return{c(){s=l("p"),s.innerHTML=_},l(c){s=i(c,"P",{"data-svelte-h":!0}),p(s)!=="svelte-19a77yg"&&(s.innerHTML=_)},m(c,a){x(c,s,a)},p:V,d(c){c&&d(s)}}}function Fa(J){let s,_="Example:",c,a,m;return a=new L({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTBBJTBBdW5ldCUyMCUzRCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUyQyUyMHN1YmZvbGRlciUzRCUyMnVuZXQlMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel
unet = UNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, subfolder=<span class="hljs-string">&quot;unet&quot;</span>)`}}),{c(){s=l("p"),s.textContent=_,c=n(),f(a.$$.fragment)},l(e){s=i(e,"P",{"data-svelte-h":!0}),p(s)!=="svelte-11lpom8"&&(s.textContent=_),c=r(e),u(a.$$.fragment,e)},m(e,v){x(e,s,v),x(e,c,v),h(a,e,v),m=!0},p:V,i(e){m||(g(a.$$.fragment,e),m=!0)},o(e){M(a.$$.fragment,e),m=!1},d(e){e&&(d(s),d(c)),b(a,e)}}}function Wa(J){let s,_="If you get the error message below, you need to finetune the weights for your downstream task:",c,a,m;return a=new L({props:{code:"U29tZSUyMHdlaWdodHMlMjBvZiUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTIwd2VyZSUyMG5vdCUyMGluaXRpYWxpemVkJTIwZnJvbSUyMHRoZSUyMG1vZGVsJTIwY2hlY2twb2ludCUyMGF0JTIwcnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjBhbmQlMjBhcmUlMjBuZXdseSUyMGluaXRpYWxpemVkJTIwYmVjYXVzZSUyMHRoZSUyMHNoYXBlcyUyMGRpZCUyMG5vdCUyMG1hdGNoJTNBJTBBLSUyMGNvbnZfaW4ud2VpZ2h0JTNBJTIwZm91bmQlMjBzaGFwZSUyMHRvcmNoLlNpemUoJTVCMzIwJTJDJTIwNCUyQyUyMDMlMkMlMjAzJTVEKSUyMGluJTIwdGhlJTIwY2hlY2twb2ludCUyMGFuZCUyMHRvcmNoLlNpemUoJTVCMzIwJTJDJTIwOSUyQyUyMDMlMkMlMjAzJTVEKSUyMGluJTIwdGhlJTIwbW9kZWwlMjBpbnN0YW50aWF0ZWQlMEFZb3UlMjBzaG91bGQlMjBwcm9iYWJseSUyMFRSQUlOJTIwdGhpcyUyMG1vZGVsJTIwb24lMjBhJTIwZG93bi1zdHJlYW0lMjB0YXNrJTIwdG8lMjBiZSUyMGFibGUlMjB0byUyMHVzZSUyMGl0JTIwZm9yJTIwcHJlZGljdGlvbnMlMjBhbmQlMjBpbmZlcmVuY2Uu",highlighted:`Some weights of UNet2DConditionModel were not initialized from the model checkpoint at runwayml/stable-diffusion-v1-5 and are newly initialized because the shapes did not match:
- conv_in.weight: found shape torch.Size([320, 4, 3, 3]) <span class="hljs-keyword">in</span> the checkpoint and torch.Size([320, 9, 3, 3]) <span class="hljs-keyword">in</span> the model instantiated
You should probably TRAIN this model on a down-stream task to be able to use it <span class="hljs-keyword">for</span> predictions and inference.`}}),{c(){s=l("p"),s.textContent=_,c=n(),f(a.$$.fragment)},l(e){s=i(e,"P",{"data-svelte-h":!0}),p(s)!=="svelte-xueb0m"&&(s.textContent=_),c=r(e),u(a.$$.fragment,e)},m(e,v){x(e,s,v),x(e,c,v),h(a,e,v),m=!0},p:V,i(e){m||(g(a.$$.fragment,e),m=!0)},o(e){M(a.$$.fragment,e),m=!1},d(e){e&&(d(s),d(c)),b(a,e)}}}function Ba(J){let s,_="Example:",c,a,m;return a=new L({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUwQXVuZXQlMjAlM0QlMjBVTmV0MkRDb25kaXRpb25Nb2RlbC5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjBzdWJmb2xkZXIlM0QlMjJ1bmV0JTIyKSUwQXVuZXQubnVtX3BhcmFtZXRlcnMob25seV90cmFpbmFibGUlM0RUcnVlKSUwQTg1OTUyMDk2NA==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel
model_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
unet = UNet2DConditionModel.from_pretrained(model_id, subfolder=<span class="hljs-string">&quot;unet&quot;</span>)
unet.num_parameters(only_trainable=<span class="hljs-literal">True</span>)
<span class="hljs-number">859520964</span>`}}),{c(){s=l("p"),s.textContent=_,c=n(),f(a.$$.fragment)},l(e){s=i(e,"P",{"data-svelte-h":!0}),p(s)!=="svelte-11lpom8"&&(s.textContent=_),c=r(e),u(a.$$.fragment,e)},m(e,v){x(e,s,v),x(e,c,v),h(a,e,v),m=!0},p:V,i(e){m||(g(a.$$.fragment,e),m=!0)},o(e){M(a.$$.fragment,e),m=!1},d(e){e&&(d(s),d(c)),b(a,e)}}}function Va(J){let s,_="Examples:",c,a,m;return a=new L({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEZsYXhVTmV0MkRDb25kaXRpb25Nb2RlbCUwQSUwQSUyMyUyMERvd25sb2FkJTIwbW9kZWwlMjBhbmQlMjBjb25maWd1cmF0aW9uJTIwZnJvbSUyMGh1Z2dpbmdmYWNlLmNvJTIwYW5kJTIwY2FjaGUuJTBBbW9kZWwlMkMlMjBwYXJhbXMlMjAlM0QlMjBGbGF4VU5ldDJEQ29uZGl0aW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyKSUwQSUyMyUyME1vZGVsJTIwd2FzJTIwc2F2ZWQlMjB1c2luZyUyMCpzYXZlX3ByZXRyYWluZWQoJy4lMkZ0ZXN0JTJGc2F2ZWRfbW9kZWwlMkYnKSolMjAoZm9yJTIwZXhhbXBsZSUyMHB1cnBvc2VzJTJDJTIwbm90JTIwcnVubmFibGUpLiUwQW1vZGVsJTJDJTIwcGFyYW1zJTIwJTNEJTIwRmxheFVOZXQyRENvbmRpdGlvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjIuJTJGdGVzdCUyRnNhdmVkX21vZGVsJTJGJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxUNet2DConditionModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download model and configuration from huggingface.co and cache.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Model was saved using *save_pretrained(&#x27;./test/saved_model/&#x27;)* (for example purposes, not runnable).</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;./test/saved_model/&quot;</span>)`}}),{c(){s=l("p"),s.textContent=_,c=n(),f(a.$$.fragment)},l(e){s=i(e,"P",{"data-svelte-h":!0}),p(s)!=="svelte-kvfsh7"&&(s.textContent=_),c=r(e),u(a.$$.fragment,e)},m(e,v){x(e,s,v),x(e,c,v),h(a,e,v),m=!0},p:V,i(e){m||(g(a.$$.fragment,e),m=!0)},o(e){M(a.$$.fragment,e),m=!1},d(e){e&&(d(s),d(c)),b(a,e)}}}function Ra(J){let s,_="If you get the error message below, you need to finetune the weights for your downstream task:",c,a,m;return a=new L({props:{code:"U29tZSUyMHdlaWdodHMlMjBvZiUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTIwd2VyZSUyMG5vdCUyMGluaXRpYWxpemVkJTIwZnJvbSUyMHRoZSUyMG1vZGVsJTIwY2hlY2twb2ludCUyMGF0JTIwcnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjBhbmQlMjBhcmUlMjBuZXdseSUyMGluaXRpYWxpemVkJTIwYmVjYXVzZSUyMHRoZSUyMHNoYXBlcyUyMGRpZCUyMG5vdCUyMG1hdGNoJTNBJTBBLSUyMGNvbnZfaW4ud2VpZ2h0JTNBJTIwZm91bmQlMjBzaGFwZSUyMHRvcmNoLlNpemUoJTVCMzIwJTJDJTIwNCUyQyUyMDMlMkMlMjAzJTVEKSUyMGluJTIwdGhlJTIwY2hlY2twb2ludCUyMGFuZCUyMHRvcmNoLlNpemUoJTVCMzIwJTJDJTIwOSUyQyUyMDMlMkMlMjAzJTVEKSUyMGluJTIwdGhlJTIwbW9kZWwlMjBpbnN0YW50aWF0ZWQlMEFZb3UlMjBzaG91bGQlMjBwcm9iYWJseSUyMFRSQUlOJTIwdGhpcyUyMG1vZGVsJTIwb24lMjBhJTIwZG93bi1zdHJlYW0lMjB0YXNrJTIwdG8lMjBiZSUyMGFibGUlMjB0byUyMHVzZSUyMGl0JTIwZm9yJTIwcHJlZGljdGlvbnMlMjBhbmQlMjBpbmZlcmVuY2Uu",highlighted:`Some weights of UNet2DConditionModel were not initialized from the model checkpoint at runwayml/stable-diffusion-v1-5 and are newly initialized because the shapes did not match:
- conv_in.weight: found shape torch.Size([320, 4, 3, 3]) <span class="hljs-keyword">in</span> the checkpoint and torch.Size([320, 9, 3, 3]) <span class="hljs-keyword">in</span> the model instantiated
You should probably TRAIN this model on a down-stream task to be able to use it <span class="hljs-keyword">for</span> predictions and inference.`}}),{c(){s=l("p"),s.textContent=_,c=n(),f(a.$$.fragment)},l(e){s=i(e,"P",{"data-svelte-h":!0}),p(s)!=="svelte-xueb0m"&&(s.textContent=_),c=r(e),u(a.$$.fragment,e)},m(e,v){x(e,s,v),x(e,c,v),h(a,e,v),m=!0},p:V,i(e){m||(g(a.$$.fragment,e),m=!0)},o(e){M(a.$$.fragment,e),m=!1},d(e){e&&(d(s),d(c)),b(a,e)}}}function Ha(J){let s,_="Examples:",c,a,m;return a=new L({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEZsYXhVTmV0MkRDb25kaXRpb25Nb2RlbCUwQSUwQSUyMyUyMGxvYWQlMjBtb2RlbCUwQW1vZGVsJTJDJTIwcGFyYW1zJTIwJTNEJTIwRmxheFVOZXQyRENvbmRpdGlvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiklMEElMjMlMjBCeSUyMGRlZmF1bHQlMkMlMjB0aGUlMjBtb2RlbCUyMHBhcmFtZXRlcnMlMjB3aWxsJTIwYmUlMjBpbiUyMGZwMzIlMjBwcmVjaXNpb24lMkMlMjB0byUyMGNhc3QlMjB0aGVzZSUyMHRvJTIwYmZsb2F0MTYlMjBwcmVjaXNpb24lMEFwYXJhbXMlMjAlM0QlMjBtb2RlbC50b19iZjE2KHBhcmFtcyklMEElMjMlMjBJZiUyMHlvdSUyMGRvbid0JTIwd2FudCUyMHRvJTIwY2FzdCUyMGNlcnRhaW4lMjBwYXJhbWV0ZXJzJTIwKGZvciUyMGV4YW1wbGUlMjBsYXllciUyMG5vcm0lMjBiaWFzJTIwYW5kJTIwc2NhbGUpJTBBJTIzJTIwdGhlbiUyMHBhc3MlMjB0aGUlMjBtYXNrJTIwYXMlMjBmb2xsb3dzJTBBZnJvbSUyMGZsYXglMjBpbXBvcnQlMjB0cmF2ZXJzZV91dGlsJTBBJTBBbW9kZWwlMkMlMjBwYXJhbXMlMjAlM0QlMjBGbGF4VU5ldDJEQ29uZGl0aW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyKSUwQWZsYXRfcGFyYW1zJTIwJTNEJTIwdHJhdmVyc2VfdXRpbC5mbGF0dGVuX2RpY3QocGFyYW1zKSUwQW1hc2slMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjBwYXRoJTNBJTIwKHBhdGglNUItMiU1RCUyMCElM0QlMjAoJTIyTGF5ZXJOb3JtJTIyJTJDJTIwJTIyYmlhcyUyMiklMjBhbmQlMjBwYXRoJTVCLTIlM0ElNUQlMjAhJTNEJTIwKCUyMkxheWVyTm9ybSUyMiUyQyUyMCUyMnNjYWxlJTIyKSklMEElMjAlMjAlMjAlMjBmb3IlMjBwYXRoJTIwaW4lMjBmbGF0X3BhcmFtcyUwQSU3RCUwQW1hc2slMjAlM0QlMjB0cmF2ZXJzZV91dGlsLnVuZmxhdHRlbl9kaWN0KG1hc2spJTBBcGFyYW1zJTIwJTNEJTIwbW9kZWwudG9fYmYxNihwYXJhbXMlMkMlMjBtYXNrKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxUNet2DConditionModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># By default, the model parameters will be in fp32 precision, to cast these to bfloat16 precision</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_bf16(params)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># If you don&#x27;t want to cast certain parameters (for example layer norm bias and scale)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># then pass the mask as follows</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> flax <span class="hljs-keyword">import</span> traverse_util
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>flat_params = traverse_util.flatten_dict(params)
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = {
<span class="hljs-meta">... </span> path: (path[-<span class="hljs-number">2</span>] != (<span class="hljs-string">&quot;LayerNorm&quot;</span>, <span class="hljs-string">&quot;bias&quot;</span>) <span class="hljs-keyword">and</span> path[-<span class="hljs-number">2</span>:] != (<span class="hljs-string">&quot;LayerNorm&quot;</span>, <span class="hljs-string">&quot;scale&quot;</span>))
<span class="hljs-meta">... </span> <span class="hljs-keyword">for</span> path <span class="hljs-keyword">in</span> flat_params
<span class="hljs-meta">... </span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = traverse_util.unflatten_dict(mask)
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_bf16(params, mask)`}}),{c(){s=l("p"),s.textContent=_,c=n(),f(a.$$.fragment)},l(e){s=i(e,"P",{"data-svelte-h":!0}),p(s)!=="svelte-kvfsh7"&&(s.textContent=_),c=r(e),u(a.$$.fragment,e)},m(e,v){x(e,s,v),x(e,c,v),h(a,e,v),m=!0},p:V,i(e){m||(g(a.$$.fragment,e),m=!0)},o(e){M(a.$$.fragment,e),m=!1},d(e){e&&(d(s),d(c)),b(a,e)}}}function Na(J){let s,_="Examples:",c,a,m;return a=new L({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEZsYXhVTmV0MkRDb25kaXRpb25Nb2RlbCUwQSUwQSUyMyUyMGxvYWQlMjBtb2RlbCUwQW1vZGVsJTJDJTIwcGFyYW1zJTIwJTNEJTIwRmxheFVOZXQyRENvbmRpdGlvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiklMEElMjMlMjBCeSUyMGRlZmF1bHQlMkMlMjB0aGUlMjBtb2RlbCUyMHBhcmFtcyUyMHdpbGwlMjBiZSUyMGluJTIwZnAzMiUyQyUyMHRvJTIwY2FzdCUyMHRoZXNlJTIwdG8lMjBmbG9hdDE2JTBBcGFyYW1zJTIwJTNEJTIwbW9kZWwudG9fZnAxNihwYXJhbXMpJTBBJTIzJTIwSWYlMjB5b3UlMjB3YW50JTIwZG9uJ3QlMjB3YW50JTIwdG8lMjBjYXN0JTIwY2VydGFpbiUyMHBhcmFtZXRlcnMlMjAoZm9yJTIwZXhhbXBsZSUyMGxheWVyJTIwbm9ybSUyMGJpYXMlMjBhbmQlMjBzY2FsZSklMEElMjMlMjB0aGVuJTIwcGFzcyUyMHRoZSUyMG1hc2slMjBhcyUyMGZvbGxvd3MlMEFmcm9tJTIwZmxheCUyMGltcG9ydCUyMHRyYXZlcnNlX3V0aWwlMEElMEFtb2RlbCUyQyUyMHBhcmFtcyUyMCUzRCUyMEZsYXhVTmV0MkRDb25kaXRpb25Nb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIpJTBBZmxhdF9wYXJhbXMlMjAlM0QlMjB0cmF2ZXJzZV91dGlsLmZsYXR0ZW5fZGljdChwYXJhbXMpJTBBbWFzayUyMCUzRCUyMCU3QiUwQSUyMCUyMCUyMCUyMHBhdGglM0ElMjAocGF0aCU1Qi0yJTVEJTIwISUzRCUyMCglMjJMYXllck5vcm0lMjIlMkMlMjAlMjJiaWFzJTIyKSUyMGFuZCUyMHBhdGglNUItMiUzQSU1RCUyMCElM0QlMjAoJTIyTGF5ZXJOb3JtJTIyJTJDJTIwJTIyc2NhbGUlMjIpKSUwQSUyMCUyMCUyMCUyMGZvciUyMHBhdGglMjBpbiUyMGZsYXRfcGFyYW1zJTBBJTdEJTBBbWFzayUyMCUzRCUyMHRyYXZlcnNlX3V0aWwudW5mbGF0dGVuX2RpY3QobWFzayklMEFwYXJhbXMlMjAlM0QlMjBtb2RlbC50b19mcDE2KHBhcmFtcyUyQyUyMG1hc2sp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxUNet2DConditionModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># By default, the model params will be in fp32, to cast these to float16</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_fp16(params)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># If you want don&#x27;t want to cast certain parameters (for example layer norm bias and scale)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># then pass the mask as follows</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> flax <span class="hljs-keyword">import</span> traverse_util
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>flat_params = traverse_util.flatten_dict(params)
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = {
<span class="hljs-meta">... </span> path: (path[-<span class="hljs-number">2</span>] != (<span class="hljs-string">&quot;LayerNorm&quot;</span>, <span class="hljs-string">&quot;bias&quot;</span>) <span class="hljs-keyword">and</span> path[-<span class="hljs-number">2</span>:] != (<span class="hljs-string">&quot;LayerNorm&quot;</span>, <span class="hljs-string">&quot;scale&quot;</span>))
<span class="hljs-meta">... </span> <span class="hljs-keyword">for</span> path <span class="hljs-keyword">in</span> flat_params
<span class="hljs-meta">... </span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = traverse_util.unflatten_dict(mask)
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_fp16(params, mask)`}}),{c(){s=l("p"),s.textContent=_,c=n(),f(a.$$.fragment)},l(e){s=i(e,"P",{"data-svelte-h":!0}),p(s)!=="svelte-kvfsh7"&&(s.textContent=_),c=r(e),u(a.$$.fragment,e)},m(e,v){x(e,s,v),x(e,c,v),h(a,e,v),m=!0},p:V,i(e){m||(g(a.$$.fragment,e),m=!0)},o(e){M(a.$$.fragment,e),m=!1},d(e){e&&(d(s),d(c)),b(a,e)}}}function Xa(J){let s,_="Examples:",c,a,m;return a=new L({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEZsYXhVTmV0MkRDb25kaXRpb25Nb2RlbCUwQSUwQSUyMyUyMERvd25sb2FkJTIwbW9kZWwlMjBhbmQlMjBjb25maWd1cmF0aW9uJTIwZnJvbSUyMGh1Z2dpbmdmYWNlLmNvJTBBbW9kZWwlMkMlMjBwYXJhbXMlMjAlM0QlMjBGbGF4VU5ldDJEQ29uZGl0aW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyKSUwQSUyMyUyMEJ5JTIwZGVmYXVsdCUyQyUyMHRoZSUyMG1vZGVsJTIwcGFyYW1zJTIwd2lsbCUyMGJlJTIwaW4lMjBmcDMyJTJDJTIwdG8lMjBpbGx1c3RyYXRlJTIwdGhlJTIwdXNlJTIwb2YlMjB0aGlzJTIwbWV0aG9kJTJDJTBBJTIzJTIwd2UnbGwlMjBmaXJzdCUyMGNhc3QlMjB0byUyMGZwMTYlMjBhbmQlMjBiYWNrJTIwdG8lMjBmcDMyJTBBcGFyYW1zJTIwJTNEJTIwbW9kZWwudG9fZjE2KHBhcmFtcyklMEElMjMlMjBub3clMjBjYXN0JTIwYmFjayUyMHRvJTIwZnAzMiUwQXBhcmFtcyUyMCUzRCUyMG1vZGVsLnRvX2ZwMzIocGFyYW1zKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxUNet2DConditionModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download model and configuration from huggingface.co</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># By default, the model params will be in fp32, to illustrate the use of this method,</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># we&#x27;ll first cast to fp16 and back to fp32</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_f16(params)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># now cast back to fp32</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_fp32(params)`}}),{c(){s=l("p"),s.textContent=_,c=n(),f(a.$$.fragment)},l(e){s=i(e,"P",{"data-svelte-h":!0}),p(s)!=="svelte-kvfsh7"&&(s.textContent=_),c=r(e),u(a.$$.fragment,e)},m(e,v){x(e,s,v),x(e,c,v),h(a,e,v),m=!0},p:V,i(e){m||(g(a.$$.fragment,e),m=!0)},o(e){M(a.$$.fragment,e),m=!1},d(e){e&&(d(s),d(c)),b(a,e)}}}function Ea(J){let s,_="Examples:",c,a,m;return a=new L({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTBBJTBBdW5ldCUyMCUzRCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24tMiUyMiUyQyUyMHN1YmZvbGRlciUzRCUyMnVuZXQlMjIpJTBBJTBBJTIzJTIwUHVzaCUyMHRoZSUyMCU2MHVuZXQlNjAlMjB0byUyMHlvdXIlMjBuYW1lc3BhY2UlMjB3aXRoJTIwdGhlJTIwbmFtZSUyMCUyMm15LWZpbmV0dW5lZC11bmV0JTIyLiUwQXVuZXQucHVzaF90b19odWIoJTIybXktZmluZXR1bmVkLXVuZXQlMjIpJTBBJTBBJTIzJTIwUHVzaCUyMHRoZSUyMCU2MHVuZXQlNjAlMjB0byUyMGFuJTIwb3JnYW5pemF0aW9uJTIwd2l0aCUyMHRoZSUyMG5hbWUlMjAlMjJteS1maW5ldHVuZWQtdW5ldCUyMi4lMEF1bmV0LnB1c2hfdG9faHViKCUyMnlvdXItb3JnJTJGbXktZmluZXR1bmVkLXVuZXQlMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel
unet = UNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-2&quot;</span>, subfolder=<span class="hljs-string">&quot;unet&quot;</span>)
<span class="hljs-comment"># Push the \`unet\` to your namespace with the name &quot;my-finetuned-unet&quot;.</span>
unet.push_to_hub(<span class="hljs-string">&quot;my-finetuned-unet&quot;</span>)
<span class="hljs-comment"># Push the \`unet\` to an organization with the name &quot;my-finetuned-unet&quot;.</span>
unet.push_to_hub(<span class="hljs-string">&quot;your-org/my-finetuned-unet&quot;</span>)`}}),{c(){s=l("p"),s.textContent=_,c=n(),f(a.$$.fragment)},l(e){s=i(e,"P",{"data-svelte-h":!0}),p(s)!=="svelte-kvfsh7"&&(s.textContent=_),c=r(e),u(a.$$.fragment,e)},m(e,v){x(e,s,v),x(e,c,v),h(a,e,v),m=!0},p:V,i(e){m||(g(a.$$.fragment,e),m=!0)},o(e){M(a.$$.fragment,e),m=!1},d(e){e&&(d(s),d(c)),b(a,e)}}}function Ya(J){let s,_,c,a,m,e,v,tt,Cs="Models",Ot,oe,Mo,Kt,wa='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>p</mi><mi>θ</mi></msub><mo stretchy="false">(</mo><msub><mi>x</mi><mrow><mi>t</mi><mo>−</mo><mn>1</mn></mrow></msub><mi mathvariant="normal">∣</mi><msub><mi>x</mi><mi>t</mi></msub><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">p_{\\theta}(x_{t-1}|x_{t})</annotation></semantics></math></span><span class="katex-html hidden" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord"><span class="mord mathnormal">p</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3361em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight" style="margin-right:0.02778em;">θ</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mopen">(</span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">t</span><span class="mbin mtight">−</span><span class="mord mtight">1</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2083em;"><span></span></span></span></span></span></span><span class="mord">∣</span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.2806em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">t</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mclose">)</span></span></span></span>',eo,to,Ue,Gs='All models are built from the base <a href="/docs/diffusers/v0.25.0/pt/api/models/overview#diffusers.ModelMixin">ModelMixin</a> class which is a <a href="https://pytorch.org/docs/stable/generated/torch.nn.Module.html" rel="nofollow"><code>torch.nn.Module</code></a> providing basic functionality for saving and loading models, locally and from the Hugging Face Hub.',oo,A,se,Pt,Je,bo,ot,Is="ModelMixin",so,$,je,yo,st,Fs="Base class for all models.",vo,at,Ws=`<a href="/docs/diffusers/v0.25.0/pt/api/models/overview#diffusers.ModelMixin">ModelMixin</a> takes care of storing the model configuration and provides methods for loading, downloading and
saving models.`,_o,nt,Bs='<li><strong>config_name</strong> (<code>str</code>) — Filename to save a model to when calling <a href="/docs/diffusers/v0.25.0/pt/api/models/overview#diffusers.ModelMixin.save_pretrained">save_pretrained()</a>.</li>',xo,H,ke,wo,rt,Vs="Gets the current list of active adapters of the model.",$o,lt,Rs=`If you are not familiar with adapters and PEFT methods, we invite you to read more about them on the PEFT
official documentation: <a href="https://huggingface.co/docs/peft" rel="nofollow">https://huggingface.co/docs/peft</a>`,To,N,Ze,Uo,it,Hs=`Adds a new adapter to the current model for training. If no adapter name is passed, a default name is assigned
to the adapter to follow the convention of the PEFT library.`,Jo,dt,Ns=`If you are not familiar with adapters and PEFT methods, we invite you to read more about them in the PEFT
<a href="https://huggingface.co/docs/peft" rel="nofollow">documentation</a>.`,jo,X,Ce,ko,ct,Xs="Disable all adapters attached to the model and fallback to inference with the base model only.",Zo,mt,Es=`If you are not familiar with adapters and PEFT methods, we invite you to read more about them on the PEFT
official documentation: <a href="https://huggingface.co/docs/peft" rel="nofollow">https://huggingface.co/docs/peft</a>`,Co,ae,Ge,Go,pt,Ys=`Deactivates gradient checkpointing for the current model (may be referred to as <em>activation checkpointing</em> or
<em>checkpoint activations</em> in other frameworks).`,Io,ne,Ie,Fo,ft,zs='Disable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>.',Wo,E,Fe,Bo,ut,Ps=`Enable adapters that are attached to the model. The model will use <code>self.active_adapters()</code> to retrieve the
list of adapters to enable.`,Vo,ht,Ss=`If you are not familiar with adapters and PEFT methods, we invite you to read more about them on the PEFT
official documentation: <a href="https://huggingface.co/docs/peft" rel="nofollow">https://huggingface.co/docs/peft</a>`,Ro,re,We,Ho,gt,Ds=`Activates gradient checkpointing for the current model (may be referred to as <em>activation checkpointing</em> or
<em>checkpoint activations</em> in other frameworks).`,No,G,Be,Xo,Mt,Qs='Enable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>.',Eo,bt,Ls=`When this option is enabled, you should observe lower GPU memory usage and a potential speed up during
inference. Speed up during training is not guaranteed.`,Yo,le,zo,ie,Po,C,Ve,So,yt,As="Instantiate a pretrained PyTorch model from a pretrained model configuration.",Do,vt,qs=`The model is set in evaluation mode - <code>model.eval()</code> - by default, and dropout modules are deactivated. To
train the model, set it back in training mode with <code>model.train()</code>.`,Qo,de,Lo,ce,Ao,me,qo,Y,Re,Oo,_t,Os="Get number of (trainable or non-embedding) parameters in the module.",Ko,pe,es,fe,He,ts,xt,Ks=`Save a model and its configuration file to a directory so that it can be reloaded using the
<a href="/docs/diffusers/v0.25.0/pt/api/models/overview#diffusers.ModelMixin.from_pretrained">from_pretrained()</a> class method.`,os,z,Ne,ss,wt,ea="Sets a specific adapter by forcing the model to only use that adapter and disables the other adapters.",as,$t,ta=`If you are not familiar with adapters and PEFT methods, we invite you to read more about them on the PEFT
official documentation: <a href="https://huggingface.co/docs/peft" rel="nofollow">https://huggingface.co/docs/peft</a>`,ao,q,ue,St,Xe,ns,Tt,oa="FlaxModelMixin",no,j,Ee,rs,Ut,sa="Base class for all Flax models.",ls,Jt,aa=`<a href="/docs/diffusers/v0.25.0/pt/api/models/overview#diffusers.FlaxModelMixin">FlaxModelMixin</a> takes care of storing the model configuration and provides methods for loading, downloading and
saving models.`,is,jt,na='<li><strong>config_name</strong> (<code>str</code>) — Filename to save a model to when calling <a href="/docs/diffusers/v0.25.0/pt/api/models/overview#diffusers.FlaxModelMixin.save_pretrained">save_pretrained()</a>.</li>',ds,I,Ye,cs,kt,ra="Instantiate a pretrained Flax model from a pretrained model configuration.",ms,he,ps,ge,fs,Me,ze,us,Zt,la=`Save a model and its configuration file to a directory so that it can be reloaded using the
<a href="/docs/diffusers/v0.25.0/pt/api/models/overview#diffusers.FlaxModelMixin.from_pretrained">from_pretrained()</a> class method.`,hs,F,Pe,gs,Ct,ia=`Cast the floating-point <code>params</code> to <code>jax.numpy.bfloat16</code>. This returns a new <code>params</code> tree and does not cast
the <code>params</code> in place.`,Ms,Gt,da=`This method can be used on a TPU to explicitly convert the model parameters to bfloat16 precision to do full
half-precision training or to save weights in bfloat16 for inference in order to save memory and improve speed.`,bs,be,ys,W,Se,vs,It,ca=`Cast the floating-point <code>params</code> to <code>jax.numpy.float16</code>. This returns a new <code>params</code> tree and does not cast the
<code>params</code> in place.`,_s,Ft,ma=`This method can be used on a GPU to explicitly convert the model parameters to float16 precision to do full
half-precision training or to save weights in float16 for inference in order to save memory and improve speed.`,xs,ye,ws,P,De,$s,Wt,pa=`Cast the floating-point <code>params</code> to <code>jax.numpy.float32</code>. This method can be used to explicitly convert the
model parameters to fp32 precision. This returns a new <code>params</code> tree and does not cast the <code>params</code> in place.`,Ts,ve,ro,O,_e,Dt,Qe,Us,Bt,fa="PushToHubMixin",lo,R,Le,Js,Vt,ua="A Mixin to push a model, scheduler, or pipeline to the Hugging Face Hub.",js,S,Ae,ks,Rt,ha="Upload model, scheduler, or pipeline files to the 🤗 Hugging Face Hub.",Zs,xe,io;return e=new go({}),Je=new go({}),je=new k({props:{name:"class diffusers.ModelMixin",anchor:"diffusers.ModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_utils.py#L186"}}),ke=new k({props:{name:"active_adapters",anchor:"diffusers.ModelMixin.active_adapters",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_utils.py#L435"}}),Ze=new k({props:{name:"add_adapter",anchor:"diffusers.ModelMixin.add_adapter",parameters:[{name:"adapter_config",val:""},{name:"adapter_name",val:": str = 'default'"}],parametersDescription:[{anchor:"diffusers.ModelMixin.add_adapter.adapter_config",description:`<strong>adapter_config</strong> (<code>[~peft.PeftConfig]</code>) &#x2014;
The configuration of the adapter to add; supported adapters are non-prefix tuning and adaption prompt
methods.`,name:"adapter_config"},{anchor:"diffusers.ModelMixin.add_adapter.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;default&quot;</code>) &#x2014;
The name of the adapter to add. If no name is passed, a default name is assigned to the adapter.`,name:"adapter_name"}],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_utils.py#L306"}}),Ce=new k({props:{name:"disable_adapters",anchor:"diffusers.ModelMixin.disable_adapters",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_utils.py#L390"}}),Ge=new k({props:{name:"disable_gradient_checkpointing",anchor:"diffusers.ModelMixin.disable_gradient_checkpointing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_utils.py#L239"}}),Ie=new k({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.ModelMixin.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_utils.py#L300"}}),Fe=new k({props:{name:"enable_adapters",anchor:"diffusers.ModelMixin.enable_adapters",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_utils.py#L412"}}),We=new k({props:{name:"enable_gradient_checkpointing",anchor:"diffusers.ModelMixin.enable_gradient_checkpointing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_utils.py#L230"}}),Be=new k({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": Optional = None"}],parametersDescription:[{anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_utils.py#L264"}}),le=new xa({props:{warning:!0,$$slots:{default:[Ca]},$$scope:{ctx:J}}}),ie=new Q({props:{anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Ga]},$$scope:{ctx:J}}}),Ve=new k({props:{name:"from_pretrained",anchor:"diffusers.ModelMixin.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": Union"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.ModelMixin.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> (for example <code>google/ddpm-celebahq-256</code>) of a pretrained model hosted on
the Hub.</li>
<li>A path to a <em>directory</em> (for example <code>./my_model_directory</code>) containing the model weights saved
with <a href="/docs/diffusers/v0.25.0/pt/api/models/overview#diffusers.ModelMixin.save_pretrained">save_pretrained()</a>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.ModelMixin.from_pretrained.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.ModelMixin.from_pretrained.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.ModelMixin.from_pretrained.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.ModelMixin.from_pretrained.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.ModelMixin.from_pretrained.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.ModelMixin.from_pretrained.output_loading_info",description:`<strong>output_loading_info</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages.`,name:"output_loading_info"},{anchor:"diffusers.ModelMixin.from_pretrained.local_files_only(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <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(bool,"},{anchor:"diffusers.ModelMixin.from_pretrained.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.ModelMixin.from_pretrained.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.ModelMixin.from_pretrained.from_flax",description:`<strong>from_flax</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Load the model weights from a Flax checkpoint save file.`,name:"from_flax"},{anchor:"diffusers.ModelMixin.from_pretrained.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.ModelMixin.from_pretrained.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to resolve accessibility issues if you&#x2019;re downloading a model in China. We do not
guarantee the timeliness or safety of the source, and you should refer to the mirror site for more
information.`,name:"mirror"},{anchor:"diffusers.ModelMixin.from_pretrained.device_map",description:`<strong>device_map</strong> (<code>str</code> or <code>Dict[str, Union[int, str, torch.device]]</code>, <em>optional</em>) &#x2014;
A map that specifies where each submodule should go. It doesn&#x2019;t need to be defined for each
parameter/buffer name; once a given module name is inside, every submodule of it will be sent to the
same device.</p>
<p>Set <code>device_map=&quot;auto&quot;</code> to have &#x1F917; Accelerate automatically compute the most optimized <code>device_map</code>. For
more information about each option see <a href="https://hf.co/docs/accelerate/main/en/usage_guides/big_modeling#designing-a-device-map" rel="nofollow">designing a device
map</a>.`,name:"device_map"},{anchor:"diffusers.ModelMixin.from_pretrained.max_memory",description:`<strong>max_memory</strong> (<code>Dict</code>, <em>optional</em>) &#x2014;
A dictionary device identifier for the maximum memory. Will default to the maximum memory available for
each GPU and the available CPU RAM if unset.`,name:"max_memory"},{anchor:"diffusers.ModelMixin.from_pretrained.offload_folder",description:`<strong>offload_folder</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
The path to offload weights if <code>device_map</code> contains the value <code>&quot;disk&quot;</code>.`,name:"offload_folder"},{anchor:"diffusers.ModelMixin.from_pretrained.offload_state_dict",description:`<strong>offload_state_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If <code>True</code>, temporarily offloads the CPU state dict to the hard drive to avoid running out of CPU RAM if
the weight of the CPU state dict + the biggest shard of the checkpoint does not fit. Defaults to <code>True</code>
when there is some disk offload.`,name:"offload_state_dict"},{anchor:"diffusers.ModelMixin.from_pretrained.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 else <code>False</code>) &#x2014;
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.ModelMixin.from_pretrained.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Load weights from a specified <code>variant</code> filename such as <code>&quot;fp16&quot;</code> or <code>&quot;ema&quot;</code>. This is ignored when
loading <code>from_flax</code>.`,name:"variant"},{anchor:"diffusers.ModelMixin.from_pretrained.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 <code>safetensors</code> weights are downloaded if they&#x2019;re available <strong>and</strong> if the
<code>safetensors</code> library is installed. If set to <code>True</code>, the model is forcibly loaded from <code>safetensors</code>
weights. If set to <code>False</code>, <code>safetensors</code> weights are not loaded.`,name:"use_safetensors"}],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_utils.py#L536"}}),de=new xa({props:{$$slots:{default:[Ia]},$$scope:{ctx:J}}}),ce=new Q({props:{anchor:"diffusers.ModelMixin.from_pretrained.example",$$slots:{default:[Fa]},$$scope:{ctx:J}}}),me=new Q({props:{anchor:"diffusers.ModelMixin.from_pretrained.example-2",$$slots:{default:[Wa]},$$scope:{ctx:J}}}),Re=new k({props:{name:"num_parameters",anchor:"diffusers.ModelMixin.num_parameters",parameters:[{name:"only_trainable",val:": bool = False"},{name:"exclude_embeddings",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.ModelMixin.num_parameters.only_trainable",description:`<strong>only_trainable</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return only the number of trainable parameters.`,name:"only_trainable"},{anchor:"diffusers.ModelMixin.num_parameters.exclude_embeddings",description:`<strong>exclude_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return only the number of non-embedding parameters.`,name:"exclude_embeddings"}],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_utils.py#L1036",returnDescription:`
<p>The number of parameters.</p>
`,returnType:`
<p><code>int</code></p>
`}}),pe=new Q({props:{anchor:"diffusers.ModelMixin.num_parameters.example",$$slots:{default:[Ba]},$$scope:{ctx:J}}}),He=new k({props:{name:"save_pretrained",anchor:"diffusers.ModelMixin.save_pretrained",parameters:[{name:"save_directory",val:": Union"},{name:"is_main_process",val:": bool = True"},{name:"save_function",val:": Optional = None"},{name:"safe_serialization",val:": bool = True"},{name:"variant",val:": Optional = None"},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.ModelMixin.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to save a model and its configuration file to. Will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"diffusers.ModelMixin.save_pretrained.is_main_process",description:`<strong>is_main_process</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the process calling this is the main process or not. Useful during distributed training and you
need to call this function on all processes. In this case, set <code>is_main_process=True</code> only on the main
process to avoid race conditions.`,name:"is_main_process"},{anchor:"diffusers.ModelMixin.save_pretrained.save_function",description:`<strong>save_function</strong> (<code>Callable</code>) &#x2014;
The function to use to save the state dictionary. Useful during distributed training when you need to
replace <code>torch.save</code> with another method. Can be configured with the environment variable
<code>DIFFUSERS_SAVE_MODE</code>.`,name:"save_function"},{anchor:"diffusers.ModelMixin.save_pretrained.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to save the model using <code>safetensors</code> or the traditional PyTorch way with <code>pickle</code>.`,name:"safe_serialization"},{anchor:"diffusers.ModelMixin.save_pretrained.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
If specified, weights are saved in the format <code>pytorch_model.&lt;variant&gt;.bin</code>.`,name:"variant"},{anchor:"diffusers.ModelMixin.save_pretrained.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push your model to the Hugging Face Hub after saving it. You can specify the
repository you want to push to with <code>repo_id</code> (will default to the name of <code>save_directory</code> in your
namespace).`,name:"push_to_hub"},{anchor:"diffusers.ModelMixin.save_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments passed along to the <a href="/docs/diffusers/v0.25.0/pt/api/schedulers/overview#diffusers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_utils.py#L453"}}),Ne=new k({props:{name:"set_adapter",anchor:"diffusers.ModelMixin.set_adapter",parameters:[{name:"adapter_name",val:": Union"}],parametersDescription:[{anchor:"diffusers.ModelMixin.set_adapter.adapter_name",description:`<strong>adapter_name</strong> (Union[str, List[str]])) &#x2014;
The list of adapters to set or the adapter name in case of single adapter.`,name:"adapter_name"}],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_utils.py#L341"}}),Xe=new go({}),Ee=new k({props:{name:"class diffusers.FlaxModelMixin",anchor:"diffusers.FlaxModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_flax_utils.py#L50"}}),Ye=new k({props:{name:"from_pretrained",anchor:"diffusers.FlaxModelMixin.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": Union"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"*model_args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.FlaxModelMixin.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> (for example <code>runwayml/stable-diffusion-v1-5</code>) of a pretrained model
hosted on the Hub.</li>
<li>A path to a <em>directory</em> (for example <code>./my_model_directory</code>) containing the model weights saved
using <a href="/docs/diffusers/v0.25.0/pt/api/models/overview#diffusers.FlaxModelMixin.save_pretrained">save_pretrained()</a>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified, all the computation will be performed with the given <code>dtype</code>.</p>
<div class="course-tip bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
<p>This only specifies the dtype of the <em>computation</em> and does not influence the dtype of model
parameters.</p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/diffusers/v0.25.0/pt/api/models/overview#diffusers.FlaxModelMixin.to_fp16">to_fp16()</a> and
<a href="/docs/diffusers/v0.25.0/pt/api/models/overview#diffusers.FlaxModelMixin.to_bf16">to_bf16()</a>.</p>
</div>`,name:"dtype"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.model_args",description:`<strong>model_args</strong> (sequence of positional arguments, <em>optional</em>) &#x2014;
All remaining positional arguments are passed to the underlying model&#x2019;s <code>__init__</code> method.`,name:"model_args"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.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.FlaxModelMixin.from_pretrained.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.FlaxModelMixin.from_pretrained.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.FlaxModelMixin.from_pretrained.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.FlaxModelMixin.from_pretrained.local_files_only(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <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(bool,"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.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.FlaxModelMixin.from_pretrained.from_pt",description:`<strong>from_pt</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Load the model weights from a PyTorch checkpoint save file.`,name:"from_pt"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) &#x2014;
Can be used to update the configuration object (after it is loaded) and initiate the model (for
example, <code>output_attentions=True</code>). Behaves differently depending on whether a <code>config</code> is provided or
automatically loaded:</p>
<ul>
<li>If a configuration is provided with <code>config</code>, <code>kwargs</code> are directly passed to the underlying
model&#x2019;s <code>__init__</code> method (we assume all relevant updates to the configuration have already been
done).</li>
<li>If a configuration is not provided, <code>kwargs</code> are first passed to the configuration class
initialization function <a href="/docs/diffusers/v0.25.0/pt/api/configuration#diffusers.ConfigMixin.from_config">from_config()</a>. Each key of the <code>kwargs</code> that corresponds
to a configuration attribute is used to override said attribute with the supplied <code>kwargs</code> value.
Remaining keys that do not correspond to any configuration attribute are passed to the underlying
model&#x2019;s <code>__init__</code> function.</li>
</ul>`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_flax_utils.py#L203"}}),he=new Q({props:{anchor:"diffusers.FlaxModelMixin.from_pretrained.example",$$slots:{default:[Va]},$$scope:{ctx:J}}}),ge=new Q({props:{anchor:"diffusers.FlaxModelMixin.from_pretrained.example-2",$$slots:{default:[Ra]},$$scope:{ctx:J}}}),ze=new k({props:{name:"save_pretrained",anchor:"diffusers.FlaxModelMixin.save_pretrained",parameters:[{name:"save_directory",val:": Union"},{name:"params",val:": Union"},{name:"is_main_process",val:": bool = True"},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.FlaxModelMixin.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to save a model and its configuration file to. Will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"diffusers.FlaxModelMixin.save_pretrained.params",description:`<strong>params</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> of model parameters.`,name:"params"},{anchor:"diffusers.FlaxModelMixin.save_pretrained.is_main_process",description:`<strong>is_main_process</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the process calling this is the main process or not. Useful during distributed training and you
need to call this function on all processes. In this case, set <code>is_main_process=True</code> only on the main
process to avoid race conditions.`,name:"is_main_process"},{anchor:"diffusers.FlaxModelMixin.save_pretrained.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push your model to the Hugging Face model hub after saving it. You can specify the
repository you want to push to with <code>repo_id</code> (will default to the name of <code>save_directory</code> in your
namespace).`,name:"push_to_hub"},{anchor:"diffusers.FlaxModelMixin.save_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional key word arguments passed along to the <a href="/docs/diffusers/v0.25.0/pt/api/schedulers/overview#diffusers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_flax_utils.py#L502"}}),Pe=new k({props:{name:"to_bf16",anchor:"diffusers.FlaxModelMixin.to_bf16",parameters:[{name:"params",val:": Union"},{name:"mask",val:": Any = None"}],parametersDescription:[{anchor:"diffusers.FlaxModelMixin.to_bf16.params",description:`<strong>params</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> of model parameters.`,name:"params"},{anchor:"diffusers.FlaxModelMixin.to_bf16.mask",description:`<strong>mask</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> with same structure as the <code>params</code> tree. The leaves should be booleans. It should be <code>True</code>
for params you want to cast, and <code>False</code> for those you want to skip.`,name:"mask"}],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_flax_utils.py#L95"}}),be=new Q({props:{anchor:"diffusers.FlaxModelMixin.to_bf16.example",$$slots:{default:[Ha]},$$scope:{ctx:J}}}),Se=new k({props:{name:"to_fp16",anchor:"diffusers.FlaxModelMixin.to_fp16",parameters:[{name:"params",val:": Union"},{name:"mask",val:": Any = None"}],parametersDescription:[{anchor:"diffusers.FlaxModelMixin.to_fp16.params",description:`<strong>params</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> of model parameters.`,name:"params"},{anchor:"diffusers.FlaxModelMixin.to_fp16.mask",description:`<strong>mask</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> with same structure as the <code>params</code> tree. The leaves should be booleans. It should be <code>True</code>
for params you want to cast, and <code>False</code> for those you want to skip.`,name:"mask"}],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_flax_utils.py#L161"}}),ye=new Q({props:{anchor:"diffusers.FlaxModelMixin.to_fp16.example",$$slots:{default:[Na]},$$scope:{ctx:J}}}),De=new k({props:{name:"to_fp32",anchor:"diffusers.FlaxModelMixin.to_fp32",parameters:[{name:"params",val:": Union"},{name:"mask",val:": Any = None"}],parametersDescription:[{anchor:"diffusers.FlaxModelMixin.to_fp32.params",description:`<strong>params</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> of model parameters.`,name:"params"},{anchor:"diffusers.FlaxModelMixin.to_fp32.mask",description:`<strong>mask</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> with same structure as the <code>params</code> tree. The leaves should be booleans. It should be <code>True</code>
for params you want to cast, and <code>False</code> for those you want to skip.`,name:"mask"}],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/models/modeling_flax_utils.py#L134"}}),ve=new Q({props:{anchor:"diffusers.FlaxModelMixin.to_fp32.example",$$slots:{default:[Xa]},$$scope:{ctx:J}}}),Qe=new go({}),Le=new k({props:{name:"class diffusers.utils.PushToHubMixin",anchor:"diffusers.utils.PushToHubMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/utils/hub_utils.py#L361"}}),Ae=new k({props:{name:"push_to_hub",anchor:"diffusers.utils.PushToHubMixin.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"commit_message",val:": Optional = None"},{name:"private",val:": Optional = None"},{name:"token",val:": Optional = None"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = True"},{name:"variant",val:": Optional = None"}],parametersDescription:[{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repository you want to push your model, scheduler, or pipeline files to. It should
contain your organization name when pushing to an organization. <code>repo_id</code> can also be a path to a local
directory.`,name:"repo_id"},{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Message to commit while pushing. Default to <code>&quot;Upload {object}&quot;</code>.`,name:"commit_message"},{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not the repository created should be private.`,name:"private"},{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. The token generated when running
<code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to create a PR with the uploaded files or directly commit.`,name:"create_pr"},{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to convert the model weights to the <code>safetensors</code> format.`,name:"safe_serialization"},{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
If specified, weights are saved in the format <code>pytorch_model.&lt;variant&gt;.bin</code>.`,name:"variant"}],source:"https://github.com/huggingface/diffusers/blob/v0.25.0/src/diffusers/utils/hub_utils.py#L390"}}),xe=new Q({props:{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.example",$$slots:{default:[Ea]},$$scope:{ctx:J}}}),{c(){s=l("meta"),_=n(),c=l("h1"),a=l("a"),m=l("span"),f(e.$$.fragment),v=n(),tt=l("span"),tt.textContent=Cs,Ot=n(),oe=l("p"),Mo=va("🤗 Diffusers provides pretrained models for popular algorithms and modules to create custom diffusion systems. The primary function of models is to denoise an input sample as modeled by the distribution "),Kt=new ja(!1),eo=va("."),to=n(),Ue=l("p"),Ue.innerHTML=Gs,oo=n(),A=l("h2"),se=l("a"),Pt=l("span"),f(Je.$$.fragment),bo=n(),ot=l("span"),ot.textContent=Is,so=n(),$=l("div"),f(je.$$.fragment),yo=n(),st=l("p"),st.textContent=Fs,vo=n(),at=l("p"),at.innerHTML=Ws,_o=n(),nt=l("ul"),nt.innerHTML=Bs,xo=n(),H=l("div"),f(ke.$$.fragment),wo=n(),rt=l("p"),rt.textContent=Vs,$o=n(),lt=l("p"),lt.innerHTML=Rs,To=n(),N=l("div"),f(Ze.$$.fragment),Uo=n(),it=l("p"),it.textContent=Hs,Jo=n(),dt=l("p"),dt.innerHTML=Ns,jo=n(),X=l("div"),f(Ce.$$.fragment),ko=n(),ct=l("p"),ct.textContent=Xs,Zo=n(),mt=l("p"),mt.innerHTML=Es,Co=n(),ae=l("div"),f(Ge.$$.fragment),Go=n(),pt=l("p"),pt.innerHTML=Ys,Io=n(),ne=l("div"),f(Ie.$$.fragment),Fo=n(),ft=l("p"),ft.innerHTML=zs,Wo=n(),E=l("div"),f(Fe.$$.fragment),Bo=n(),ut=l("p"),ut.innerHTML=Ps,Vo=n(),ht=l("p"),ht.innerHTML=Ss,Ro=n(),re=l("div"),f(We.$$.fragment),Ho=n(),gt=l("p"),gt.innerHTML=Ds,No=n(),G=l("div"),f(Be.$$.fragment),Xo=n(),Mt=l("p"),Mt.innerHTML=Qs,Eo=n(),bt=l("p"),bt.textContent=Ls,Yo=n(),f(le.$$.fragment),zo=n(),f(ie.$$.fragment),Po=n(),C=l("div"),f(Ve.$$.fragment),So=n(),yt=l("p"),yt.textContent=As,Do=n(),vt=l("p"),vt.innerHTML=qs,Qo=n(),f(de.$$.fragment),Lo=n(),f(ce.$$.fragment),Ao=n(),f(me.$$.fragment),qo=n(),Y=l("div"),f(Re.$$.fragment),Oo=n(),_t=l("p"),_t.textContent=Os,Ko=n(),f(pe.$$.fragment),es=n(),fe=l("div"),f(He.$$.fragment),ts=n(),xt=l("p"),xt.innerHTML=Ks,os=n(),z=l("div"),f(Ne.$$.fragment),ss=n(),wt=l("p"),wt.textContent=ea,as=n(),$t=l("p"),$t.innerHTML=ta,ao=n(),q=l("h2"),ue=l("a"),St=l("span"),f(Xe.$$.fragment),ns=n(),Tt=l("span"),Tt.textContent=oa,no=n(),j=l("div"),f(Ee.$$.fragment),rs=n(),Ut=l("p"),Ut.textContent=sa,ls=n(),Jt=l("p"),Jt.innerHTML=aa,is=n(),jt=l("ul"),jt.innerHTML=na,ds=n(),I=l("div"),f(Ye.$$.fragment),cs=n(),kt=l("p"),kt.textContent=ra,ms=n(),f(he.$$.fragment),ps=n(),f(ge.$$.fragment),fs=n(),Me=l("div"),f(ze.$$.fragment),us=n(),Zt=l("p"),Zt.innerHTML=la,hs=n(),F=l("div"),f(Pe.$$.fragment),gs=n(),Ct=l("p"),Ct.innerHTML=ia,Ms=n(),Gt=l("p"),Gt.textContent=da,bs=n(),f(be.$$.fragment),ys=n(),W=l("div"),f(Se.$$.fragment),vs=n(),It=l("p"),It.innerHTML=ca,_s=n(),Ft=l("p"),Ft.textContent=ma,xs=n(),f(ye.$$.fragment),ws=n(),P=l("div"),f(De.$$.fragment),$s=n(),Wt=l("p"),Wt.innerHTML=pa,Ts=n(),f(ve.$$.fragment),ro=n(),O=l("h2"),_e=l("a"),Dt=l("span"),f(Qe.$$.fragment),Us=n(),Bt=l("span"),Bt.textContent=fa,lo=n(),R=l("div"),f(Le.$$.fragment),Js=n(),Vt=l("p"),Vt.textContent=ua,js=n(),S=l("div"),f(Ae.$$.fragment),ks=n(),Rt=l("p"),Rt.textContent=ha,Zs=n(),f(xe.$$.fragment),this.h()},l(o){const y=ka("svelte-1phssyn",document.head);s=i(y,"META",{name:!0,content:!0}),y.forEach(d),_=r(o),c=i(o,"H1",{class:!0});var qe=U(c);a=i(qe,"A",{id:!0,class:!0,href:!0});var Qt=U(a);m=i(Qt,"SPAN",{});var Lt=U(m);u(e.$$.fragment,Lt),Lt.forEach(d),Qt.forEach(d),v=r(qe),tt=i(qe,"SPAN",{"data-svelte-h":!0}),p(tt)!=="svelte-14dxrcz"&&(tt.textContent=Cs),qe.forEach(d),Ot=r(o),oe=i(o,"P",{});var Oe=U(oe);Mo=_a(Oe,"🤗 Diffusers provides pretrained models for popular algorithms and modules to create custom diffusion systems. The primary function of models is to denoise an input sample as modeled by the distribution "),Kt=Za(Oe,!1),eo=_a(Oe,"."),Oe.forEach(d),to=r(o),Ue=i(o,"P",{"data-svelte-h":!0}),p(Ue)!=="svelte-11pvhx1"&&(Ue.innerHTML=Gs),oo=r(o),A=i(o,"H2",{class:!0});var Ke=U(A);se=i(Ke,"A",{id:!0,class:!0,href:!0});var At=U(se);Pt=i(At,"SPAN",{});var qt=U(Pt);u(Je.$$.fragment,qt),qt.forEach(d),At.forEach(d),bo=r(Ke),ot=i(Ke,"SPAN",{"data-svelte-h":!0}),p(ot)!=="svelte-jhwaff"&&(ot.textContent=Is),Ke.forEach(d),so=r(o),$=i(o,"DIV",{class:!0});var T=U($);u(je.$$.fragment,T),yo=r(T),st=i(T,"P",{"data-svelte-h":!0}),p(st)!=="svelte-12nk4t7"&&(st.textContent=Fs),vo=r(T),at=i(T,"P",{"data-svelte-h":!0}),p(at)!=="svelte-yflw15"&&(at.innerHTML=Ws),_o=r(T),nt=i(T,"UL",{"data-svelte-h":!0}),p(nt)!=="svelte-1qoc9k0"&&(nt.innerHTML=Bs),xo=r(T),H=i(T,"DIV",{class:!0});var K=U(H);u(ke.$$.fragment,K),wo=r(K),rt=i(K,"P",{"data-svelte-h":!0}),p(rt)!=="svelte-1i9yvzx"&&(rt.textContent=Vs),$o=r(K),lt=i(K,"P",{"data-svelte-h":!0}),p(lt)!=="svelte-esrgfk"&&(lt.innerHTML=Rs),K.forEach(d),To=r(T),N=i(T,"DIV",{class:!0});var ee=U(N);u(Ze.$$.fragment,ee),Uo=r(ee),it=i(ee,"P",{"data-svelte-h":!0}),p(it)!=="svelte-ayg1h"&&(it.textContent=Hs),Jo=r(ee),dt=i(ee,"P",{"data-svelte-h":!0}),p(dt)!=="svelte-m719pe"&&(dt.innerHTML=Ns),ee.forEach(d),jo=r(T),X=i(T,"DIV",{class:!0});var te=U(X);u(Ce.$$.fragment,te),ko=r(te),ct=i(te,"P",{"data-svelte-h":!0}),p(ct)!=="svelte-stjif2"&&(ct.textContent=Xs),Zo=r(te),mt=i(te,"P",{"data-svelte-h":!0}),p(mt)!=="svelte-esrgfk"&&(mt.innerHTML=Es),te.forEach(d),Co=r(T),ae=i(T,"DIV",{class:!0});var et=U(ae);u(Ge.$$.fragment,et),Go=r(et),pt=i(et,"P",{"data-svelte-h":!0}),p(pt)!=="svelte-jedy0o"&&(pt.innerHTML=Ys),et.forEach(d),Io=r(T),ne=i(T,"DIV",{class:!0});var co=U(ne);u(Ie.$$.fragment,co),Fo=r(co),ft=i(co,"P",{"data-svelte-h":!0}),p(ft)!=="svelte-1vfte1e"&&(ft.innerHTML=zs),co.forEach(d),Wo=r(T),E=i(T,"DIV",{class:!0});var Ht=U(E);u(Fe.$$.fragment,Ht),Bo=r(Ht),ut=i(Ht,"P",{"data-svelte-h":!0}),p(ut)!=="svelte-1wx27ts"&&(ut.innerHTML=Ps),Vo=r(Ht),ht=i(Ht,"P",{"data-svelte-h":!0}),p(ht)!=="svelte-esrgfk"&&(ht.innerHTML=Ss),Ht.forEach(d),Ro=r(T),re=i(T,"DIV",{class:!0});var mo=U(re);u(We.$$.fragment,mo),Ho=r(mo),gt=i(mo,"P",{"data-svelte-h":!0}),p(gt)!=="svelte-1rv66k9"&&(gt.innerHTML=Ds),mo.forEach(d),No=r(T),G=i(T,"DIV",{class:!0});var D=U(G);u(Be.$$.fragment,D),Xo=r(D),Mt=i(D,"P",{"data-svelte-h":!0}),p(Mt)!=="svelte-yfpdyb"&&(Mt.innerHTML=Qs),Eo=r(D),bt=i(D,"P",{"data-svelte-h":!0}),p(bt)!=="svelte-z1uct7"&&(bt.textContent=Ls),Yo=r(D),u(le.$$.fragment,D),zo=r(D),u(ie.$$.fragment,D),D.forEach(d),Po=r(T),C=i(T,"DIV",{class:!0});var B=U(C);u(Ve.$$.fragment,B),So=r(B),yt=i(B,"P",{"data-svelte-h":!0}),p(yt)!=="svelte-1lisopl"&&(yt.textContent=As),Do=r(B),vt=i(B,"P",{"data-svelte-h":!0}),p(vt)!=="svelte-1fnd9e6"&&(vt.innerHTML=qs),Qo=r(B),u(de.$$.fragment,B),Lo=r(B),u(ce.$$.fragment,B),Ao=r(B),u(me.$$.fragment,B),B.forEach(d),qo=r(T),Y=i(T,"DIV",{class:!0});var Nt=U(Y);u(Re.$$.fragment,Nt),Oo=r(Nt),_t=i(Nt,"P",{"data-svelte-h":!0}),p(_t)!=="svelte-1jxmzhx"&&(_t.textContent=Os),Ko=r(Nt),u(pe.$$.fragment,Nt),Nt.forEach(d),es=r(T),fe=i(T,"DIV",{class:!0});var po=U(fe);u(He.$$.fragment,po),ts=r(po),xt=i(po,"P",{"data-svelte-h":!0}),p(xt)!=="svelte-n1en91"&&(xt.innerHTML=Ks),po.forEach(d),os=r(T),z=i(T,"DIV",{class:!0});var Xt=U(z);u(Ne.$$.fragment,Xt),ss=r(Xt),wt=i(Xt,"P",{"data-svelte-h":!0}),p(wt)!=="svelte-1kp30gn"&&(wt.textContent=ea),as=r(Xt),$t=i(Xt,"P",{"data-svelte-h":!0}),p($t)!=="svelte-esrgfk"&&($t.innerHTML=ta),Xt.forEach(d),T.forEach(d),ao=r(o),q=i(o,"H2",{class:!0});var fo=U(q);ue=i(fo,"A",{id:!0,class:!0,href:!0});var ga=U(ue);St=i(ga,"SPAN",{});var Ma=U(St);u(Xe.$$.fragment,Ma),Ma.forEach(d),ga.forEach(d),ns=r(fo),Tt=i(fo,"SPAN",{"data-svelte-h":!0}),p(Tt)!=="svelte-o0xfyy"&&(Tt.textContent=oa),fo.forEach(d),no=r(o),j=i(o,"DIV",{class:!0});var Z=U(j);u(Ee.$$.fragment,Z),rs=r(Z),Ut=i(Z,"P",{"data-svelte-h":!0}),p(Ut)!=="svelte-1kw8rks"&&(Ut.textContent=sa),ls=r(Z),Jt=i(Z,"P",{"data-svelte-h":!0}),p(Jt)!=="svelte-1b7tfmz"&&(Jt.innerHTML=aa),is=r(Z),jt=i(Z,"UL",{"data-svelte-h":!0}),p(jt)!=="svelte-140alyf"&&(jt.innerHTML=na),ds=r(Z),I=i(Z,"DIV",{class:!0});var we=U(I);u(Ye.$$.fragment,we),cs=r(we),kt=i(we,"P",{"data-svelte-h":!0}),p(kt)!=="svelte-72pb05"&&(kt.textContent=ra),ms=r(we),u(he.$$.fragment,we),ps=r(we),u(ge.$$.fragment,we),we.forEach(d),fs=r(Z),Me=i(Z,"DIV",{class:!0});var uo=U(Me);u(ze.$$.fragment,uo),us=r(uo),Zt=i(uo,"P",{"data-svelte-h":!0}),p(Zt)!=="svelte-53ktp8"&&(Zt.innerHTML=la),uo.forEach(d),hs=r(Z),F=i(Z,"DIV",{class:!0});var $e=U(F);u(Pe.$$.fragment,$e),gs=r($e),Ct=i($e,"P",{"data-svelte-h":!0}),p(Ct)!=="svelte-16uni9u"&&(Ct.innerHTML=ia),Ms=r($e),Gt=i($e,"P",{"data-svelte-h":!0}),p(Gt)!=="svelte-1y9zqww"&&(Gt.textContent=da),bs=r($e),u(be.$$.fragment,$e),$e.forEach(d),ys=r(Z),W=i(Z,"DIV",{class:!0});var Te=U(W);u(Se.$$.fragment,Te),vs=r(Te),It=i(Te,"P",{"data-svelte-h":!0}),p(It)!=="svelte-ifz6ak"&&(It.innerHTML=ca),_s=r(Te),Ft=i(Te,"P",{"data-svelte-h":!0}),p(Ft)!=="svelte-yfkr09"&&(Ft.textContent=ma),xs=r(Te),u(ye.$$.fragment,Te),Te.forEach(d),ws=r(Z),P=i(Z,"DIV",{class:!0});var Et=U(P);u(De.$$.fragment,Et),$s=r(Et),Wt=i(Et,"P",{"data-svelte-h":!0}),p(Wt)!=="svelte-j66hh4"&&(Wt.innerHTML=pa),Ts=r(Et),u(ve.$$.fragment,Et),Et.forEach(d),Z.forEach(d),ro=r(o),O=i(o,"H2",{class:!0});var ho=U(O);_e=i(ho,"A",{id:!0,class:!0,href:!0});var ba=U(_e);Dt=i(ba,"SPAN",{});var ya=U(Dt);u(Qe.$$.fragment,ya),ya.forEach(d),ba.forEach(d),Us=r(ho),Bt=i(ho,"SPAN",{"data-svelte-h":!0}),p(Bt)!=="svelte-2a7r8a"&&(Bt.textContent=fa),ho.forEach(d),lo=r(o),R=i(o,"DIV",{class:!0});var Yt=U(R);u(Le.$$.fragment,Yt),Js=r(Yt),Vt=i(Yt,"P",{"data-svelte-h":!0}),p(Vt)!=="svelte-7y8zei"&&(Vt.textContent=ua),js=r(Yt),S=i(Yt,"DIV",{class:!0});var zt=U(S);u(Ae.$$.fragment,zt),ks=r(zt),Rt=i(zt,"P",{"data-svelte-h":!0}),p(Rt)!=="svelte-5nfhmh"&&(Rt.textContent=ha),Zs=r(zt),u(xe.$$.fragment,zt),zt.forEach(d),Yt.forEach(d),this.h()},h(){w(s,"name","hf:doc:metadata"),w(s,"content",JSON.stringify(za)),w(a,"id","models"),w(a,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),w(a,"href","#models"),w(c,"class","relative group"),Kt.a=eo,w(se,"id","diffusers.ModelMixin"),w(se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),w(se,"href","#diffusers.ModelMixin"),w(A,"class","relative group"),w(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ue,"id","diffusers.FlaxModelMixin"),w(ue,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),w(ue,"href","#diffusers.FlaxModelMixin"),w(q,"class","relative group"),w(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(_e,"id","diffusers.utils.PushToHubMixin"),w(_e,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),w(_e,"href","#diffusers.utils.PushToHubMixin"),w(O,"class","relative group"),w(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(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(o,y){t(document.head,s),x(o,_,y),x(o,c,y),t(c,a),t(a,m),h(e,m,null),t(c,v),t(c,tt),x(o,Ot,y),x(o,oe,y),t(oe,Mo),Kt.m(wa,oe),t(oe,eo),x(o,to,y),x(o,Ue,y),x(o,oo,y),x(o,A,y),t(A,se),t(se,Pt),h(Je,Pt,null),t(A,bo),t(A,ot),x(o,so,y),x(o,$,y),h(je,$,null),t($,yo),t($,st),t($,vo),t($,at),t($,_o),t($,nt),t($,xo),t($,H),h(ke,H,null),t(H,wo),t(H,rt),t(H,$o),t(H,lt),t($,To),t($,N),h(Ze,N,null),t(N,Uo),t(N,it),t(N,Jo),t(N,dt),t($,jo),t($,X),h(Ce,X,null),t(X,ko),t(X,ct),t(X,Zo),t(X,mt),t($,Co),t($,ae),h(Ge,ae,null),t(ae,Go),t(ae,pt),t($,Io),t($,ne),h(Ie,ne,null),t(ne,Fo),t(ne,ft),t($,Wo),t($,E),h(Fe,E,null),t(E,Bo),t(E,ut),t(E,Vo),t(E,ht),t($,Ro),t($,re),h(We,re,null),t(re,Ho),t(re,gt),t($,No),t($,G),h(Be,G,null),t(G,Xo),t(G,Mt),t(G,Eo),t(G,bt),t(G,Yo),h(le,G,null),t(G,zo),h(ie,G,null),t($,Po),t($,C),h(Ve,C,null),t(C,So),t(C,yt),t(C,Do),t(C,vt),t(C,Qo),h(de,C,null),t(C,Lo),h(ce,C,null),t(C,Ao),h(me,C,null),t($,qo),t($,Y),h(Re,Y,null),t(Y,Oo),t(Y,_t),t(Y,Ko),h(pe,Y,null),t($,es),t($,fe),h(He,fe,null),t(fe,ts),t(fe,xt),t($,os),t($,z),h(Ne,z,null),t(z,ss),t(z,wt),t(z,as),t(z,$t),x(o,ao,y),x(o,q,y),t(q,ue),t(ue,St),h(Xe,St,null),t(q,ns),t(q,Tt),x(o,no,y),x(o,j,y),h(Ee,j,null),t(j,rs),t(j,Ut),t(j,ls),t(j,Jt),t(j,is),t(j,jt),t(j,ds),t(j,I),h(Ye,I,null),t(I,cs),t(I,kt),t(I,ms),h(he,I,null),t(I,ps),h(ge,I,null),t(j,fs),t(j,Me),h(ze,Me,null),t(Me,us),t(Me,Zt),t(j,hs),t(j,F),h(Pe,F,null),t(F,gs),t(F,Ct),t(F,Ms),t(F,Gt),t(F,bs),h(be,F,null),t(j,ys),t(j,W),h(Se,W,null),t(W,vs),t(W,It),t(W,_s),t(W,Ft),t(W,xs),h(ye,W,null),t(j,ws),t(j,P),h(De,P,null),t(P,$s),t(P,Wt),t(P,Ts),h(ve,P,null),x(o,ro,y),x(o,O,y),t(O,_e),t(_e,Dt),h(Qe,Dt,null),t(O,Us),t(O,Bt),x(o,lo,y),x(o,R,y),h(Le,R,null),t(R,Js),t(R,Vt),t(R,js),t(R,S),h(Ae,S,null),t(S,ks),t(S,Rt),t(S,Zs),h(xe,S,null),io=!0},p(o,[y]){const qe={};y&2&&(qe.$$scope={dirty:y,ctx:o}),le.$set(qe);const Qt={};y&2&&(Qt.$$scope={dirty:y,ctx:o}),ie.$set(Qt);const Lt={};y&2&&(Lt.$$scope={dirty:y,ctx:o}),de.$set(Lt);const Oe={};y&2&&(Oe.$$scope={dirty:y,ctx:o}),ce.$set(Oe);const Ke={};y&2&&(Ke.$$scope={dirty:y,ctx:o}),me.$set(Ke);const At={};y&2&&(At.$$scope={dirty:y,ctx:o}),pe.$set(At);const qt={};y&2&&(qt.$$scope={dirty:y,ctx:o}),he.$set(qt);const T={};y&2&&(T.$$scope={dirty:y,ctx:o}),ge.$set(T);const K={};y&2&&(K.$$scope={dirty:y,ctx:o}),be.$set(K);const ee={};y&2&&(ee.$$scope={dirty:y,ctx:o}),ye.$set(ee);const te={};y&2&&(te.$$scope={dirty:y,ctx:o}),ve.$set(te);const et={};y&2&&(et.$$scope={dirty:y,ctx:o}),xe.$set(et)},i(o){io||(g(e.$$.fragment,o),g(Je.$$.fragment,o),g(je.$$.fragment,o),g(ke.$$.fragment,o),g(Ze.$$.fragment,o),g(Ce.$$.fragment,o),g(Ge.$$.fragment,o),g(Ie.$$.fragment,o),g(Fe.$$.fragment,o),g(We.$$.fragment,o),g(Be.$$.fragment,o),g(le.$$.fragment,o),g(ie.$$.fragment,o),g(Ve.$$.fragment,o),g(de.$$.fragment,o),g(ce.$$.fragment,o),g(me.$$.fragment,o),g(Re.$$.fragment,o),g(pe.$$.fragment,o),g(He.$$.fragment,o),g(Ne.$$.fragment,o),g(Xe.$$.fragment,o),g(Ee.$$.fragment,o),g(Ye.$$.fragment,o),g(he.$$.fragment,o),g(ge.$$.fragment,o),g(ze.$$.fragment,o),g(Pe.$$.fragment,o),g(be.$$.fragment,o),g(Se.$$.fragment,o),g(ye.$$.fragment,o),g(De.$$.fragment,o),g(ve.$$.fragment,o),g(Qe.$$.fragment,o),g(Le.$$.fragment,o),g(Ae.$$.fragment,o),g(xe.$$.fragment,o),io=!0)},o(o){M(e.$$.fragment,o),M(Je.$$.fragment,o),M(je.$$.fragment,o),M(ke.$$.fragment,o),M(Ze.$$.fragment,o),M(Ce.$$.fragment,o),M(Ge.$$.fragment,o),M(Ie.$$.fragment,o),M(Fe.$$.fragment,o),M(We.$$.fragment,o),M(Be.$$.fragment,o),M(le.$$.fragment,o),M(ie.$$.fragment,o),M(Ve.$$.fragment,o),M(de.$$.fragment,o),M(ce.$$.fragment,o),M(me.$$.fragment,o),M(Re.$$.fragment,o),M(pe.$$.fragment,o),M(He.$$.fragment,o),M(Ne.$$.fragment,o),M(Xe.$$.fragment,o),M(Ee.$$.fragment,o),M(Ye.$$.fragment,o),M(he.$$.fragment,o),M(ge.$$.fragment,o),M(ze.$$.fragment,o),M(Pe.$$.fragment,o),M(be.$$.fragment,o),M(Se.$$.fragment,o),M(ye.$$.fragment,o),M(De.$$.fragment,o),M(ve.$$.fragment,o),M(Qe.$$.fragment,o),M(Le.$$.fragment,o),M(Ae.$$.fragment,o),M(xe.$$.fragment,o),io=!1},d(o){o&&(d(_),d(c),d(Ot),d(oe),d(to),d(Ue),d(oo),d(A),d(so),d($),d(ao),d(q),d(no),d(j),d(ro),d(O),d(lo),d(R)),d(s),b(e),b(Je),b(je),b(ke),b(Ze),b(Ce),b(Ge),b(Ie),b(Fe),b(We),b(Be),b(le),b(ie),b(Ve),b(de),b(ce),b(me),b(Re),b(pe),b(He),b(Ne),b(Xe),b(Ee),b(Ye),b(he),b(ge),b(ze),b(Pe),b(be),b(Se),b(ye),b(De),b(ve),b(Qe),b(Le),b(Ae),b(xe)}}}const za={local:"models",sections:[{local:"diffusers.ModelMixin",title:"ModelMixin"},{local:"diffusers.FlaxModelMixin",title:"FlaxModelMixin"},{local:"diffusers.utils.PushToHubMixin",title:"PushToHubMixin"}],title:"Models"};function Pa(J){return Ta(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ka extends Ua{constructor(s){super(),Ja(this,s,Pa,Ya,$a,{})}}export{Ka as component};

Xet Storage Details

Size:
80.7 kB
·
Xet hash:
cf1e4610379f82bdf52a02a36e3b7cd4308672052357d6fca8117d1cd79ed1fb

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.