Buckets:
| import{s as Jn,o as Gn,n as Cn}from"../chunks/scheduler.53228c21.js";import{S as Un,i as Nn,e as i,s as o,c,h as An,a as r,d as t,b as s,f as T,g as m,j as p,k as y,l as a,m as l,n as u,t as f,o as g,p as _}from"../chunks/index.100fac89.js";import{D as I}from"../chunks/Docstring.e77db3e2.js";import{C as Kt}from"../chunks/CodeBlock.0adb3827.js";import{E as kn}from"../chunks/ExampleCodeBlock.720e639b.js";import{H as Fe,E as En}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.7e71dc75.js";function jn(Pe){let h,k="Examples:",S,w,M;return w=new Kt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU2FuYVBpcGVsaW5lJTBBJTBBcGlwZSUyMCUzRCUyMFNhbmFQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyRWZmaWNpZW50LUxhcmdlLU1vZGVsJTJGU2FuYV8xNjAwTV8xMDI0cHhfQkYxNl9kaWZmdXNlcnMlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MzIlMEEpJTBBcGlwZS50byglMjJjdWRhJTIyKSUwQXBpcGUudGV4dF9lbmNvZGVyLnRvKHRvcmNoLmJmbG9hdDE2KSUwQXBpcGUudHJhbnNmb3JtZXIlMjAlM0QlMjBwaXBlLnRyYW5zZm9ybWVyLnRvKHRvcmNoLmJmbG9hdDE2KSUwQSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQlM0QnYSUyMGN5YmVycHVuayUyMGNhdCUyMHdpdGglMjBhJTIwbmVvbiUyMHNpZ24lMjB0aGF0JTIwc2F5cyUyMCUyMlNhbmElMjInKSU1QjAlNUQlMEFpbWFnZSU1QjAlNUQuc2F2ZSglMjJvdXRwdXQucG5nJTIyKQ==",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> SanaPipeline | |
| <span class="hljs-meta">>>> </span>pipe = SanaPipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"Efficient-Large-Model/Sana_1600M_1024px_BF16_diffusers"</span>, torch_dtype=torch.float32 | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>pipe.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>pipe.text_encoder.to(torch.bfloat16) | |
| <span class="hljs-meta">>>> </span>pipe.transformer = pipe.transformer.to(torch.bfloat16) | |
| <span class="hljs-meta">>>> </span>image = pipe(prompt=<span class="hljs-string">'a cyberpunk cat with a neon sign that says "Sana"'</span>)[<span class="hljs-number">0</span>] | |
| <span class="hljs-meta">>>> </span>image[<span class="hljs-number">0</span>].save(<span class="hljs-string">"output.png"</span>)`,lang:"py",wrap:!1}}),{c(){h=i("p"),h.textContent=k,S=o(),c(w.$$.fragment)},l(d){h=r(d,"P",{"data-svelte-h":!0}),p(h)!=="svelte-kvfsh7"&&(h.textContent=k),S=s(d),m(w.$$.fragment,d)},m(d,P){l(d,h,P),l(d,S,P),u(w,d,P),M=!0},p:Cn,i(d){M||(f(w.$$.fragment,d),M=!0)},o(d){g(w.$$.fragment,d),M=!1},d(d){d&&(t(h),t(S)),_(w,d)}}}function Zn(Pe){let h,k="Examples:",S,w,M;return w=new Kt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU2FuYVBBR1BpcGVsaW5lJTBBJTBBcGlwZSUyMCUzRCUyMFNhbmFQQUdQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyRWZmaWNpZW50LUxhcmdlLU1vZGVsJTJGU2FuYV8xNjAwTV8xMDI0cHhfQkYxNl9kaWZmdXNlcnMlMjIlMkMlMEElMjAlMjAlMjAlMjBwYWdfYXBwbGllZF9sYXllcnMlM0QlNUIlMjJ0cmFuc2Zvcm1lcl9ibG9ja3MuOCUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQzMiUyQyUwQSklMEFwaXBlLnRvKCUyMmN1ZGElMjIpJTBBcGlwZS50ZXh0X2VuY29kZXIudG8odG9yY2guYmZsb2F0MTYpJTBBcGlwZS50cmFuc2Zvcm1lciUyMCUzRCUyMHBpcGUudHJhbnNmb3JtZXIudG8odG9yY2guYmZsb2F0MTYpJTBBJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKHByb21wdCUzRCdhJTIwY3liZXJwdW5rJTIwY2F0JTIwd2l0aCUyMGElMjBuZW9uJTIwc2lnbiUyMHRoYXQlMjBzYXlzJTIwJTIyU2FuYSUyMicpJTVCMCU1RCUwQWltYWdlJTVCMCU1RC5zYXZlKCUyMm91dHB1dC5wbmclMjIp",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> SanaPAGPipeline | |
| <span class="hljs-meta">>>> </span>pipe = SanaPAGPipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"Efficient-Large-Model/Sana_1600M_1024px_BF16_diffusers"</span>, | |
| <span class="hljs-meta">... </span> pag_applied_layers=[<span class="hljs-string">"transformer_blocks.8"</span>], | |
| <span class="hljs-meta">... </span> torch_dtype=torch.float32, | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>pipe.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>pipe.text_encoder.to(torch.bfloat16) | |
| <span class="hljs-meta">>>> </span>pipe.transformer = pipe.transformer.to(torch.bfloat16) | |
| <span class="hljs-meta">>>> </span>image = pipe(prompt=<span class="hljs-string">'a cyberpunk cat with a neon sign that says "Sana"'</span>)[<span class="hljs-number">0</span>] | |
| <span class="hljs-meta">>>> </span>image[<span class="hljs-number">0</span>].save(<span class="hljs-string">"output.png"</span>)`,lang:"py",wrap:!1}}),{c(){h=i("p"),h.textContent=k,S=o(),c(w.$$.fragment)},l(d){h=r(d,"P",{"data-svelte-h":!0}),p(h)!=="svelte-kvfsh7"&&(h.textContent=k),S=s(d),m(w.$$.fragment,d)},m(d,P){l(d,h,P),l(d,S,P),u(w,d,P),M=!0},p:Cn,i(d){M||(f(w.$$.fragment,d),M=!0)},o(d){g(w.$$.fragment,d),M=!1},d(d){d&&(t(h),t(S)),_(w,d)}}}function Bn(Pe){let h,k,S,w,M,d,P,en='<img alt="LoRA" src="https://img.shields.io/badge/LoRA-d8b4fe?style=flat"/> <img alt="MPS" src="https://img.shields.io/badge/MPS-000000?style=flat&logo=apple&logoColor=white%22"/>',We,D,tn='<a href="https://huggingface.co/papers/2410.10629" rel="nofollow">SANA: Efficient High-Resolution Image Synthesis with Linear Diffusion Transformers</a> from NVIDIA and MIT HAN Lab, by Enze Xie, Junsong Chen, Junyu Chen, Han Cai, Haotian Tang, Yujun Lin, Zhekai Zhang, Muyang Li, Ligeng Zhu, Yao Lu, Song Han.',He,X,nn="The abstract from the paper is:",Re,Q,an="<em>We introduce Sana, a text-to-image framework that can efficiently generate images up to 4096×4096 resolution. Sana can synthesize high-resolution, high-quality images with strong text-image alignment at a remarkably fast speed, deployable on laptop GPU. Core designs include: (1) Deep compression autoencoder: unlike traditional AEs, which compress images only 8×, we trained an AE that can compress images 32×, effectively reducing the number of latent tokens. (2) Linear DiT: we replace all vanilla attention in DiT with linear attention, which is more efficient at high resolutions without sacrificing quality. (3) Decoder-only text encoder: we replaced T5 with modern decoder-only small LLM as the text encoder and designed complex human instruction with in-context learning to enhance the image-text alignment. (4) Efficient training and sampling: we propose Flow-DPM-Solver to reduce sampling steps, with efficient caption labeling and selection to accelerate convergence. As a result, Sana-0.6B is very competitive with modern giant diffusion model (e.g. Flux-12B), being 20 times smaller and 100+ times faster in measured throughput. Moreover, Sana-0.6B can be deployed on a 16GB laptop GPU, taking less than 1 second to generate a 1024×1024 resolution image. Sana enables content creation at low cost. Code and model will be publicly released.</em>",ze,N,on='<p>Make sure to check out the Schedulers <a href="../../using-diffusers/schedulers">guide</a> to learn how to explore the tradeoff between scheduler speed and quality, and see the <a href="../../using-diffusers/loading#reuse-a-pipeline">reuse components across pipelines</a> section to learn how to efficiently load the same components into multiple pipelines.</p>',De,Y,sn='This pipeline was contributed by <a href="https://github.com/lawrence-cj" rel="nofollow">lawrence-cj</a> and <a href="https://github.com/chenjy2003" rel="nofollow">chenjy2003</a>. The original codebase can be found <a href="https://github.com/NVlabs/Sana" rel="nofollow">here</a>. The original weights can be found under <a href="https://huggingface.co/Efficient-Large-Model" rel="nofollow">hf.co/Efficient-Large-Model</a>.',Xe,O,rn="Available models:",Qe,K,ln='<thead><tr><th align="center">Model</th> <th align="center">Recommended dtype</th></tr></thead> <tbody><tr><td align="center"><a href="https://huggingface.co/Efficient-Large-Model/Sana_1600M_1024px_BF16_diffusers" rel="nofollow"><code>Efficient-Large-Model/Sana_1600M_1024px_BF16_diffusers</code></a></td> <td align="center"><code>torch.bfloat16</code></td></tr> <tr><td align="center"><a href="https://huggingface.co/Efficient-Large-Model/Sana_1600M_1024px_diffusers" rel="nofollow"><code>Efficient-Large-Model/Sana_1600M_1024px_diffusers</code></a></td> <td align="center"><code>torch.float16</code></td></tr> <tr><td align="center"><a href="https://huggingface.co/Efficient-Large-Model/Sana_1600M_1024px_MultiLing_diffusers" rel="nofollow"><code>Efficient-Large-Model/Sana_1600M_1024px_MultiLing_diffusers</code></a></td> <td align="center"><code>torch.float16</code></td></tr> <tr><td align="center"><a href="https://huggingface.co/Efficient-Large-Model/Sana_1600M_512px_diffusers" rel="nofollow"><code>Efficient-Large-Model/Sana_1600M_512px_diffusers</code></a></td> <td align="center"><code>torch.float16</code></td></tr> <tr><td align="center"><a href="https://huggingface.co/Efficient-Large-Model/Sana_1600M_512px_MultiLing_diffusers" rel="nofollow"><code>Efficient-Large-Model/Sana_1600M_512px_MultiLing_diffusers</code></a></td> <td align="center"><code>torch.float16</code></td></tr> <tr><td align="center"><a href="https://huggingface.co/Efficient-Large-Model/Sana_600M_1024px_diffusers" rel="nofollow"><code>Efficient-Large-Model/Sana_600M_1024px_diffusers</code></a></td> <td align="center"><code>torch.float16</code></td></tr> <tr><td align="center"><a href="https://huggingface.co/Efficient-Large-Model/Sana_600M_512px_diffusers" rel="nofollow"><code>Efficient-Large-Model/Sana_600M_512px_diffusers</code></a></td> <td align="center"><code>torch.float16</code></td></tr></tbody>',Ye,ee,dn='Refer to <a href="https://huggingface.co/collections/Efficient-Large-Model/sana-673efba2a57ed99843f11f9e" rel="nofollow">this</a> collection for more information.',Oe,te,pn="Note: The recommended dtype mentioned is for the transformer weights. The text encoder and VAE weights must stay in <code>torch.bfloat16</code> or <code>torch.float32</code> for the model to work correctly. Please refer to the inference example below to see how to load the model with the recommended dtype.",Ke,A,cn='<p>Make sure to pass the <code>variant</code> argument for downloaded checkpoints to use lower disk space. Set it to <code>"fp16"</code> for models with recommended dtype as <code>torch.float16</code>, and <code>"bf16"</code> for models with recommended dtype as <code>torch.bfloat16</code>. By default, <code>torch.float32</code> weights are downloaded, which use twice the amount of disk storage. Additionally, <code>torch.float32</code> weights can be downcasted on-the-fly by specifying the <code>torch_dtype</code> argument. Read about it in the <a href="https://huggingface.co/docs/diffusers/v0.31.0/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained" rel="nofollow">docs</a>.</p>',et,ne,tt,ae,mn="Quantization helps reduce the memory requirements of very large models by storing model weights in a lower precision data type. However, quantization may have varying impact on video quality depending on the video model.",nt,oe,un='Refer to the <a href="../../quantization/overview">Quantization</a> overview to learn more about supported quantization backends and selecting a quantization backend that supports your use case. The example below demonstrates how to load a quantized <a href="/docs/diffusers/pr_13746/en/api/pipelines/sana#diffusers.SanaPipeline">SanaPipeline</a> for inference with bitsandbytes.',at,se,ot,ie,st,b,re,Tt,$e,fn='Pipeline for text-to-image generation using <a href="https://huggingface.co/papers/2410.10629" rel="nofollow">Sana</a>.',Pt,C,le,$t,Se,gn="Function invoked when calling the pipeline for generation.",St,E,It,j,de,kt,Ie,_n=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,Ct,Z,pe,Jt,ke,hn=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,Gt,B,ce,Ut,Ce,bn=`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to | |
| compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`,Nt,q,me,At,Je,vn=`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to | |
| compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow | |
| processing larger images.`,Et,L,ue,jt,Ge,wn="Encodes the prompt into text encoder hidden states.",it,fe,rt,v,ge,Zt,Ue,yn=`Pipeline for text-to-image generation using <a href="https://huggingface.co/papers/2410.10629" rel="nofollow">Sana</a>. This pipeline | |
| supports the use of <a href="https://huggingface.co/docs/diffusers/main/en/using-diffusers/pag" rel="nofollow">Perturbed Attention Guidance | |
| (PAG)</a>.`,Bt,J,_e,qt,Ne,xn="Function invoked when calling the pipeline for generation.",Lt,V,Vt,F,he,Ft,Ae,Mn=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,Wt,W,be,Ht,Ee,Tn=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,Rt,H,ve,zt,je,Pn=`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to | |
| compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`,Dt,R,we,Xt,Ze,$n=`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to | |
| compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow | |
| processing larger images.`,Qt,z,ye,Yt,Be,Sn="Encodes the prompt into text encoder hidden states.",lt,xe,dt,G,Me,Ot,qe,In="Output class for Sana pipelines.",pt,Te,ct,Ve,mt;return M=new Fe({props:{title:"SanaPipeline",local:"sanapipeline",headingTag:"h1"}}),ne=new Fe({props:{title:"Quantization",local:"quantization",headingTag:"h2"}}),se=new Kt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQml0c0FuZEJ5dGVzQ29uZmlnJTIwYXMlMjBEaWZmdXNlcnNCaXRzQW5kQnl0ZXNDb25maWclMkMlMjBTYW5hVHJhbnNmb3JtZXIyRE1vZGVsJTJDJTIwU2FuYVBpcGVsaW5lJTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJpdHNBbmRCeXRlc0NvbmZpZyUyMGFzJTIwQml0c0FuZEJ5dGVzQ29uZmlnJTJDJTIwQXV0b01vZGVsJTBBJTBBcXVhbnRfY29uZmlnJTIwJTNEJTIwQml0c0FuZEJ5dGVzQ29uZmlnKGxvYWRfaW5fOGJpdCUzRFRydWUpJTBBdGV4dF9lbmNvZGVyXzhiaXQlMjAlM0QlMjBBdXRvTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMkVmZmljaWVudC1MYXJnZS1Nb2RlbCUyRlNhbmFfMTYwME1fMTAyNHB4X2RpZmZ1c2VycyUyMiUyQyUwQSUyMCUyMCUyMCUyMHN1YmZvbGRlciUzRCUyMnRleHRfZW5jb2RlciUyMiUyQyUwQSUyMCUyMCUyMCUyMHF1YW50aXphdGlvbl9jb25maWclM0RxdWFudF9jb25maWclMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEEpJTBBJTBBcXVhbnRfY29uZmlnJTIwJTNEJTIwRGlmZnVzZXJzQml0c0FuZEJ5dGVzQ29uZmlnKGxvYWRfaW5fOGJpdCUzRFRydWUpJTBBdHJhbnNmb3JtZXJfOGJpdCUyMCUzRCUyMFNhbmFUcmFuc2Zvcm1lcjJETW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMkVmZmljaWVudC1MYXJnZS1Nb2RlbCUyRlNhbmFfMTYwME1fMTAyNHB4X2RpZmZ1c2VycyUyMiUyQyUwQSUyMCUyMCUyMCUyMHN1YmZvbGRlciUzRCUyMnRyYW5zZm9ybWVyJTIyJTJDJTBBJTIwJTIwJTIwJTIwcXVhbnRpemF0aW9uX2NvbmZpZyUzRHF1YW50X2NvbmZpZyUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUwQSklMEElMEFwaXBlbGluZSUyMCUzRCUyMFNhbmFQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyRWZmaWNpZW50LUxhcmdlLU1vZGVsJTJGU2FuYV8xNjAwTV8xMDI0cHhfZGlmZnVzZXJzJTIyJTJDJTBBJTIwJTIwJTIwJTIwdGV4dF9lbmNvZGVyJTNEdGV4dF9lbmNvZGVyXzhiaXQlMkMlMEElMjAlMjAlMjAlMjB0cmFuc2Zvcm1lciUzRHRyYW5zZm9ybWVyXzhiaXQlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEElMjAlMjAlMjAlMjBkZXZpY2VfbWFwJTNEJTIyYmFsYW5jZWQlMjIlMkMlMEEpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyYSUyMHRpbnklMjBhc3Ryb25hdXQlMjBoYXRjaGluZyUyMGZyb20lMjBhbiUyMGVnZyUyMG9uJTIwdGhlJTIwbW9vbiUyMiUwQWltYWdlJTIwJTNEJTIwcGlwZWxpbmUocHJvbXB0KS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2Uuc2F2ZSglMjJzYW5hLnBuZyUyMik=",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> BitsAndBytesConfig <span class="hljs-keyword">as</span> DiffusersBitsAndBytesConfig, SanaTransformer2DModel, SanaPipeline | |
| <span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BitsAndBytesConfig <span class="hljs-keyword">as</span> BitsAndBytesConfig, AutoModel | |
| quant_config = BitsAndBytesConfig(load_in_8bit=<span class="hljs-literal">True</span>) | |
| text_encoder_8bit = AutoModel.from_pretrained( | |
| <span class="hljs-string">"Efficient-Large-Model/Sana_1600M_1024px_diffusers"</span>, | |
| subfolder=<span class="hljs-string">"text_encoder"</span>, | |
| quantization_config=quant_config, | |
| torch_dtype=torch.float16, | |
| ) | |
| quant_config = DiffusersBitsAndBytesConfig(load_in_8bit=<span class="hljs-literal">True</span>) | |
| transformer_8bit = SanaTransformer2DModel.from_pretrained( | |
| <span class="hljs-string">"Efficient-Large-Model/Sana_1600M_1024px_diffusers"</span>, | |
| subfolder=<span class="hljs-string">"transformer"</span>, | |
| quantization_config=quant_config, | |
| torch_dtype=torch.float16, | |
| ) | |
| pipeline = SanaPipeline.from_pretrained( | |
| <span class="hljs-string">"Efficient-Large-Model/Sana_1600M_1024px_diffusers"</span>, | |
| text_encoder=text_encoder_8bit, | |
| transformer=transformer_8bit, | |
| torch_dtype=torch.float16, | |
| device_map=<span class="hljs-string">"balanced"</span>, | |
| ) | |
| prompt = <span class="hljs-string">"a tiny astronaut hatching from an egg on the moon"</span> | |
| image = pipeline(prompt).images[<span class="hljs-number">0</span>] | |
| image.save(<span class="hljs-string">"sana.png"</span>)`,lang:"py",wrap:!1}}),ie=new Fe({props:{title:"SanaPipeline",local:"diffusers.SanaPipeline",headingTag:"h2"}}),re=new I({props:{name:"class diffusers.SanaPipeline",anchor:"diffusers.SanaPipeline",parameters:[{name:"tokenizer",val:": GemmaTokenizer"},{name:"text_encoder",val:": Gemma2PreTrainedModel"},{name:"vae",val:": AutoencoderDC"},{name:"transformer",val:": SanaTransformer2DModel"},{name:"scheduler",val:": DPMSolverMultistepScheduler"}],source:"https://github.com/huggingface/diffusers/blob/vr_13746/src/diffusers/pipelines/sana/pipeline_sana.py#L190"}}),le=new I({props:{name:"__call__",anchor:"diffusers.SanaPipeline.__call__",parameters:[{name:"prompt",val:": str | list[str] = None"},{name:"negative_prompt",val:": str = ''"},{name:"num_inference_steps",val:": int = 20"},{name:"timesteps",val:": list = None"},{name:"sigmas",val:": list = None"},{name:"guidance_scale",val:": float = 4.5"},{name:"num_images_per_prompt",val:": int | None = 1"},{name:"height",val:": int = 1024"},{name:"width",val:": int = 1024"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": torch._C.Generator | list[torch._C.Generator] | None = None"},{name:"latents",val:": torch.Tensor | None = None"},{name:"prompt_embeds",val:": torch.Tensor | None = None"},{name:"prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"negative_prompt_embeds",val:": torch.Tensor | None = None"},{name:"negative_prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"output_type",val:": str | None = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"clean_caption",val:": bool = False"},{name:"use_resolution_binning",val:": bool = True"},{name:"attention_kwargs",val:": dict[str, typing.Any] | None = None"},{name:"callback_on_step_end",val:": typing.Optional[typing.Callable[[int, int], NoneType]] = None"},{name:"callback_on_step_end_tensor_inputs",val:": list = ['latents']"},{name:"max_sequence_length",val:": int = 300"},{name:"complex_human_instruction",val:`: list = ["Given a user prompt, generate an 'Enhanced prompt' that provides detailed visual descriptions suitable for image generation. Evaluate the level of detail in the user prompt:", '- If the prompt is simple, focus on adding specifics about colors, shapes, sizes, textures, and spatial relationships to create vivid and concrete scenes.', '- If the prompt is already detailed, refine and enhance the existing details slightly without overcomplicating.', 'Here are examples of how to transform or refine prompts:', '- User Prompt: A cat sleeping -> Enhanced: A small, fluffy white cat curled up in a round shape, sleeping peacefully on a warm sunny windowsill, surrounded by pots of blooming red flowers.', '- User Prompt: A busy city street -> Enhanced: A bustling city street scene at dusk, featuring glowing street lamps, a diverse crowd of people in colorful clothing, and a double-decker bus passing by towering glass skyscrapers.', 'Please generate only the enhanced description for the prompt below and avoid including any additional commentary or evaluations:', 'User Prompt: ']`}],parametersDescription:[{anchor:"diffusers.SanaPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| The prompt or prompts to guide the image generation. If not defined, one has to pass <code>prompt_embeds</code>. | |
| instead.`,name:"prompt"},{anchor:"diffusers.SanaPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| The prompt or prompts not to guide the image generation. If not defined, one has to pass | |
| <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is | |
| less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.SanaPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 20) — | |
| The number of denoising steps. More denoising steps usually lead to a higher quality image at the | |
| expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.SanaPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>list[int]</code>, <em>optional</em>) — | |
| Custom timesteps to use for the denoising process with schedulers which support a <code>timesteps</code> argument | |
| in their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is | |
| passed will be used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.SanaPipeline.__call__.sigmas",description:`<strong>sigmas</strong> (<code>list[float]</code>, <em>optional</em>) — | |
| Custom sigmas to use for the denoising process with schedulers which support a <code>sigmas</code> argument in | |
| their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is passed | |
| will be used.`,name:"sigmas"},{anchor:"diffusers.SanaPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 4.5) — | |
| Guidance scale as defined in <a href="https://huggingface.co/papers/2207.12598" rel="nofollow">Classifier-Free Diffusion | |
| Guidance</a>. <code>guidance_scale</code> is defined as <code>w</code> of equation 2. | |
| of <a href="https://huggingface.co/papers/2205.11487" rel="nofollow">Imagen Paper</a>. Guidance scale is enabled by setting | |
| <code>guidance_scale > 1</code>. Higher guidance scale encourages to generate images that are closely linked to | |
| the text <code>prompt</code>, usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.SanaPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.SanaPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size) — | |
| The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.SanaPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size) — | |
| The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.SanaPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) — | |
| Corresponds to parameter eta (η) in the DDIM paper: <a href="https://huggingface.co/papers/2010.02502" rel="nofollow">https://huggingface.co/papers/2010.02502</a>. Only | |
| applies to <a href="/docs/diffusers/pr_13746/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.SanaPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>list[torch.Generator]</code>, <em>optional</em>) — | |
| One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a> | |
| to make generation deterministic.`,name:"generator"},{anchor:"diffusers.SanaPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image | |
| generation. Can be used to tweak the same generation with different prompts. If not provided, a latents | |
| tensor will be generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.SanaPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not | |
| provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.SanaPipeline.__call__.prompt_attention_mask",description:"<strong>prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) — Pre-generated attention mask for text embeddings.",name:"prompt_attention_mask"},{anchor:"diffusers.SanaPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated negative text embeddings. For PixArt-Sigma this negative prompt should be "". If not | |
| provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.SanaPipeline.__call__.negative_prompt_attention_mask",description:`<strong>negative_prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated attention mask for negative text embeddings.`,name:"negative_prompt_attention_mask"},{anchor:"diffusers.SanaPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"pil"</code>) — | |
| The output format of the generate image. Choose between | |
| <a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.SanaPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether or not to return a <code>~pipelines.stable_diffusion.IFPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.SanaPipeline.__call__.attention_kwargs",description:`<strong>attention_kwargs</strong> — | |
| A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under | |
| <code>self.processor</code> in | |
| <a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"attention_kwargs"},{anchor:"diffusers.SanaPipeline.__call__.clean_caption",description:`<strong>clean_caption</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether or not to clean the caption before creating embeddings. Requires <code>beautifulsoup4</code> and <code>ftfy</code> to | |
| be installed. If the dependencies are not installed, the embeddings will be created from the raw | |
| prompt.`,name:"clean_caption"},{anchor:"diffusers.SanaPipeline.__call__.use_resolution_binning",description:`<strong>use_resolution_binning</strong> (<code>bool</code> defaults to <code>True</code>) — | |
| If set to <code>True</code>, the requested height and width are first mapped to the closest resolutions using | |
| <code>ASPECT_RATIO_1024_BIN</code>. After the produced latents are decoded into images, they are resized back to | |
| the requested resolution. Useful for generating non-square images.`,name:"use_resolution_binning"},{anchor:"diffusers.SanaPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) — | |
| A function that calls at the end of each denoising steps during the inference. The function is called | |
| with the following arguments: <code>callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>. <code>callback_kwargs</code> will include a list of all tensors as specified by | |
| <code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.SanaPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>list</code>, <em>optional</em>) — | |
| The list of tensor inputs for the <code>callback_on_step_end</code> function. The tensors specified in the list | |
| will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in the | |
| <code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"callback_on_step_end_tensor_inputs"},{anchor:"diffusers.SanaPipeline.__call__.max_sequence_length",description:`<strong>max_sequence_length</strong> (<code>int</code> defaults to <code>300</code>) — | |
| Maximum sequence length to use with the <code>prompt</code>.`,name:"max_sequence_length"},{anchor:"diffusers.SanaPipeline.__call__.complex_human_instruction",description:`<strong>complex_human_instruction</strong> (<code>list[str]</code>, <em>optional</em>) — | |
| Instructions for complex human attention: | |
| <a href="https://github.com/NVlabs/Sana/blob/main/configs/sana_app_config/Sana_1600M_app.yaml#L55" rel="nofollow">https://github.com/NVlabs/Sana/blob/main/configs/sana_app_config/Sana_1600M_app.yaml#L55</a>.`,name:"complex_human_instruction"}],source:"https://github.com/huggingface/diffusers/blob/vr_13746/src/diffusers/pipelines/sana/pipeline_sana.py#L727",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>If <code>return_dict</code> is <code>True</code>, <a | |
| href="/docs/diffusers/pr_13746/en/api/pipelines/controlnet_sana#diffusers.pipelines.sana.pipeline_output.SanaPipelineOutput" | |
| >SanaPipelineOutput</a> is returned, | |
| otherwise a <code>tuple</code> is returned where the first element is a list with the generated images</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><a | |
| href="/docs/diffusers/pr_13746/en/api/pipelines/controlnet_sana#diffusers.pipelines.sana.pipeline_output.SanaPipelineOutput" | |
| >SanaPipelineOutput</a> or <code>tuple</code></p> | |
| `}}),E=new kn({props:{anchor:"diffusers.SanaPipeline.__call__.example",$$slots:{default:[jn]},$$scope:{ctx:Pe}}}),de=new I({props:{name:"disable_vae_slicing",anchor:"diffusers.SanaPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13746/src/diffusers/pipelines/sana/pipeline_sana.py#L236"}}),pe=new I({props:{name:"disable_vae_tiling",anchor:"diffusers.SanaPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13746/src/diffusers/pipelines/sana/pipeline_sana.py#L263"}}),ce=new I({props:{name:"enable_vae_slicing",anchor:"diffusers.SanaPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13746/src/diffusers/pipelines/sana/pipeline_sana.py#L223"}}),me=new I({props:{name:"enable_vae_tiling",anchor:"diffusers.SanaPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13746/src/diffusers/pipelines/sana/pipeline_sana.py#L249"}}),ue=new I({props:{name:"encode_prompt",anchor:"diffusers.SanaPipeline.encode_prompt",parameters:[{name:"prompt",val:": str | list[str]"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"negative_prompt",val:": str = ''"},{name:"num_images_per_prompt",val:": int = 1"},{name:"device",val:": torch.device | None = None"},{name:"prompt_embeds",val:": torch.Tensor | None = None"},{name:"negative_prompt_embeds",val:": torch.Tensor | None = None"},{name:"prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"negative_prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"clean_caption",val:": bool = False"},{name:"max_sequence_length",val:": int = 300"},{name:"complex_human_instruction",val:": list[str] | None = None"},{name:"lora_scale",val:": float | None = None"}],parametersDescription:[{anchor:"diffusers.SanaPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| prompt to be encoded`,name:"prompt"},{anchor:"diffusers.SanaPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| The prompt not to guide the image generation. If not defined, one has to pass <code>negative_prompt_embeds</code> | |
| instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is less than <code>1</code>). For | |
| PixArt-Alpha, this should be "".`,name:"negative_prompt"},{anchor:"diffusers.SanaPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.SanaPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.SanaPipeline.encode_prompt.device",description:`<strong>device</strong> — (<code>torch.device</code>, <em>optional</em>): | |
| torch device to place the resulting embeddings on`,name:"device"},{anchor:"diffusers.SanaPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not | |
| provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.SanaPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated negative text embeddings. For Sana, it’s should be the embeddings of the "" string.`,name:"negative_prompt_embeds"},{anchor:"diffusers.SanaPipeline.encode_prompt.clean_caption",description:`<strong>clean_caption</strong> (<code>bool</code>, defaults to <code>False</code>) — | |
| If <code>True</code>, the function will preprocess and clean the provided caption before encoding.`,name:"clean_caption"},{anchor:"diffusers.SanaPipeline.encode_prompt.max_sequence_length",description:"<strong>max_sequence_length</strong> (<code>int</code>, defaults to 300) — Maximum sequence length to use for the prompt.",name:"max_sequence_length"},{anchor:"diffusers.SanaPipeline.encode_prompt.complex_human_instruction",description:`<strong>complex_human_instruction</strong> (<code>list[str]</code>, defaults to <code>complex_human_instruction</code>) — | |
| If <code>complex_human_instruction</code> is not empty, the function will use the complex Human instruction for | |
| the prompt.`,name:"complex_human_instruction"}],source:"https://github.com/huggingface/diffusers/blob/vr_13746/src/diffusers/pipelines/sana/pipeline_sana.py#L334"}}),fe=new Fe({props:{title:"SanaPAGPipeline",local:"diffusers.SanaPAGPipeline",headingTag:"h2"}}),ge=new I({props:{name:"class diffusers.SanaPAGPipeline",anchor:"diffusers.SanaPAGPipeline",parameters:[{name:"tokenizer",val:": GemmaTokenizer"},{name:"text_encoder",val:": Gemma2PreTrainedModel"},{name:"vae",val:": AutoencoderDC"},{name:"transformer",val:": SanaTransformer2DModel"},{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"},{name:"pag_applied_layers",val:": str | list[str] = 'transformer_blocks.0'"}],source:"https://github.com/huggingface/diffusers/blob/vr_13746/src/diffusers/pipelines/pag/pipeline_pag_sana.py#L148"}}),_e=new I({props:{name:"__call__",anchor:"diffusers.SanaPAGPipeline.__call__",parameters:[{name:"prompt",val:": str | list[str] = None"},{name:"negative_prompt",val:": str = ''"},{name:"num_inference_steps",val:": int = 20"},{name:"timesteps",val:": list = None"},{name:"sigmas",val:": list = None"},{name:"guidance_scale",val:": float = 4.5"},{name:"num_images_per_prompt",val:": int | None = 1"},{name:"height",val:": int = 1024"},{name:"width",val:": int = 1024"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": torch._C.Generator | list[torch._C.Generator] | None = None"},{name:"latents",val:": torch.Tensor | None = None"},{name:"prompt_embeds",val:": torch.Tensor | None = None"},{name:"prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"negative_prompt_embeds",val:": torch.Tensor | None = None"},{name:"negative_prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"output_type",val:": str | None = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"clean_caption",val:": bool = False"},{name:"use_resolution_binning",val:": bool = True"},{name:"callback_on_step_end",val:": typing.Optional[typing.Callable[[int, int], NoneType]] = None"},{name:"callback_on_step_end_tensor_inputs",val:": list = ['latents']"},{name:"max_sequence_length",val:": int = 300"},{name:"complex_human_instruction",val:`: list = ["Given a user prompt, generate an 'Enhanced prompt' that provides detailed visual descriptions suitable for image generation. Evaluate the level of detail in the user prompt:", '- If the prompt is simple, focus on adding specifics about colors, shapes, sizes, textures, and spatial relationships to create vivid and concrete scenes.', '- If the prompt is already detailed, refine and enhance the existing details slightly without overcomplicating.', 'Here are examples of how to transform or refine prompts:', '- User Prompt: A cat sleeping -> Enhanced: A small, fluffy white cat curled up in a round shape, sleeping peacefully on a warm sunny windowsill, surrounded by pots of blooming red flowers.', '- User Prompt: A busy city street -> Enhanced: A bustling city street scene at dusk, featuring glowing street lamps, a diverse crowd of people in colorful clothing, and a double-decker bus passing by towering glass skyscrapers.', 'Please generate only the enhanced description for the prompt below and avoid including any additional commentary or evaluations:', 'User Prompt: ']`},{name:"pag_scale",val:": float = 3.0"},{name:"pag_adaptive_scale",val:": float = 0.0"}],parametersDescription:[{anchor:"diffusers.SanaPAGPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| The prompt or prompts to guide the image generation. If not defined, one has to pass <code>prompt_embeds</code>. | |
| instead.`,name:"prompt"},{anchor:"diffusers.SanaPAGPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| The prompt or prompts not to guide the image generation. If not defined, one has to pass | |
| <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is | |
| less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.SanaPAGPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 20) — | |
| The number of denoising steps. More denoising steps usually lead to a higher quality image at the | |
| expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.SanaPAGPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>list[int]</code>, <em>optional</em>) — | |
| Custom timesteps to use for the denoising process with schedulers which support a <code>timesteps</code> argument | |
| in their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is | |
| passed will be used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.SanaPAGPipeline.__call__.sigmas",description:`<strong>sigmas</strong> (<code>list[float]</code>, <em>optional</em>) — | |
| Custom sigmas to use for the denoising process with schedulers which support a <code>sigmas</code> argument in | |
| their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is passed | |
| will be used.`,name:"sigmas"},{anchor:"diffusers.SanaPAGPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 4.5) — | |
| Guidance scale as defined in <a href="https://huggingface.co/papers/2207.12598" rel="nofollow">Classifier-Free Diffusion | |
| Guidance</a>. <code>guidance_scale</code> is defined as <code>w</code> of equation 2. | |
| of <a href="https://huggingface.co/papers/2205.11487" rel="nofollow">Imagen Paper</a>. Guidance scale is enabled by setting | |
| <code>guidance_scale > 1</code>. Higher guidance scale encourages to generate images that are closely linked to | |
| the text <code>prompt</code>, usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.SanaPAGPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.SanaPAGPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size) — | |
| The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.SanaPAGPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size) — | |
| The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.SanaPAGPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) — | |
| Corresponds to parameter eta (η) in the DDIM paper: <a href="https://huggingface.co/papers/2010.02502" rel="nofollow">https://huggingface.co/papers/2010.02502</a>. Only | |
| applies to <a href="/docs/diffusers/pr_13746/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.SanaPAGPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>list[torch.Generator]</code>, <em>optional</em>) — | |
| One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a> | |
| to make generation deterministic.`,name:"generator"},{anchor:"diffusers.SanaPAGPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image | |
| generation. Can be used to tweak the same generation with different prompts. If not provided, a latents | |
| tensor will be generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.SanaPAGPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not | |
| provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.SanaPAGPipeline.__call__.prompt_attention_mask",description:"<strong>prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) — Pre-generated attention mask for text embeddings.",name:"prompt_attention_mask"},{anchor:"diffusers.SanaPAGPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated negative text embeddings. For PixArt-Sigma this negative prompt should be "". If not | |
| provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.SanaPAGPipeline.__call__.negative_prompt_attention_mask",description:`<strong>negative_prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated attention mask for negative text embeddings.`,name:"negative_prompt_attention_mask"},{anchor:"diffusers.SanaPAGPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"pil"</code>) — | |
| The output format of the generate image. Choose between | |
| <a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.SanaPAGPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether or not to return a <code>~pipelines.stable_diffusion.IFPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.SanaPAGPipeline.__call__.clean_caption",description:`<strong>clean_caption</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether or not to clean the caption before creating embeddings. Requires <code>beautifulsoup4</code> and <code>ftfy</code> to | |
| be installed. If the dependencies are not installed, the embeddings will be created from the raw | |
| prompt.`,name:"clean_caption"},{anchor:"diffusers.SanaPAGPipeline.__call__.use_resolution_binning",description:`<strong>use_resolution_binning</strong> (<code>bool</code> defaults to <code>True</code>) — | |
| If set to <code>True</code>, the requested height and width are first mapped to the closest resolutions using | |
| <code>ASPECT_RATIO_1024_BIN</code>. After the produced latents are decoded into images, they are resized back to | |
| the requested resolution. Useful for generating non-square images.`,name:"use_resolution_binning"},{anchor:"diffusers.SanaPAGPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) — | |
| A function that calls at the end of each denoising steps during the inference. The function is called | |
| with the following arguments: <code>callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>. <code>callback_kwargs</code> will include a list of all tensors as specified by | |
| <code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.SanaPAGPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>list</code>, <em>optional</em>) — | |
| The list of tensor inputs for the <code>callback_on_step_end</code> function. The tensors specified in the list | |
| will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in the | |
| <code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"callback_on_step_end_tensor_inputs"},{anchor:"diffusers.SanaPAGPipeline.__call__.max_sequence_length",description:"<strong>max_sequence_length</strong> (<code>int</code> defaults to 300) — Maximum sequence length to use with the <code>prompt</code>.",name:"max_sequence_length"},{anchor:"diffusers.SanaPAGPipeline.__call__.complex_human_instruction",description:`<strong>complex_human_instruction</strong> (<code>list[str]</code>, <em>optional</em>) — | |
| Instructions for complex human attention: | |
| <a href="https://github.com/NVlabs/Sana/blob/main/configs/sana_app_config/Sana_1600M_app.yaml#L55" rel="nofollow">https://github.com/NVlabs/Sana/blob/main/configs/sana_app_config/Sana_1600M_app.yaml#L55</a>.`,name:"complex_human_instruction"},{anchor:"diffusers.SanaPAGPipeline.__call__.pag_scale",description:`<strong>pag_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 3.0) — | |
| The scale factor for the perturbed attention guidance. If it is set to 0.0, the perturbed attention | |
| guidance will not be used.`,name:"pag_scale"},{anchor:"diffusers.SanaPAGPipeline.__call__.pag_adaptive_scale",description:`<strong>pag_adaptive_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) — | |
| The adaptive scale factor for the perturbed attention guidance. If it is set to 0.0, <code>pag_scale</code> is | |
| used.`,name:"pag_adaptive_scale"}],source:"https://github.com/huggingface/diffusers/blob/vr_13746/src/diffusers/pipelines/pag/pipeline_pag_sana.py#L648",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>If <code>return_dict</code> is <code>True</code>, <a | |
| href="/docs/diffusers/pr_13746/en/api/pipelines/latent_diffusion#diffusers.ImagePipelineOutput" | |
| >ImagePipelineOutput</a> is returned, otherwise a <code>tuple</code> is | |
| returned where the first element is a list with the generated images</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><a | |
| href="/docs/diffusers/pr_13746/en/api/pipelines/latent_diffusion#diffusers.ImagePipelineOutput" | |
| >ImagePipelineOutput</a> or <code>tuple</code></p> | |
| `}}),V=new kn({props:{anchor:"diffusers.SanaPAGPipeline.__call__.example",$$slots:{default:[Zn]},$$scope:{ctx:Pe}}}),he=new I({props:{name:"disable_vae_slicing",anchor:"diffusers.SanaPAGPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13746/src/diffusers/pipelines/pag/pipeline_pag_sana.py#L202"}}),be=new I({props:{name:"disable_vae_tiling",anchor:"diffusers.SanaPAGPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13746/src/diffusers/pipelines/pag/pipeline_pag_sana.py#L229"}}),ve=new I({props:{name:"enable_vae_slicing",anchor:"diffusers.SanaPAGPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13746/src/diffusers/pipelines/pag/pipeline_pag_sana.py#L189"}}),we=new I({props:{name:"enable_vae_tiling",anchor:"diffusers.SanaPAGPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13746/src/diffusers/pipelines/pag/pipeline_pag_sana.py#L215"}}),ye=new I({props:{name:"encode_prompt",anchor:"diffusers.SanaPAGPipeline.encode_prompt",parameters:[{name:"prompt",val:": str | list[str]"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"negative_prompt",val:": str = ''"},{name:"num_images_per_prompt",val:": int = 1"},{name:"device",val:": torch.device | None = None"},{name:"prompt_embeds",val:": torch.Tensor | None = None"},{name:"negative_prompt_embeds",val:": torch.Tensor | None = None"},{name:"prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"negative_prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"clean_caption",val:": bool = False"},{name:"max_sequence_length",val:": int = 300"},{name:"complex_human_instruction",val:": list[str] | None = None"}],parametersDescription:[{anchor:"diffusers.SanaPAGPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| prompt to be encoded`,name:"prompt"},{anchor:"diffusers.SanaPAGPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| The prompt not to guide the image generation. If not defined, one has to pass <code>negative_prompt_embeds</code> | |
| instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is less than <code>1</code>). For | |
| PixArt-Alpha, this should be "".`,name:"negative_prompt"},{anchor:"diffusers.SanaPAGPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.SanaPAGPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.SanaPAGPipeline.encode_prompt.device",description:`<strong>device</strong> — (<code>torch.device</code>, <em>optional</em>): | |
| torch device to place the resulting embeddings on`,name:"device"},{anchor:"diffusers.SanaPAGPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not | |
| provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.SanaPAGPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated negative text embeddings. For Sana, it’s should be the embeddings of the "" string.`,name:"negative_prompt_embeds"},{anchor:"diffusers.SanaPAGPipeline.encode_prompt.clean_caption",description:`<strong>clean_caption</strong> (<code>bool</code>, defaults to <code>False</code>) — | |
| If <code>True</code>, the function will preprocess and clean the provided caption before encoding.`,name:"clean_caption"},{anchor:"diffusers.SanaPAGPipeline.encode_prompt.max_sequence_length",description:"<strong>max_sequence_length</strong> (<code>int</code>, defaults to 300) — Maximum sequence length to use for the prompt.",name:"max_sequence_length"},{anchor:"diffusers.SanaPAGPipeline.encode_prompt.complex_human_instruction",description:`<strong>complex_human_instruction</strong> (<code>list[str]</code>, defaults to <code>complex_human_instruction</code>) — | |
| If <code>complex_human_instruction</code> is not empty, the function will use the complex Human instruction for | |
| the prompt.`,name:"complex_human_instruction"}],source:"https://github.com/huggingface/diffusers/blob/vr_13746/src/diffusers/pipelines/pag/pipeline_pag_sana.py#L242"}}),xe=new Fe({props:{title:"SanaPipelineOutput",local:"diffusers.pipelines.sana.pipeline_output.SanaPipelineOutput",headingTag:"h2"}}),Me=new I({props:{name:"class diffusers.pipelines.sana.pipeline_output.SanaPipelineOutput",anchor:"diffusers.pipelines.sana.pipeline_output.SanaPipelineOutput",parameters:[{name:"images",val:": list[PIL.Image.Image] | numpy.ndarray"}],parametersDescription:[{anchor:"diffusers.pipelines.sana.pipeline_output.SanaPipelineOutput.images",description:`<strong>images</strong> (<code>list[PIL.Image.Image]</code> or <code>np.ndarray</code>) — | |
| list of denoised PIL images of length <code>batch_size</code> or numpy array of shape <code>(batch_size, height, width, num_channels)</code>. PIL images or numpy array present the denoised images of the diffusion pipeline.`,name:"images"}],source:"https://github.com/huggingface/diffusers/blob/vr_13746/src/diffusers/pipelines/sana/pipeline_output.py#L10"}}),Te=new En({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/sana.md"}}),{c(){h=i("meta"),k=o(),S=i("p"),w=o(),c(M.$$.fragment),d=o(),P=i("div"),P.innerHTML=en,We=o(),D=i("p"),D.innerHTML=tn,He=o(),X=i("p"),X.textContent=nn,Re=o(),Q=i("p"),Q.innerHTML=an,ze=o(),N=i("blockquote"),N.innerHTML=on,De=o(),Y=i("p"),Y.innerHTML=sn,Xe=o(),O=i("p"),O.textContent=rn,Qe=o(),K=i("table"),K.innerHTML=ln,Ye=o(),ee=i("p"),ee.innerHTML=dn,Oe=o(),te=i("p"),te.innerHTML=pn,Ke=o(),A=i("blockquote"),A.innerHTML=cn,et=o(),c(ne.$$.fragment),tt=o(),ae=i("p"),ae.textContent=mn,nt=o(),oe=i("p"),oe.innerHTML=un,at=o(),c(se.$$.fragment),ot=o(),c(ie.$$.fragment),st=o(),b=i("div"),c(re.$$.fragment),Tt=o(),$e=i("p"),$e.innerHTML=fn,Pt=o(),C=i("div"),c(le.$$.fragment),$t=o(),Se=i("p"),Se.textContent=gn,St=o(),c(E.$$.fragment),It=o(),j=i("div"),c(de.$$.fragment),kt=o(),Ie=i("p"),Ie.innerHTML=_n,Ct=o(),Z=i("div"),c(pe.$$.fragment),Jt=o(),ke=i("p"),ke.innerHTML=hn,Gt=o(),B=i("div"),c(ce.$$.fragment),Ut=o(),Ce=i("p"),Ce.textContent=bn,Nt=o(),q=i("div"),c(me.$$.fragment),At=o(),Je=i("p"),Je.textContent=vn,Et=o(),L=i("div"),c(ue.$$.fragment),jt=o(),Ge=i("p"),Ge.textContent=wn,it=o(),c(fe.$$.fragment),rt=o(),v=i("div"),c(ge.$$.fragment),Zt=o(),Ue=i("p"),Ue.innerHTML=yn,Bt=o(),J=i("div"),c(_e.$$.fragment),qt=o(),Ne=i("p"),Ne.textContent=xn,Lt=o(),c(V.$$.fragment),Vt=o(),F=i("div"),c(he.$$.fragment),Ft=o(),Ae=i("p"),Ae.innerHTML=Mn,Wt=o(),W=i("div"),c(be.$$.fragment),Ht=o(),Ee=i("p"),Ee.innerHTML=Tn,Rt=o(),H=i("div"),c(ve.$$.fragment),zt=o(),je=i("p"),je.textContent=Pn,Dt=o(),R=i("div"),c(we.$$.fragment),Xt=o(),Ze=i("p"),Ze.textContent=$n,Qt=o(),z=i("div"),c(ye.$$.fragment),Yt=o(),Be=i("p"),Be.textContent=Sn,lt=o(),c(xe.$$.fragment),dt=o(),G=i("div"),c(Me.$$.fragment),Ot=o(),qe=i("p"),qe.textContent=In,pt=o(),c(Te.$$.fragment),ct=o(),Ve=i("p"),this.h()},l(e){const n=An("svelte-u9bgzb",document.head);h=r(n,"META",{name:!0,content:!0}),n.forEach(t),k=s(e),S=r(e,"P",{}),T(S).forEach(t),w=s(e),m(M.$$.fragment,e),d=s(e),P=r(e,"DIV",{class:!0,"data-svelte-h":!0}),p(P)!=="svelte-1elo7hh"&&(P.innerHTML=en),We=s(e),D=r(e,"P",{"data-svelte-h":!0}),p(D)!=="svelte-h8aibn"&&(D.innerHTML=tn),He=s(e),X=r(e,"P",{"data-svelte-h":!0}),p(X)!=="svelte-1cwsb16"&&(X.textContent=nn),Re=s(e),Q=r(e,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-1uh3w7a"&&(Q.innerHTML=an),ze=s(e),N=r(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),p(N)!=="svelte-r1jcqf"&&(N.innerHTML=on),De=s(e),Y=r(e,"P",{"data-svelte-h":!0}),p(Y)!=="svelte-1eg28j8"&&(Y.innerHTML=sn),Xe=s(e),O=r(e,"P",{"data-svelte-h":!0}),p(O)!=="svelte-1bob28v"&&(O.textContent=rn),Qe=s(e),K=r(e,"TABLE",{"data-svelte-h":!0}),p(K)!=="svelte-dcodwq"&&(K.innerHTML=ln),Ye=s(e),ee=r(e,"P",{"data-svelte-h":!0}),p(ee)!=="svelte-1swlfqd"&&(ee.innerHTML=dn),Oe=s(e),te=r(e,"P",{"data-svelte-h":!0}),p(te)!=="svelte-okwwje"&&(te.innerHTML=pn),Ke=s(e),A=r(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),p(A)!=="svelte-152ufi"&&(A.innerHTML=cn),et=s(e),m(ne.$$.fragment,e),tt=s(e),ae=r(e,"P",{"data-svelte-h":!0}),p(ae)!=="svelte-1ou2pxc"&&(ae.textContent=mn),nt=s(e),oe=r(e,"P",{"data-svelte-h":!0}),p(oe)!=="svelte-zfhp6o"&&(oe.innerHTML=un),at=s(e),m(se.$$.fragment,e),ot=s(e),m(ie.$$.fragment,e),st=s(e),b=r(e,"DIV",{class:!0});var x=T(b);m(re.$$.fragment,x),Tt=s(x),$e=r(x,"P",{"data-svelte-h":!0}),p($e)!=="svelte-1ot17tf"&&($e.innerHTML=fn),Pt=s(x),C=r(x,"DIV",{class:!0});var U=T(C);m(le.$$.fragment,U),$t=s(U),Se=r(U,"P",{"data-svelte-h":!0}),p(Se)!=="svelte-v78lg8"&&(Se.textContent=gn),St=s(U),m(E.$$.fragment,U),U.forEach(t),It=s(x),j=r(x,"DIV",{class:!0});var ut=T(j);m(de.$$.fragment,ut),kt=s(ut),Ie=r(ut,"P",{"data-svelte-h":!0}),p(Ie)!=="svelte-1s3c06i"&&(Ie.innerHTML=_n),ut.forEach(t),Ct=s(x),Z=r(x,"DIV",{class:!0});var ft=T(Z);m(pe.$$.fragment,ft),Jt=s(ft),ke=r(ft,"P",{"data-svelte-h":!0}),p(ke)!=="svelte-pkn4ui"&&(ke.innerHTML=hn),ft.forEach(t),Gt=s(x),B=r(x,"DIV",{class:!0});var gt=T(B);m(ce.$$.fragment,gt),Ut=s(gt),Ce=r(gt,"P",{"data-svelte-h":!0}),p(Ce)!=="svelte-14bnrb6"&&(Ce.textContent=bn),gt.forEach(t),Nt=s(x),q=r(x,"DIV",{class:!0});var _t=T(q);m(me.$$.fragment,_t),At=s(_t),Je=r(_t,"P",{"data-svelte-h":!0}),p(Je)!=="svelte-1xwrf7t"&&(Je.textContent=vn),_t.forEach(t),Et=s(x),L=r(x,"DIV",{class:!0});var ht=T(L);m(ue.$$.fragment,ht),jt=s(ht),Ge=r(ht,"P",{"data-svelte-h":!0}),p(Ge)!=="svelte-16q0ax1"&&(Ge.textContent=wn),ht.forEach(t),x.forEach(t),it=s(e),m(fe.$$.fragment,e),rt=s(e),v=r(e,"DIV",{class:!0});var $=T(v);m(ge.$$.fragment,$),Zt=s($),Ue=r($,"P",{"data-svelte-h":!0}),p(Ue)!=="svelte-vrq74s"&&(Ue.innerHTML=yn),Bt=s($),J=r($,"DIV",{class:!0});var Le=T(J);m(_e.$$.fragment,Le),qt=s(Le),Ne=r(Le,"P",{"data-svelte-h":!0}),p(Ne)!=="svelte-v78lg8"&&(Ne.textContent=xn),Lt=s(Le),m(V.$$.fragment,Le),Le.forEach(t),Vt=s($),F=r($,"DIV",{class:!0});var bt=T(F);m(he.$$.fragment,bt),Ft=s(bt),Ae=r(bt,"P",{"data-svelte-h":!0}),p(Ae)!=="svelte-1s3c06i"&&(Ae.innerHTML=Mn),bt.forEach(t),Wt=s($),W=r($,"DIV",{class:!0});var vt=T(W);m(be.$$.fragment,vt),Ht=s(vt),Ee=r(vt,"P",{"data-svelte-h":!0}),p(Ee)!=="svelte-pkn4ui"&&(Ee.innerHTML=Tn),vt.forEach(t),Rt=s($),H=r($,"DIV",{class:!0});var wt=T(H);m(ve.$$.fragment,wt),zt=s(wt),je=r(wt,"P",{"data-svelte-h":!0}),p(je)!=="svelte-14bnrb6"&&(je.textContent=Pn),wt.forEach(t),Dt=s($),R=r($,"DIV",{class:!0});var yt=T(R);m(we.$$.fragment,yt),Xt=s(yt),Ze=r(yt,"P",{"data-svelte-h":!0}),p(Ze)!=="svelte-1xwrf7t"&&(Ze.textContent=$n),yt.forEach(t),Qt=s($),z=r($,"DIV",{class:!0});var xt=T(z);m(ye.$$.fragment,xt),Yt=s(xt),Be=r(xt,"P",{"data-svelte-h":!0}),p(Be)!=="svelte-16q0ax1"&&(Be.textContent=Sn),xt.forEach(t),$.forEach(t),lt=s(e),m(xe.$$.fragment,e),dt=s(e),G=r(e,"DIV",{class:!0});var Mt=T(G);m(Me.$$.fragment,Mt),Ot=s(Mt),qe=r(Mt,"P",{"data-svelte-h":!0}),p(qe)!=="svelte-1h3n85u"&&(qe.textContent=In),Mt.forEach(t),pt=s(e),m(Te.$$.fragment,e),ct=s(e),Ve=r(e,"P",{}),T(Ve).forEach(t),this.h()},h(){y(h,"name","hf:doc:metadata"),y(h,"content",qn),y(P,"class","flex flex-wrap space-x-1"),y(N,"class","tip"),y(A,"class","tip"),y(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,n){a(document.head,h),l(e,k,n),l(e,S,n),l(e,w,n),u(M,e,n),l(e,d,n),l(e,P,n),l(e,We,n),l(e,D,n),l(e,He,n),l(e,X,n),l(e,Re,n),l(e,Q,n),l(e,ze,n),l(e,N,n),l(e,De,n),l(e,Y,n),l(e,Xe,n),l(e,O,n),l(e,Qe,n),l(e,K,n),l(e,Ye,n),l(e,ee,n),l(e,Oe,n),l(e,te,n),l(e,Ke,n),l(e,A,n),l(e,et,n),u(ne,e,n),l(e,tt,n),l(e,ae,n),l(e,nt,n),l(e,oe,n),l(e,at,n),u(se,e,n),l(e,ot,n),u(ie,e,n),l(e,st,n),l(e,b,n),u(re,b,null),a(b,Tt),a(b,$e),a(b,Pt),a(b,C),u(le,C,null),a(C,$t),a(C,Se),a(C,St),u(E,C,null),a(b,It),a(b,j),u(de,j,null),a(j,kt),a(j,Ie),a(b,Ct),a(b,Z),u(pe,Z,null),a(Z,Jt),a(Z,ke),a(b,Gt),a(b,B),u(ce,B,null),a(B,Ut),a(B,Ce),a(b,Nt),a(b,q),u(me,q,null),a(q,At),a(q,Je),a(b,Et),a(b,L),u(ue,L,null),a(L,jt),a(L,Ge),l(e,it,n),u(fe,e,n),l(e,rt,n),l(e,v,n),u(ge,v,null),a(v,Zt),a(v,Ue),a(v,Bt),a(v,J),u(_e,J,null),a(J,qt),a(J,Ne),a(J,Lt),u(V,J,null),a(v,Vt),a(v,F),u(he,F,null),a(F,Ft),a(F,Ae),a(v,Wt),a(v,W),u(be,W,null),a(W,Ht),a(W,Ee),a(v,Rt),a(v,H),u(ve,H,null),a(H,zt),a(H,je),a(v,Dt),a(v,R),u(we,R,null),a(R,Xt),a(R,Ze),a(v,Qt),a(v,z),u(ye,z,null),a(z,Yt),a(z,Be),l(e,lt,n),u(xe,e,n),l(e,dt,n),l(e,G,n),u(Me,G,null),a(G,Ot),a(G,qe),l(e,pt,n),u(Te,e,n),l(e,ct,n),l(e,Ve,n),mt=!0},p(e,[n]){const x={};n&2&&(x.$$scope={dirty:n,ctx:e}),E.$set(x);const U={};n&2&&(U.$$scope={dirty:n,ctx:e}),V.$set(U)},i(e){mt||(f(M.$$.fragment,e),f(ne.$$.fragment,e),f(se.$$.fragment,e),f(ie.$$.fragment,e),f(re.$$.fragment,e),f(le.$$.fragment,e),f(E.$$.fragment,e),f(de.$$.fragment,e),f(pe.$$.fragment,e),f(ce.$$.fragment,e),f(me.$$.fragment,e),f(ue.$$.fragment,e),f(fe.$$.fragment,e),f(ge.$$.fragment,e),f(_e.$$.fragment,e),f(V.$$.fragment,e),f(he.$$.fragment,e),f(be.$$.fragment,e),f(ve.$$.fragment,e),f(we.$$.fragment,e),f(ye.$$.fragment,e),f(xe.$$.fragment,e),f(Me.$$.fragment,e),f(Te.$$.fragment,e),mt=!0)},o(e){g(M.$$.fragment,e),g(ne.$$.fragment,e),g(se.$$.fragment,e),g(ie.$$.fragment,e),g(re.$$.fragment,e),g(le.$$.fragment,e),g(E.$$.fragment,e),g(de.$$.fragment,e),g(pe.$$.fragment,e),g(ce.$$.fragment,e),g(me.$$.fragment,e),g(ue.$$.fragment,e),g(fe.$$.fragment,e),g(ge.$$.fragment,e),g(_e.$$.fragment,e),g(V.$$.fragment,e),g(he.$$.fragment,e),g(be.$$.fragment,e),g(ve.$$.fragment,e),g(we.$$.fragment,e),g(ye.$$.fragment,e),g(xe.$$.fragment,e),g(Me.$$.fragment,e),g(Te.$$.fragment,e),mt=!1},d(e){e&&(t(k),t(S),t(w),t(d),t(P),t(We),t(D),t(He),t(X),t(Re),t(Q),t(ze),t(N),t(De),t(Y),t(Xe),t(O),t(Qe),t(K),t(Ye),t(ee),t(Oe),t(te),t(Ke),t(A),t(et),t(tt),t(ae),t(nt),t(oe),t(at),t(ot),t(st),t(b),t(it),t(rt),t(v),t(lt),t(dt),t(G),t(pt),t(ct),t(Ve)),t(h),_(M,e),_(ne,e),_(se,e),_(ie,e),_(re),_(le),_(E),_(de),_(pe),_(ce),_(me),_(ue),_(fe,e),_(ge),_(_e),_(V),_(he),_(be),_(ve),_(we),_(ye),_(xe,e),_(Me),_(Te,e)}}}const qn='{"title":"SanaPipeline","local":"sanapipeline","sections":[{"title":"Quantization","local":"quantization","sections":[],"depth":2},{"title":"SanaPipeline","local":"diffusers.SanaPipeline","sections":[],"depth":2},{"title":"SanaPAGPipeline","local":"diffusers.SanaPAGPipeline","sections":[],"depth":2},{"title":"SanaPipelineOutput","local":"diffusers.pipelines.sana.pipeline_output.SanaPipelineOutput","sections":[],"depth":2}],"depth":1}';function Ln(Pe){return Gn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Dn extends Un{constructor(h){super(),Nn(this,h,Ln,Bn,Jn,{})}}export{Dn as component}; | |
Xet Storage Details
- Size:
- 68 kB
- Xet hash:
- cafd4065018da6242ddb42e92caec0a05dc409e4fb1076625842dec3d469ec25
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.