Buckets:
| import{s as zo,o as Po,n as Fe}from"../chunks/scheduler.53228c21.js";import{S as Fo,i as Bo,e as a,s as o,c as u,q as No,H as qo,h as Xo,a as r,d,b as n,f as k,g as h,r as Ro,u as Do,j as f,k as w,l as t,m as x,n as g,t as b,o as _,p as y}from"../chunks/index.cac5d66a.js";import{C as Yo}from"../chunks/CopyLLMTxtMenu.5ac9ab94.js";import{D as C}from"../chunks/Docstring.8a316450.js";import{C as Be}from"../chunks/CodeBlock.606cbaf4.js";import{E as Pe}from"../chunks/ExampleCodeBlock.81a3017d.js";import{H as to,E as Qo}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.92b2cd9d.js";function So(Z){let i,T="Example:",v,l,p;return l=new Be({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMENvZ1ZpZGVvWFRyYW5zZm9ybWVyM0RNb2RlbCUwQSUwQXRyYW5zZm9ybWVyJTIwJTNEJTIwQ29nVmlkZW9YVHJhbnNmb3JtZXIzRE1vZGVsLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJUSFVETSUyRkNvZ1ZpZGVvWC01YiUyMiUyQyUyMHN1YmZvbGRlciUzRCUyMnRyYW5zZm9ybWVyJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiUwQSklMEElMEF0cmFuc2Zvcm1lci5lbmFibGVfZ3JvdXBfb2ZmbG9hZCglMEElMjAlMjAlMjAlMjBvbmxvYWRfZGV2aWNlJTNEdG9yY2guZGV2aWNlKCUyMmN1ZGElMjIpJTJDJTBBJTIwJTIwJTIwJTIwb2ZmbG9hZF9kZXZpY2UlM0R0b3JjaC5kZXZpY2UoJTIyY3B1JTIyKSUyQyUwQSUyMCUyMCUyMCUyMG9mZmxvYWRfdHlwZSUzRCUyMmxlYWZfbGV2ZWwlMjIlMkMlMEElMjAlMjAlMjAlMjB1c2Vfc3RyZWFtJTNEVHJ1ZSUyQyUwQSk=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> CogVideoXTransformer3DModel | |
| <span class="hljs-meta">>>> </span>transformer = CogVideoXTransformer3DModel.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"THUDM/CogVideoX-5b"</span>, subfolder=<span class="hljs-string">"transformer"</span>, torch_dtype=torch.bfloat16 | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>transformer.enable_group_offload( | |
| <span class="hljs-meta">... </span> onload_device=torch.device(<span class="hljs-string">"cuda"</span>), | |
| <span class="hljs-meta">... </span> offload_device=torch.device(<span class="hljs-string">"cpu"</span>), | |
| <span class="hljs-meta">... </span> offload_type=<span class="hljs-string">"leaf_level"</span>, | |
| <span class="hljs-meta">... </span> use_stream=<span class="hljs-literal">True</span>, | |
| <span class="hljs-meta">... </span>)`,lang:"python",wrap:!1}}),{c(){i=a("p"),i.textContent=T,v=o(),u(l.$$.fragment)},l(s){i=r(s,"P",{"data-svelte-h":!0}),f(i)!=="svelte-11lpom8"&&(i.textContent=T),v=n(s),h(l.$$.fragment,s)},m(s,$){x(s,i,$),x(s,v,$),g(l,s,$),p=!0},p:Fe,i(s){p||(b(l.$$.fragment,s),p=!0)},o(s){_(l.$$.fragment,s),p=!1},d(s){s&&(d(i),d(v)),y(l,s)}}}function Ao(Z){let i,T='Using <a href="/docs/diffusers/pr_13813/en/api/models/overview#diffusers.ModelMixin.enable_layerwise_casting">enable_layerwise_casting()</a>:',v,l,p;return l=new Be({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMENvZ1ZpZGVvWFRyYW5zZm9ybWVyM0RNb2RlbCUwQSUwQXRyYW5zZm9ybWVyJTIwJTNEJTIwQ29nVmlkZW9YVHJhbnNmb3JtZXIzRE1vZGVsLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJUSFVETSUyRkNvZ1ZpZGVvWC01YiUyMiUyQyUyMHN1YmZvbGRlciUzRCUyMnRyYW5zZm9ybWVyJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiUwQSklMEElMEElMjMlMjBFbmFibGUlMjBsYXllcndpc2UlMjBjYXN0aW5nJTIwdmlhJTIwdGhlJTIwbW9kZWwlMkMlMjB3aGljaCUyMGlnbm9yZXMlMjBjZXJ0YWluJTIwbW9kdWxlcyUyMGJ5JTIwZGVmYXVsdCUwQXRyYW5zZm9ybWVyLmVuYWJsZV9sYXllcndpc2VfY2FzdGluZyhzdG9yYWdlX2R0eXBlJTNEdG9yY2guZmxvYXQ4X2U0bTNmbiUyQyUyMGNvbXB1dGVfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNik=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> CogVideoXTransformer3DModel | |
| <span class="hljs-meta">>>> </span>transformer = CogVideoXTransformer3DModel.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"THUDM/CogVideoX-5b"</span>, subfolder=<span class="hljs-string">"transformer"</span>, torch_dtype=torch.bfloat16 | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Enable layerwise casting via the model, which ignores certain modules by default</span> | |
| <span class="hljs-meta">>>> </span>transformer.enable_layerwise_casting(storage_dtype=torch.float8_e4m3fn, compute_dtype=torch.bfloat16)`,lang:"python",wrap:!1}}),{c(){i=a("p"),i.innerHTML=T,v=o(),u(l.$$.fragment)},l(s){i=r(s,"P",{"data-svelte-h":!0}),f(i)!=="svelte-sj7qwk"&&(i.innerHTML=T),v=n(s),h(l.$$.fragment,s)},m(s,$){x(s,i,$),x(s,v,$),g(l,s,$),p=!0},p:Fe,i(s){p||(b(l.$$.fragment,s),p=!0)},o(s){_(l.$$.fragment,s),p=!1},d(s){s&&(d(i),d(v)),y(l,s)}}}function Oo(Z){let i,T="Examples:",v,l,p;return l=new Be({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwVU5ldDJEQ29uZGl0aW9uTW9kZWwlMEFmcm9tJTIweGZvcm1lcnMub3BzJTIwaW1wb3J0JTIwTWVtb3J5RWZmaWNpZW50QXR0ZW50aW9uRmxhc2hBdHRlbnRpb25PcCUwQSUwQW1vZGVsJTIwJTNEJTIwVU5ldDJEQ29uZGl0aW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnN0YWJpbGl0eWFpJTJGc3RhYmxlLWRpZmZ1c2lvbi0yLTElMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJ1bmV0JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKSUwQW1vZGVsJTIwJTNEJTIwbW9kZWwudG8oJTIyY3VkYSUyMiklMEFtb2RlbC5lbmFibGVfeGZvcm1lcnNfbWVtb3J5X2VmZmljaWVudF9hdHRlbnRpb24oYXR0ZW50aW9uX29wJTNETWVtb3J5RWZmaWNpZW50QXR0ZW50aW9uRmxhc2hBdHRlbnRpb25PcCk=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> xformers.ops <span class="hljs-keyword">import</span> MemoryEfficientAttentionFlashAttentionOp | |
| <span class="hljs-meta">>>> </span>model = UNet2DConditionModel.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"stabilityai/stable-diffusion-2-1"</span>, subfolder=<span class="hljs-string">"unet"</span>, torch_dtype=torch.float16 | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>model = model.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>model.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)`,lang:"py",wrap:!1}}),{c(){i=a("p"),i.textContent=T,v=o(),u(l.$$.fragment)},l(s){i=r(s,"P",{"data-svelte-h":!0}),f(i)!=="svelte-kvfsh7"&&(i.textContent=T),v=n(s),h(l.$$.fragment,s)},m(s,$){x(s,i,$),x(s,v,$),g(l,s,$),p=!0},p:Fe,i(s){p||(b(l.$$.fragment,s),p=!0)},o(s){_(l.$$.fragment,s),p=!1},d(s){s&&(d(i),d(v)),y(l,s)}}}function Ko(Z){let i,T="Example:",v,l,p;return l=new Be({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTBBJTBBdW5ldCUyMCUzRCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJzdGFibGUtZGlmZnVzaW9uLXYxLTUlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJ1bmV0JTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel | |
| unet = UNet2DConditionModel.from_pretrained(<span class="hljs-string">"stable-diffusion-v1-5/stable-diffusion-v1-5"</span>, subfolder=<span class="hljs-string">"unet"</span>)`,lang:"py",wrap:!1}}),{c(){i=a("p"),i.textContent=T,v=o(),u(l.$$.fragment)},l(s){i=r(s,"P",{"data-svelte-h":!0}),f(i)!=="svelte-11lpom8"&&(i.textContent=T),v=n(s),h(l.$$.fragment,s)},m(s,$){x(s,i,$),x(s,v,$),g(l,s,$),p=!0},p:Fe,i(s){p||(b(l.$$.fragment,s),p=!0)},o(s){_(l.$$.fragment,s),p=!1},d(s){s&&(d(i),d(v)),y(l,s)}}}function en(Z){let i,T="If you get the error message below, you need to finetune the weights for your downstream task:",v,l,p;return l=new Be({props:{code:"U29tZSUyMHdlaWdodHMlMjBvZiUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTIwd2VyZSUyMG5vdCUyMGluaXRpYWxpemVkJTIwZnJvbSUyMHRoZSUyMG1vZGVsJTIwY2hlY2twb2ludCUyMGF0JTIwc3RhYmxlLWRpZmZ1c2lvbi12MS01JTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIwYW5kJTIwYXJlJTIwbmV3bHklMjBpbml0aWFsaXplZCUyMGJlY2F1c2UlMjB0aGUlMjBzaGFwZXMlMjBkaWQlMjBub3QlMjBtYXRjaCUzQSUwQS0lMjBjb252X2luLndlaWdodCUzQSUyMGZvdW5kJTIwc2hhcGUlMjB0b3JjaC5TaXplKCU1QjMyMCUyQyUyMDQlMkMlMjAzJTJDJTIwMyU1RCklMjBpbiUyMHRoZSUyMGNoZWNrcG9pbnQlMjBhbmQlMjB0b3JjaC5TaXplKCU1QjMyMCUyQyUyMDklMkMlMjAzJTJDJTIwMyU1RCklMjBpbiUyMHRoZSUyMG1vZGVsJTIwaW5zdGFudGlhdGVkJTBBWW91JTIwc2hvdWxkJTIwcHJvYmFibHklMjBUUkFJTiUyMHRoaXMlMjBtb2RlbCUyMG9uJTIwYSUyMGRvd24tc3RyZWFtJTIwdGFzayUyMHRvJTIwYmUlMjBhYmxlJTIwdG8lMjB1c2UlMjBpdCUyMGZvciUyMHByZWRpY3Rpb25zJTIwYW5kJTIwaW5mZXJlbmNlLg==",highlighted:`Some weights of UNet2DConditionModel were not initialized from the model checkpoint at stable-diffusion-v1-5/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.`,lang:"bash",wrap:!1}}),{c(){i=a("p"),i.textContent=T,v=o(),u(l.$$.fragment)},l(s){i=r(s,"P",{"data-svelte-h":!0}),f(i)!=="svelte-xueb0m"&&(i.textContent=T),v=n(s),h(l.$$.fragment,s)},m(s,$){x(s,i,$),x(s,v,$),g(l,s,$),p=!0},p:Fe,i(s){p||(b(l.$$.fragment,s),p=!0)},o(s){_(l.$$.fragment,s),p=!1},d(s){s&&(d(i),d(v)),y(l,s)}}}function tn(Z){let i,T="Example:",v,l,p;return l=new Be({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJzdGFibGUtZGlmZnVzaW9uLXYxLTUlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMEF1bmV0JTIwJTNEJTIwVU5ldDJEQ29uZGl0aW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2lkJTJDJTIwc3ViZm9sZGVyJTNEJTIydW5ldCUyMiklMEF1bmV0Lm51bV9wYXJhbWV0ZXJzKG9ubHlfdHJhaW5hYmxlJTNEVHJ1ZSklMEE4NTk1MjA5NjQ=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel | |
| model_id = <span class="hljs-string">"stable-diffusion-v1-5/stable-diffusion-v1-5"</span> | |
| unet = UNet2DConditionModel.from_pretrained(model_id, subfolder=<span class="hljs-string">"unet"</span>) | |
| unet.num_parameters(only_trainable=<span class="hljs-literal">True</span>) | |
| <span class="hljs-number">859520964</span>`,lang:"py",wrap:!1}}),{c(){i=a("p"),i.textContent=T,v=o(),u(l.$$.fragment)},l(s){i=r(s,"P",{"data-svelte-h":!0}),f(i)!=="svelte-11lpom8"&&(i.textContent=T),v=n(s),h(l.$$.fragment,s)},m(s,$){x(s,i,$),x(s,v,$),g(l,s,$),p=!0},p:Fe,i(s){p||(b(l.$$.fragment,s),p=!0)},o(s){_(l.$$.fragment,s),p=!1},d(s){s&&(d(i),d(v)),y(l,s)}}}function sn(Z){let i,T="Examples:",v,l,p;return l=new Be({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">"stabilityai/stable-diffusion-2"</span>, subfolder=<span class="hljs-string">"unet"</span>) | |
| <span class="hljs-comment"># Push the \`unet\` to your namespace with the name "my-finetuned-unet".</span> | |
| unet.push_to_hub(<span class="hljs-string">"my-finetuned-unet"</span>) | |
| <span class="hljs-comment"># Push the \`unet\` to an organization with the name "my-finetuned-unet".</span> | |
| unet.push_to_hub(<span class="hljs-string">"your-org/my-finetuned-unet"</span>)`,lang:"python",wrap:!1}}),{c(){i=a("p"),i.textContent=T,v=o(),u(l.$$.fragment)},l(s){i=r(s,"P",{"data-svelte-h":!0}),f(i)!=="svelte-kvfsh7"&&(i.textContent=T),v=n(s),h(l.$$.fragment,s)},m(s,$){x(s,i,$),x(s,v,$),g(l,s,$),p=!0},p:Fe,i(s){p||(b(l.$$.fragment,s),p=!0)},o(s){_(l.$$.fragment,s),p=!1},d(s){s&&(d(i),d(v)),y(l,s)}}}function on(Z){let i,T,v,l,p,s,$,Ct,z,Dt,Zt,Lo='<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" 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>',Jt,Ut,de,so='All models are built from the base <a href="/docs/diffusers/pr_13813/en/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.',jt,me,Wt,m,ce,Yt,qe,oo="Base class for all models.",Qt,Xe,no=`<a href="/docs/diffusers/pr_13813/en/api/models/overview#diffusers.ModelMixin">ModelMixin</a> takes care of storing the model configuration and provides methods for loading, downloading and | |
| saving models.`,St,De,ao='<li><strong>config_name</strong> (<code>str</code>) — Filename to save a model to when calling <a href="/docs/diffusers/pr_13813/en/api/models/overview#diffusers.ModelMixin.save_pretrained">save_pretrained()</a>.</li>',At,W,pe,Ot,Ye,ro=`Compiles <em>only</em> the frequently repeated sub-modules of a model (e.g. the Transformer layers) instead of | |
| compiling the entire model. This technique—often called <strong>regional compilation</strong> (see the PyTorch recipe | |
| <a href="https://docs.pytorch.org/tutorials/recipes/regional_compilation.html" rel="nofollow">https://docs.pytorch.org/tutorials/recipes/regional_compilation.html</a>) can reduce end-to-end compile time | |
| substantially, while preserving the runtime speed-ups you would expect from a full <code>torch.compile</code>.`,Kt,Qe,io=`The set of sub-modules to compile is discovered by the presence of <strong><code>_repeated_blocks</code></strong> attribute in the | |
| model definition. Define this attribute on your model subclass as a list/tuple of class names (strings). Every | |
| module whose class name matches will be compiled.`,es,Se,lo=`Once discovered, each matching sub-module is compiled by calling <code>submodule.compile(*args, **kwargs)</code>. Any | |
| positional or keyword arguments you supply to <code>compile_repeated_blocks</code> are forwarded verbatim to | |
| <code>torch.compile</code>.`,ts,P,fe,ss,Ae,mo=`Potentially dequantize the model in case it has been quantized by a quantization method that support | |
| dequantization.`,os,F,ue,ns,Oe,co=`Deactivates gradient checkpointing for the current model (may be referred to as <em>activation checkpointing</em> or | |
| <em>checkpoint activations</em> in other frameworks).`,as,B,he,rs,Ke,po="disable npu flash attention from torch_npu",is,q,ge,ls,et,fo='Disable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>.',ds,X,be,ms,tt,uo="Disable the flash attention pallals kernel for torch_xla.",cs,D,_e,ps,st,ho=`Activates gradient checkpointing for the current model (may be referred to as <em>activation checkpointing</em> or | |
| <em>checkpoint activations</em> in other frameworks).`,fs,V,ye,us,ot,go="Activates group offloading for the current model.",hs,nt,bo='See <a href="/docs/diffusers/pr_13813/en/api/utilities#diffusers.hooks.apply_group_offloading">apply_group_offloading()</a> for more information.',gs,Y,bs,J,ve,_s,at,_o="Activates layerwise casting for the current model.",ys,rt,yo=`Layerwise casting is a technique that casts the model weights to a lower precision dtype for storage but | |
| upcasts them on-the-fly to a higher precision dtype for computation. This process can significantly reduce the | |
| memory footprint from model weights, but may lead to some quality degradation in the outputs. Most degradations | |
| are negligible, mostly stemming from weight casting in normalization and modulation layers.`,vs,it,vo=`By default, most models in diffusers set the <code>_skip_layerwise_casting_patterns</code> attribute to ignore patch | |
| embedding, positional embedding and normalization layers. This is because these layers are most likely | |
| precision-critical for quality. If you wish to change this behavior, you can set the | |
| <code>_skip_layerwise_casting_patterns</code> attribute to <code>None</code>, or call | |
| <a href="/docs/diffusers/pr_13813/en/api/utilities#diffusers.hooks.apply_layerwise_casting">apply_layerwise_casting()</a> with custom arguments.`,Ms,lt,Mo="Example:",$s,Q,xs,S,Me,ws,dt,$o="Enable npu flash attention from torch_npu",Ts,j,$e,ks,mt,xo='Enable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>.',Cs,ct,wo=`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.`,Zs,xe,To=`<p>> ⚠️ When memory efficient attention and sliced attention are both enabled, memory efficient | |
| attention takes > precedent.</p>`,Js,A,Us,O,we,js,pt,ko="Enable the flash attention pallals kernel for torch_xla.",Ws,U,Te,Vs,ft,Co="Instantiate a pretrained PyTorch model from a pretrained model configuration.",Gs,ut,Zo=`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>.`,Hs,ke,Jo=`<p>> To use private or <a href="https://huggingface.co/docs/hub/models-gated#gated-models" rel="nofollow">gated models</a>, log-in | |
| with <code>hf > auth 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.</p>`,Is,K,Es,ee,Ns,te,Ce,Rs,ht,Uo=`Get the memory footprint of a model. This will return the memory footprint of the current model in bytes. | |
| Useful to benchmark the memory footprint of the current model and design some tests. Solution inspired from the | |
| PyTorch discussions: <a href="https://discuss.pytorch.org/t/gpu-memory-that-model-uses/56822/2" rel="nofollow">https://discuss.pytorch.org/t/gpu-memory-that-model-uses/56822/2</a>`,Ls,N,Ze,zs,gt,jo="Get number of (trainable or non-embedding) parameters in the module.",Ps,se,Fs,oe,Je,Bs,bt,Wo=`Resets the attention backend for the model. Following calls to <code>forward</code> will use the environment default, if | |
| set, or the torch native scaled dot product attention.`,qs,ne,Ue,Xs,_t,Vo=`Save a model and its configuration file to a directory so that it can be reloaded using the | |
| <a href="/docs/diffusers/pr_13813/en/api/models/overview#diffusers.ModelMixin.from_pretrained">from_pretrained()</a> class method.`,Ds,ae,je,Ys,yt,Go="Set the attention backend for the model.",Qs,re,We,Ss,vt,Ho="Set the switch for the npu flash attention.",Vt,Ve,Gt,I,Ge,As,Mt,Io="A Mixin to push a model, scheduler, or pipeline to the Hugging Face Hub.",Os,R,He,Ks,$t,Eo="Upload model, scheduler, or pipeline files to the 🤗 Hugging Face Hub.",eo,ie,Ht,Ie,It,kt,Et;return p=new Yo({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),$=new to({props:{title:"Models",local:"models",headingTag:"h1"}}),me=new to({props:{title:"ModelMixin",local:"diffusers.ModelMixin",headingTag:"h2"}}),ce=new C({props:{name:"class diffusers.ModelMixin",anchor:"diffusers.ModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L232"}}),pe=new C({props:{name:"compile_repeated_blocks",anchor:"diffusers.ModelMixin.compile_repeated_blocks",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L1552"}}),fe=new C({props:{name:"dequantize",anchor:"diffusers.ModelMixin.dequantize",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L846"}}),ue=new C({props:{name:"disable_gradient_checkpointing",anchor:"diffusers.ModelMixin.disable_gradient_checkpointing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L315"}}),he=new C({props:{name:"disable_npu_flash_attention",anchor:"diffusers.ModelMixin.disable_npu_flash_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L346"}}),ge=new C({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.ModelMixin.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L429"}}),be=new C({props:{name:"disable_xla_flash_attention",anchor:"diffusers.ModelMixin.disable_xla_flash_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L376"}}),_e=new C({props:{name:"enable_gradient_checkpointing",anchor:"diffusers.ModelMixin.enable_gradient_checkpointing",parameters:[{name:"gradient_checkpointing_func",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.ModelMixin.enable_gradient_checkpointing.gradient_checkpointing_func",description:`<strong>gradient_checkpointing_func</strong> (<code>Callable</code>, <em>optional</em>) — | |
| The function to use for gradient checkpointing. If <code>None</code>, the default PyTorch checkpointing function | |
| is used (<code>torch.utils.checkpoint.checkpoint</code>).`,name:"gradient_checkpointing_func"}],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L285"}}),ye=new C({props:{name:"enable_group_offload",anchor:"diffusers.ModelMixin.enable_group_offload",parameters:[{name:"onload_device",val:": device"},{name:"offload_device",val:": device = device(type='cpu')"},{name:"offload_type",val:": str = 'block_level'"},{name:"num_blocks_per_group",val:": int | None = None"},{name:"non_blocking",val:": bool = False"},{name:"use_stream",val:": bool = False"},{name:"record_stream",val:": bool = False"},{name:"low_cpu_mem_usage",val:" = False"},{name:"offload_to_disk_path",val:": str | None = None"},{name:"block_modules",val:": str | None = None"},{name:"exclude_kwargs",val:": str | None = None"}],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L520"}}),Y=new Pe({props:{anchor:"diffusers.ModelMixin.enable_group_offload.example",$$slots:{default:[So]},$$scope:{ctx:Z}}}),ve=new C({props:{name:"enable_layerwise_casting",anchor:"diffusers.ModelMixin.enable_layerwise_casting",parameters:[{name:"storage_dtype",val:": dtype = torch.float8_e4m3fn"},{name:"compute_dtype",val:": torch.dtype | None = None"},{name:"skip_modules_pattern",val:": tuple[str, ...] | None = None"},{name:"skip_modules_classes",val:": tuple[typing.Type[torch.nn.modules.module.Module], ...] | None = None"},{name:"non_blocking",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.ModelMixin.enable_layerwise_casting.storage_dtype",description:`<strong>storage_dtype</strong> (<code>torch.dtype</code>) — | |
| The dtype to which the model should be cast for storage.`,name:"storage_dtype"},{anchor:"diffusers.ModelMixin.enable_layerwise_casting.compute_dtype",description:`<strong>compute_dtype</strong> (<code>torch.dtype</code>) — | |
| The dtype to which the model weights should be cast during the forward pass.`,name:"compute_dtype"},{anchor:"diffusers.ModelMixin.enable_layerwise_casting.skip_modules_pattern",description:`<strong>skip_modules_pattern</strong> (<code>tuple[str, ...]</code>, <em>optional</em>) — | |
| A list of patterns to match the names of the modules to skip during the layerwise casting process. If | |
| set to <code>None</code>, default skip patterns are used to ignore certain internal layers of modules and PEFT | |
| layers.`,name:"skip_modules_pattern"},{anchor:"diffusers.ModelMixin.enable_layerwise_casting.skip_modules_classes",description:`<strong>skip_modules_classes</strong> (<code>tuple[Type[torch.nn.Module], ...]</code>, <em>optional</em>) — | |
| A list of module classes to skip during the layerwise casting process.`,name:"skip_modules_classes"},{anchor:"diffusers.ModelMixin.enable_layerwise_casting.non_blocking",description:`<strong>non_blocking</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| If <code>True</code>, the weight casting operations are non-blocking.`,name:"non_blocking"}],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L435"}}),Q=new Pe({props:{anchor:"diffusers.ModelMixin.enable_layerwise_casting.example",$$slots:{default:[Ao]},$$scope:{ctx:Z}}}),Me=new C({props:{name:"enable_npu_flash_attention",anchor:"diffusers.ModelMixin.enable_npu_flash_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L339"}}),$e=new C({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) — | |
| 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/vr_13813/src/diffusers/models/modeling_utils.py#L397"}}),A=new Pe({props:{anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Oo]},$$scope:{ctx:Z}}}),we=new C({props:{name:"enable_xla_flash_attention",anchor:"diffusers.ModelMixin.enable_xla_flash_attention",parameters:[{name:"partition_spec",val:": typing.Optional[typing.Callable] = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L370"}}),Te=new C({props:{name:"from_pretrained",anchor:"diffusers.ModelMixin.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": str | os.PathLike | None"},{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>) — | |
| 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/pr_13813/en/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>str | os.PathLike</code>, <em>optional</em>) — | |
| 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>torch.dtype</code>, <em>optional</em>) — | |
| Override the default <code>torch.dtype</code> and load the model with another dtype.`,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>) — | |
| 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.proxies",description:`<strong>proxies</strong> (<code>dict[str, str]</code>, <em>optional</em>) — | |
| A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{'http': 'foo.bar:3128', 'http://hostname': 'foo.bar:4012'}</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>) — | |
| 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>) — | |
| Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model | |
| won’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>) — | |
| 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>"main"</code>) — | |
| 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>) — | |
| 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>""</code>) — | |
| 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>) — | |
| Mirror source to resolve accessibility issues if you’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>int | str | torch.device</code> or <code>dict[str, int | str | torch.device]</code>, <em>optional</em>) — | |
| A map that specifies where each submodule should go. It doesn’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. Defaults to <code>None</code>, meaning that the model will be loaded on CPU.</p> | |
| <p>Examples:`,name:"device_map"}],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L858"}}),K=new Pe({props:{anchor:"diffusers.ModelMixin.from_pretrained.example",$$slots:{default:[Ko]},$$scope:{ctx:Z}}}),ee=new Pe({props:{anchor:"diffusers.ModelMixin.from_pretrained.example-2",$$slots:{default:[en]},$$scope:{ctx:Z}}}),Ce=new C({props:{name:"get_memory_footprint",anchor:"diffusers.ModelMixin.get_memory_footprint",parameters:[{name:"return_buffers",val:" = True"}],parametersDescription:[{anchor:"diffusers.ModelMixin.get_memory_footprint.return_buffers",description:`<strong>return_buffers</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether to return the size of the buffer tensors in the computation of the memory footprint. Buffers | |
| are tensors that do not require gradients and not registered as parameters. E.g. mean and std in batch | |
| norm layers. Please see: <a href="https://discuss.pytorch.org/t/what-pytorch-means-by-buffers/120266/2" rel="nofollow">https://discuss.pytorch.org/t/what-pytorch-means-by-buffers/120266/2</a>`,name:"return_buffers"}],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L1979"}}),Ze=new C({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>) — | |
| 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>) — | |
| Whether or not to return only the number of non-embedding parameters.`,name:"exclude_embeddings"}],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L1915",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>The number of parameters.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>int</code></p> | |
| `}}),se=new Pe({props:{anchor:"diffusers.ModelMixin.num_parameters.example",$$slots:{default:[tn]},$$scope:{ctx:Z}}}),Je=new C({props:{name:"reset_attention_backend",anchor:"diffusers.ModelMixin.reset_attention_backend",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L650"}}),Ue=new C({props:{name:"save_pretrained",anchor:"diffusers.ModelMixin.save_pretrained",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"is_main_process",val:": bool = True"},{name:"save_function",val:": typing.Optional[typing.Callable] = None"},{name:"safe_serialization",val:": bool = True"},{name:"variant",val:": str | None = None"},{name:"max_shard_size",val:": int | str = '10GB'"},{name:"push_to_hub",val:": bool = False"},{name:"use_flashpack",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>) — | |
| Directory to save a model and its configuration file to. Will be created if it doesn’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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| If specified, weights are saved in the format <code>pytorch_model.<variant>.bin</code>.`,name:"variant"},{anchor:"diffusers.ModelMixin.save_pretrained.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, defaults to <code>"10GB"</code>) — | |
| The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size | |
| lower than this size. If expressed as a string, needs to be digits followed by a unit (like <code>"5GB"</code>). | |
| If expressed as an integer, the unit is bytes. Note that this limit will be decreased after a certain | |
| period of time (starting from Oct 2024) to allow users to upgrade to the latest version of <code>diffusers</code>. | |
| This is to establish a common default size for this argument across different libraries in the Hugging | |
| Face ecosystem (<code>transformers</code>, and <code>accelerate</code>, for example).`,name:"max_shard_size"},{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>) — | |
| 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>) — | |
| Additional keyword arguments passed along to the <a href="/docs/diffusers/pr_13813/en/api/pipelines/overview#diffusers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L669"}}),je=new C({props:{name:"set_attention_backend",anchor:"diffusers.ModelMixin.set_attention_backend",parameters:[{name:"backend",val:": str"}],parametersDescription:[{anchor:"diffusers.ModelMixin.set_attention_backend.backend",description:`<strong>backend</strong> (<code>str</code>) — | |
| The name of the backend to set. Must be one of the available backends defined in | |
| <code>AttentionBackendName</code>. Available backends can be found in | |
| <code>diffusers.attention_dispatch.AttentionBackendName</code>. Defaults to torch native scaled dot product | |
| attention as backend.`,name:"backend"}],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L588"}}),We=new C({props:{name:"set_use_npu_flash_attention",anchor:"diffusers.ModelMixin.set_use_npu_flash_attention",parameters:[{name:"valid",val:": bool"}],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/models/modeling_utils.py#L323"}}),Ve=new to({props:{title:"PushToHubMixin",local:"diffusers.utils.PushToHubMixin",headingTag:"h2"}}),Ge=new C({props:{name:"class diffusers.utils.PushToHubMixin",anchor:"diffusers.utils.PushToHubMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/utils/hub_utils.py#L483"}}),He=new C({props:{name:"push_to_hub",anchor:"diffusers.utils.PushToHubMixin.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"commit_message",val:": str | None = None"},{name:"private",val:": bool | None = None"},{name:"token",val:": str | None = None"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = True"},{name:"variant",val:": str | None = None"},{name:"subfolder",val:": str | None = None"}],parametersDescription:[{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) — | |
| 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>) — | |
| Message to commit while pushing. Default to <code>"Upload {object}"</code>.`,name:"commit_message"},{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) — | |
| Whether to make the repo private. If <code>None</code> (default), the repo will be public unless the | |
| organization’s default is private. This value is ignored if the repo already exists.`,name:"private"},{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) — | |
| The token to use as HTTP bearer authorization for remote files. The token generated when running <code>hf auth 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>) — | |
| 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>) — | |
| 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>) — | |
| If specified, weights are saved in the format <code>pytorch_model.<variant>.bin</code>.`,name:"variant"}],source:"https://github.com/huggingface/diffusers/blob/vr_13813/src/diffusers/utils/hub_utils.py#L518"}}),ie=new Pe({props:{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.example",$$slots:{default:[sn]},$$scope:{ctx:Z}}}),Ie=new Qo({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/overview.md"}}),{c(){i=a("meta"),T=o(),v=a("p"),l=o(),u(p.$$.fragment),s=o(),u($.$$.fragment),Ct=o(),z=a("p"),Dt=No("🤗 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 "),Zt=new qo(!1),Jt=No("."),Ut=o(),de=a("p"),de.innerHTML=so,jt=o(),u(me.$$.fragment),Wt=o(),m=a("div"),u(ce.$$.fragment),Yt=o(),qe=a("p"),qe.textContent=oo,Qt=o(),Xe=a("p"),Xe.innerHTML=no,St=o(),De=a("ul"),De.innerHTML=ao,At=o(),W=a("div"),u(pe.$$.fragment),Ot=o(),Ye=a("p"),Ye.innerHTML=ro,Kt=o(),Qe=a("p"),Qe.innerHTML=io,es=o(),Se=a("p"),Se.innerHTML=lo,ts=o(),P=a("div"),u(fe.$$.fragment),ss=o(),Ae=a("p"),Ae.textContent=mo,os=o(),F=a("div"),u(ue.$$.fragment),ns=o(),Oe=a("p"),Oe.innerHTML=co,as=o(),B=a("div"),u(he.$$.fragment),rs=o(),Ke=a("p"),Ke.textContent=po,is=o(),q=a("div"),u(ge.$$.fragment),ls=o(),et=a("p"),et.innerHTML=fo,ds=o(),X=a("div"),u(be.$$.fragment),ms=o(),tt=a("p"),tt.textContent=uo,cs=o(),D=a("div"),u(_e.$$.fragment),ps=o(),st=a("p"),st.innerHTML=ho,fs=o(),V=a("div"),u(ye.$$.fragment),us=o(),ot=a("p"),ot.textContent=go,hs=o(),nt=a("p"),nt.innerHTML=bo,gs=o(),u(Y.$$.fragment),bs=o(),J=a("div"),u(ve.$$.fragment),_s=o(),at=a("p"),at.textContent=_o,ys=o(),rt=a("p"),rt.textContent=yo,vs=o(),it=a("p"),it.innerHTML=vo,Ms=o(),lt=a("p"),lt.textContent=Mo,$s=o(),u(Q.$$.fragment),xs=o(),S=a("div"),u(Me.$$.fragment),ws=o(),dt=a("p"),dt.textContent=$o,Ts=o(),j=a("div"),u($e.$$.fragment),ks=o(),mt=a("p"),mt.innerHTML=xo,Cs=o(),ct=a("p"),ct.textContent=wo,Zs=o(),xe=a("blockquote"),xe.innerHTML=To,Js=o(),u(A.$$.fragment),Us=o(),O=a("div"),u(we.$$.fragment),js=o(),pt=a("p"),pt.textContent=ko,Ws=o(),U=a("div"),u(Te.$$.fragment),Vs=o(),ft=a("p"),ft.textContent=Co,Gs=o(),ut=a("p"),ut.innerHTML=Zo,Hs=o(),ke=a("blockquote"),ke.innerHTML=Jo,Is=o(),u(K.$$.fragment),Es=o(),u(ee.$$.fragment),Ns=o(),te=a("div"),u(Ce.$$.fragment),Rs=o(),ht=a("p"),ht.innerHTML=Uo,Ls=o(),N=a("div"),u(Ze.$$.fragment),zs=o(),gt=a("p"),gt.textContent=jo,Ps=o(),u(se.$$.fragment),Fs=o(),oe=a("div"),u(Je.$$.fragment),Bs=o(),bt=a("p"),bt.innerHTML=Wo,qs=o(),ne=a("div"),u(Ue.$$.fragment),Xs=o(),_t=a("p"),_t.innerHTML=Vo,Ds=o(),ae=a("div"),u(je.$$.fragment),Ys=o(),yt=a("p"),yt.textContent=Go,Qs=o(),re=a("div"),u(We.$$.fragment),Ss=o(),vt=a("p"),vt.textContent=Ho,Vt=o(),u(Ve.$$.fragment),Gt=o(),I=a("div"),u(Ge.$$.fragment),As=o(),Mt=a("p"),Mt.textContent=Io,Os=o(),R=a("div"),u(He.$$.fragment),Ks=o(),$t=a("p"),$t.textContent=Eo,eo=o(),u(ie.$$.fragment),Ht=o(),u(Ie.$$.fragment),It=o(),kt=a("p"),this.h()},l(e){const M=Xo("svelte-u9bgzb",document.head);i=r(M,"META",{name:!0,content:!0}),M.forEach(d),T=n(e),v=r(e,"P",{}),k(v).forEach(d),l=n(e),h(p.$$.fragment,e),s=n(e),h($.$$.fragment,e),Ct=n(e),z=r(e,"P",{});var Ee=k(z);Dt=Ro(Ee,"🤗 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 "),Zt=Do(Ee,!1),Jt=Ro(Ee,"."),Ee.forEach(d),Ut=n(e),de=r(e,"P",{"data-svelte-h":!0}),f(de)!=="svelte-18j98u8"&&(de.innerHTML=so),jt=n(e),h(me.$$.fragment,e),Wt=n(e),m=r(e,"DIV",{class:!0});var c=k(m);h(ce.$$.fragment,c),Yt=n(c),qe=r(c,"P",{"data-svelte-h":!0}),f(qe)!=="svelte-12nk4t7"&&(qe.textContent=oo),Qt=n(c),Xe=r(c,"P",{"data-svelte-h":!0}),f(Xe)!=="svelte-1ab3vig"&&(Xe.innerHTML=no),St=n(c),De=r(c,"UL",{"data-svelte-h":!0}),f(De)!=="svelte-123m65l"&&(De.innerHTML=ao),At=n(c),W=r(c,"DIV",{class:!0});var E=k(W);h(pe.$$.fragment,E),Ot=n(E),Ye=r(E,"P",{"data-svelte-h":!0}),f(Ye)!=="svelte-38nsj2"&&(Ye.innerHTML=ro),Kt=n(E),Qe=r(E,"P",{"data-svelte-h":!0}),f(Qe)!=="svelte-1et28mh"&&(Qe.innerHTML=io),es=n(E),Se=r(E,"P",{"data-svelte-h":!0}),f(Se)!=="svelte-k8xxs3"&&(Se.innerHTML=lo),E.forEach(d),ts=n(c),P=r(c,"DIV",{class:!0});var Ne=k(P);h(fe.$$.fragment,Ne),ss=n(Ne),Ae=r(Ne,"P",{"data-svelte-h":!0}),f(Ae)!=="svelte-on69a4"&&(Ae.textContent=mo),Ne.forEach(d),os=n(c),F=r(c,"DIV",{class:!0});var Re=k(F);h(ue.$$.fragment,Re),ns=n(Re),Oe=r(Re,"P",{"data-svelte-h":!0}),f(Oe)!=="svelte-jedy0o"&&(Oe.innerHTML=co),Re.forEach(d),as=n(c),B=r(c,"DIV",{class:!0});var Le=k(B);h(he.$$.fragment,Le),rs=n(Le),Ke=r(Le,"P",{"data-svelte-h":!0}),f(Ke)!=="svelte-advgdt"&&(Ke.textContent=po),Le.forEach(d),is=n(c),q=r(c,"DIV",{class:!0});var ze=k(q);h(ge.$$.fragment,ze),ls=n(ze),et=r(ze,"P",{"data-svelte-h":!0}),f(et)!=="svelte-1vfte1e"&&(et.innerHTML=fo),ze.forEach(d),ds=n(c),X=r(c,"DIV",{class:!0});var Nt=k(X);h(be.$$.fragment,Nt),ms=n(Nt),tt=r(Nt,"P",{"data-svelte-h":!0}),f(tt)!=="svelte-l9u3py"&&(tt.textContent=uo),Nt.forEach(d),cs=n(c),D=r(c,"DIV",{class:!0});var Rt=k(D);h(_e.$$.fragment,Rt),ps=n(Rt),st=r(Rt,"P",{"data-svelte-h":!0}),f(st)!=="svelte-1rv66k9"&&(st.innerHTML=ho),Rt.forEach(d),fs=n(c),V=r(c,"DIV",{class:!0});var le=k(V);h(ye.$$.fragment,le),us=n(le),ot=r(le,"P",{"data-svelte-h":!0}),f(ot)!=="svelte-h27n1e"&&(ot.textContent=go),hs=n(le),nt=r(le,"P",{"data-svelte-h":!0}),f(nt)!=="svelte-ipykkb"&&(nt.innerHTML=bo),gs=n(le),h(Y.$$.fragment,le),le.forEach(d),bs=n(c),J=r(c,"DIV",{class:!0});var G=k(J);h(ve.$$.fragment,G),_s=n(G),at=r(G,"P",{"data-svelte-h":!0}),f(at)!=="svelte-1iclqp4"&&(at.textContent=_o),ys=n(G),rt=r(G,"P",{"data-svelte-h":!0}),f(rt)!=="svelte-1qne8y2"&&(rt.textContent=yo),vs=n(G),it=r(G,"P",{"data-svelte-h":!0}),f(it)!=="svelte-12uf28n"&&(it.innerHTML=vo),Ms=n(G),lt=r(G,"P",{"data-svelte-h":!0}),f(lt)!=="svelte-11lpom8"&&(lt.textContent=Mo),$s=n(G),h(Q.$$.fragment,G),G.forEach(d),xs=n(c),S=r(c,"DIV",{class:!0});var Lt=k(S);h(Me.$$.fragment,Lt),ws=n(Lt),dt=r(Lt,"P",{"data-svelte-h":!0}),f(dt)!=="svelte-10xtjge"&&(dt.textContent=$o),Lt.forEach(d),Ts=n(c),j=r(c,"DIV",{class:!0});var L=k(j);h($e.$$.fragment,L),ks=n(L),mt=r(L,"P",{"data-svelte-h":!0}),f(mt)!=="svelte-yfpdyb"&&(mt.innerHTML=xo),Cs=n(L),ct=r(L,"P",{"data-svelte-h":!0}),f(ct)!=="svelte-z1uct7"&&(ct.textContent=wo),Zs=n(L),xe=r(L,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),f(xe)!=="svelte-3y0te0"&&(xe.innerHTML=To),Js=n(L),h(A.$$.fragment,L),L.forEach(d),Us=n(c),O=r(c,"DIV",{class:!0});var zt=k(O);h(we.$$.fragment,zt),js=n(zt),pt=r(zt,"P",{"data-svelte-h":!0}),f(pt)!=="svelte-17oym6v"&&(pt.textContent=ko),zt.forEach(d),Ws=n(c),U=r(c,"DIV",{class:!0});var H=k(U);h(Te.$$.fragment,H),Vs=n(H),ft=r(H,"P",{"data-svelte-h":!0}),f(ft)!=="svelte-1lisopl"&&(ft.textContent=Co),Gs=n(H),ut=r(H,"P",{"data-svelte-h":!0}),f(ut)!=="svelte-1fnd9e6"&&(ut.innerHTML=Zo),Hs=n(H),ke=r(H,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),f(ke)!=="svelte-82moo4"&&(ke.innerHTML=Jo),Is=n(H),h(K.$$.fragment,H),Es=n(H),h(ee.$$.fragment,H),H.forEach(d),Ns=n(c),te=r(c,"DIV",{class:!0});var Pt=k(te);h(Ce.$$.fragment,Pt),Rs=n(Pt),ht=r(Pt,"P",{"data-svelte-h":!0}),f(ht)!=="svelte-1o6lvix"&&(ht.innerHTML=Uo),Pt.forEach(d),Ls=n(c),N=r(c,"DIV",{class:!0});var xt=k(N);h(Ze.$$.fragment,xt),zs=n(xt),gt=r(xt,"P",{"data-svelte-h":!0}),f(gt)!=="svelte-1jxmzhx"&&(gt.textContent=jo),Ps=n(xt),h(se.$$.fragment,xt),xt.forEach(d),Fs=n(c),oe=r(c,"DIV",{class:!0});var Ft=k(oe);h(Je.$$.fragment,Ft),Bs=n(Ft),bt=r(Ft,"P",{"data-svelte-h":!0}),f(bt)!=="svelte-mecl9"&&(bt.innerHTML=Wo),Ft.forEach(d),qs=n(c),ne=r(c,"DIV",{class:!0});var Bt=k(ne);h(Ue.$$.fragment,Bt),Xs=n(Bt),_t=r(Bt,"P",{"data-svelte-h":!0}),f(_t)!=="svelte-1qkjlhy"&&(_t.innerHTML=Vo),Bt.forEach(d),Ds=n(c),ae=r(c,"DIV",{class:!0});var qt=k(ae);h(je.$$.fragment,qt),Ys=n(qt),yt=r(qt,"P",{"data-svelte-h":!0}),f(yt)!=="svelte-e25n5q"&&(yt.textContent=Go),qt.forEach(d),Qs=n(c),re=r(c,"DIV",{class:!0});var Xt=k(re);h(We.$$.fragment,Xt),Ss=n(Xt),vt=r(Xt,"P",{"data-svelte-h":!0}),f(vt)!=="svelte-qmktby"&&(vt.textContent=Ho),Xt.forEach(d),c.forEach(d),Vt=n(e),h(Ve.$$.fragment,e),Gt=n(e),I=r(e,"DIV",{class:!0});var wt=k(I);h(Ge.$$.fragment,wt),As=n(wt),Mt=r(wt,"P",{"data-svelte-h":!0}),f(Mt)!=="svelte-7y8zei"&&(Mt.textContent=Io),Os=n(wt),R=r(wt,"DIV",{class:!0});var Tt=k(R);h(He.$$.fragment,Tt),Ks=n(Tt),$t=r(Tt,"P",{"data-svelte-h":!0}),f($t)!=="svelte-5nfhmh"&&($t.textContent=Eo),eo=n(Tt),h(ie.$$.fragment,Tt),Tt.forEach(d),wt.forEach(d),Ht=n(e),h(Ie.$$.fragment,e),It=n(e),kt=r(e,"P",{}),k(kt).forEach(d),this.h()},h(){w(i,"name","hf:doc:metadata"),w(i,"content",nn),Zt.a=Jt,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(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(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(q,"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(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(V,"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(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(xe,"class","warning"),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(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ke,"class","tip"),w(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(te,"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(oe,"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(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(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(m,"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"),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")},m(e,M){t(document.head,i),x(e,T,M),x(e,v,M),x(e,l,M),g(p,e,M),x(e,s,M),g($,e,M),x(e,Ct,M),x(e,z,M),t(z,Dt),Zt.m(Lo,z),t(z,Jt),x(e,Ut,M),x(e,de,M),x(e,jt,M),g(me,e,M),x(e,Wt,M),x(e,m,M),g(ce,m,null),t(m,Yt),t(m,qe),t(m,Qt),t(m,Xe),t(m,St),t(m,De),t(m,At),t(m,W),g(pe,W,null),t(W,Ot),t(W,Ye),t(W,Kt),t(W,Qe),t(W,es),t(W,Se),t(m,ts),t(m,P),g(fe,P,null),t(P,ss),t(P,Ae),t(m,os),t(m,F),g(ue,F,null),t(F,ns),t(F,Oe),t(m,as),t(m,B),g(he,B,null),t(B,rs),t(B,Ke),t(m,is),t(m,q),g(ge,q,null),t(q,ls),t(q,et),t(m,ds),t(m,X),g(be,X,null),t(X,ms),t(X,tt),t(m,cs),t(m,D),g(_e,D,null),t(D,ps),t(D,st),t(m,fs),t(m,V),g(ye,V,null),t(V,us),t(V,ot),t(V,hs),t(V,nt),t(V,gs),g(Y,V,null),t(m,bs),t(m,J),g(ve,J,null),t(J,_s),t(J,at),t(J,ys),t(J,rt),t(J,vs),t(J,it),t(J,Ms),t(J,lt),t(J,$s),g(Q,J,null),t(m,xs),t(m,S),g(Me,S,null),t(S,ws),t(S,dt),t(m,Ts),t(m,j),g($e,j,null),t(j,ks),t(j,mt),t(j,Cs),t(j,ct),t(j,Zs),t(j,xe),t(j,Js),g(A,j,null),t(m,Us),t(m,O),g(we,O,null),t(O,js),t(O,pt),t(m,Ws),t(m,U),g(Te,U,null),t(U,Vs),t(U,ft),t(U,Gs),t(U,ut),t(U,Hs),t(U,ke),t(U,Is),g(K,U,null),t(U,Es),g(ee,U,null),t(m,Ns),t(m,te),g(Ce,te,null),t(te,Rs),t(te,ht),t(m,Ls),t(m,N),g(Ze,N,null),t(N,zs),t(N,gt),t(N,Ps),g(se,N,null),t(m,Fs),t(m,oe),g(Je,oe,null),t(oe,Bs),t(oe,bt),t(m,qs),t(m,ne),g(Ue,ne,null),t(ne,Xs),t(ne,_t),t(m,Ds),t(m,ae),g(je,ae,null),t(ae,Ys),t(ae,yt),t(m,Qs),t(m,re),g(We,re,null),t(re,Ss),t(re,vt),x(e,Vt,M),g(Ve,e,M),x(e,Gt,M),x(e,I,M),g(Ge,I,null),t(I,As),t(I,Mt),t(I,Os),t(I,R),g(He,R,null),t(R,Ks),t(R,$t),t(R,eo),g(ie,R,null),x(e,Ht,M),g(Ie,e,M),x(e,It,M),x(e,kt,M),Et=!0},p(e,[M]){const Ee={};M&2&&(Ee.$$scope={dirty:M,ctx:e}),Y.$set(Ee);const c={};M&2&&(c.$$scope={dirty:M,ctx:e}),Q.$set(c);const E={};M&2&&(E.$$scope={dirty:M,ctx:e}),A.$set(E);const Ne={};M&2&&(Ne.$$scope={dirty:M,ctx:e}),K.$set(Ne);const Re={};M&2&&(Re.$$scope={dirty:M,ctx:e}),ee.$set(Re);const Le={};M&2&&(Le.$$scope={dirty:M,ctx:e}),se.$set(Le);const ze={};M&2&&(ze.$$scope={dirty:M,ctx:e}),ie.$set(ze)},i(e){Et||(b(p.$$.fragment,e),b($.$$.fragment,e),b(me.$$.fragment,e),b(ce.$$.fragment,e),b(pe.$$.fragment,e),b(fe.$$.fragment,e),b(ue.$$.fragment,e),b(he.$$.fragment,e),b(ge.$$.fragment,e),b(be.$$.fragment,e),b(_e.$$.fragment,e),b(ye.$$.fragment,e),b(Y.$$.fragment,e),b(ve.$$.fragment,e),b(Q.$$.fragment,e),b(Me.$$.fragment,e),b($e.$$.fragment,e),b(A.$$.fragment,e),b(we.$$.fragment,e),b(Te.$$.fragment,e),b(K.$$.fragment,e),b(ee.$$.fragment,e),b(Ce.$$.fragment,e),b(Ze.$$.fragment,e),b(se.$$.fragment,e),b(Je.$$.fragment,e),b(Ue.$$.fragment,e),b(je.$$.fragment,e),b(We.$$.fragment,e),b(Ve.$$.fragment,e),b(Ge.$$.fragment,e),b(He.$$.fragment,e),b(ie.$$.fragment,e),b(Ie.$$.fragment,e),Et=!0)},o(e){_(p.$$.fragment,e),_($.$$.fragment,e),_(me.$$.fragment,e),_(ce.$$.fragment,e),_(pe.$$.fragment,e),_(fe.$$.fragment,e),_(ue.$$.fragment,e),_(he.$$.fragment,e),_(ge.$$.fragment,e),_(be.$$.fragment,e),_(_e.$$.fragment,e),_(ye.$$.fragment,e),_(Y.$$.fragment,e),_(ve.$$.fragment,e),_(Q.$$.fragment,e),_(Me.$$.fragment,e),_($e.$$.fragment,e),_(A.$$.fragment,e),_(we.$$.fragment,e),_(Te.$$.fragment,e),_(K.$$.fragment,e),_(ee.$$.fragment,e),_(Ce.$$.fragment,e),_(Ze.$$.fragment,e),_(se.$$.fragment,e),_(Je.$$.fragment,e),_(Ue.$$.fragment,e),_(je.$$.fragment,e),_(We.$$.fragment,e),_(Ve.$$.fragment,e),_(Ge.$$.fragment,e),_(He.$$.fragment,e),_(ie.$$.fragment,e),_(Ie.$$.fragment,e),Et=!1},d(e){e&&(d(T),d(v),d(l),d(s),d(Ct),d(z),d(Ut),d(de),d(jt),d(Wt),d(m),d(Vt),d(Gt),d(I),d(Ht),d(It),d(kt)),d(i),y(p,e),y($,e),y(me,e),y(ce),y(pe),y(fe),y(ue),y(he),y(ge),y(be),y(_e),y(ye),y(Y),y(ve),y(Q),y(Me),y($e),y(A),y(we),y(Te),y(K),y(ee),y(Ce),y(Ze),y(se),y(Je),y(Ue),y(je),y(We),y(Ve,e),y(Ge),y(He),y(ie),y(Ie,e)}}}const nn='{"title":"Models","local":"models","sections":[{"title":"ModelMixin","local":"diffusers.ModelMixin","sections":[],"depth":2},{"title":"PushToHubMixin","local":"diffusers.utils.PushToHubMixin","sections":[],"depth":2}],"depth":1}';function an(Z){return Po(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class un extends Fo{constructor(i){super(),Bo(this,i,an,on,zo,{})}}export{un as component}; | |
Xet Storage Details
- Size:
- 59.7 kB
- Xet hash:
- fb4f0425c8f513e695f9acb9a08e5d01775f39c66d404293300d34f45abff25a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.