Buckets:
| import"../chunks/DsnmJJEf.js";import{i as J,h as R,C as N,H as i,a as b,D as o,E as Z,s as z}from"../chunks/BLbO27j4.js";import{p as W,o as S,s as e,f as I,a as T,b as G,c as n,d as v,r as s,n as j}from"../chunks/jDjavuwI.js";const F='{"title":"Kandinsky 6 Transformers","local":"kandinsky-6-transformers","sections":[{"title":"Kandinsky6Transformer3DModel","local":"diffusers.Kandinsky6Transformer3DModel","sections":[],"depth":2},{"title":"Kandinsky6SRTransformer3DModel","local":"diffusers.Kandinsky6SRTransformer3DModel","sections":[],"depth":2}],"depth":1}';var B=v('<meta name="hf:doc:metadata"/>'),P=v(`<p></p> <!> <!> <p>Kandinsky 6 uses a multimodal diffusion transformer that denoises video and audio latents together for | |
| text/image-to-video-and-audio generation, and a text-free diffusion transformer for video super-resolution.</p> <!> <p>The multimodal transformer used by <a href="/docs/diffusers/pr_14521/en/api/pipelines/kandinsky6#diffusers.Kandinsky6TI2VAPipeline">Kandinsky6TI2VAPipeline</a>.</p> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Kandinsky 6 multimodal transformer for text/image-to-video-and-audio generation.</p> <p>Video and audio are denoised together through fused, cross-modal transformer blocks, each conditioned on its own | |
| text branch (Qwen2.5-VL tokens + CLIP pooled embedding). Passing no <em>audio_hidden_states</em> denoises video alone | |
| while still running the fused block’s video self-attention, cross-attention, and feed-forward stages. Rotary | |
| embeddings are computed inside <em>forward</em> from the token grid.</p> <p>Released checkpoints set <em>text_token_padding</em>, <em>ca_rope</em>, <em>cross_gates</em>, and <em>fix_modulation</em> to <em>True</em> (see each | |
| checkpoint’s <em>transformer/config.json</em>); the <em>False</em> defaults only describe an architecture variant this repo does | |
| not ship weights for.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!></div></div> <!> <p>The text-free transformer used by <a href="/docs/diffusers/pr_14521/en/api/pipelines/kandinsky6#diffusers.Kandinsky6SRPipeline">Kandinsky6SRPipeline</a> to refine one tile of the upscaled video at a time.</p> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Text-free diffusion transformer for Kandinsky 6 video super-resolution.</p> <p>The model denoises tiles of the K-VAE latent video. Its input concatenates the noisy latent with the anchor latent | |
| and the anchor mask that condition the super-resolution (<code>2 * in_visual_dim + 1</code> channels), and its output holds <code>out_visual_dim</code> channels: <code>in_visual_dim</code> for a plain velocity checkpoint, or a widened <code>n_grid * in_visual_dim</code> for the <a href="/docs/diffusers/pr_14521/en/api/schedulers/piflow#diffusers.PiflowScheduler">PiflowScheduler</a> distilled checkpoints. Video self-attention runs through the NABLA sparse block pattern | |
| on the <code>flex</code> attention backend, which needs the token grid (<code>height</code> and <code>width</code> after <code>patch_size</code>) to be | |
| divisible by 8.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!></div></div> <!> <p></p>`,1);function C(x,M){W(M,!1),S(()=>{new URLSearchParams(window.location.search).get("fw")}),J();var d=P();R("1qfrq73",y=>{var k=B();z(k,"content",F),T(y,k)});var r=e(I(d),2);N(r,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var m=e(r,2);i(m,{title:"Kandinsky 6 Transformers",local:"kandinsky-6-transformers",headingTag:"h1"});var l=e(m,4);i(l,{title:"Kandinsky6Transformer3DModel",local:"diffusers.Kandinsky6Transformer3DModel",headingTag:"h2"});var c=e(l,4);b(c,{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwS2FuZGluc2t5NlRyYW5zZm9ybWVyM0RNb2RlbCUwQSUwQXRyYW5zZm9ybWVyJTIwJTNEJTIwS2FuZGluc2t5NlRyYW5zZm9ybWVyM0RNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIya2FuZGluc2t5bGFiJTJGS2FuZGluc2t5LTYuMC1Qcm8tZGlzdGlsbC01cy1EaWZmdXNlcnMlMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJ0cmFuc2Zvcm1lciUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMEEp",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> Kandinsky6Transformer3DModel | |
| transformer = Kandinsky6Transformer3DModel.from_pretrained( | |
| <span class="hljs-string">"kandinskylab/Kandinsky-6.0-Pro-distill-5s-Diffusers"</span>, subfolder=<span class="hljs-string">"transformer"</span>, torch_dtype=torch.bfloat16 | |
| )`,lang:"python",wrap:!1});var t=e(c,2),f=n(t);o(f,{name:"class diffusers.Kandinsky6Transformer3DModel",anchor:"diffusers.Kandinsky6Transformer3DModel",source:"https://github.com/huggingface/diffusers/blob/vr_14521/src/diffusers/models/transformers/transformer_kandinsky6.py#L591",parameters:[{name:"in_visual_dim",val:": int = 16"},{name:"out_visual_dim",val:": int = 16"},{name:"in_text_dim",val:": int = 3584"},{name:"in_text_dim2",val:": int = 768"},{name:"time_dim",val:": int = 1024"},{name:"patch_size",val:": tuple = (1, 2, 2)"},{name:"model_dim",val:": int = 4096"},{name:"ff_dim",val:": int = 16384"},{name:"num_text_blocks",val:": int = 4"},{name:"num_visual_blocks",val:": int = 60"},{name:"axes_dims",val:": tuple = (32, 48, 48)"},{name:"visual_cond",val:": bool = True"},{name:"in_audio_dim",val:": int = 20"},{name:"out_audio_dim",val:": int = 20"},{name:"model_dim_a",val:": int | None = None"},{name:"time_dim_a",val:": int | None = None"},{name:"ff_dim_a",val:": int | None = None"},{name:"axes_dims_a",val:": tuple | None = None"},{name:"audio_freqs_scaling",val:": float = 1.0"},{name:"scale_factor",val:": tuple | list[float] = (1.0, 2.0, 2.0)"},{name:"text_token_padding",val:": bool = False"},{name:"ca_rope",val:": bool = False"},{name:"cross_gates",val:": bool = False"},{name:"fix_modulation",val:": bool = False"},{name:"visual_token_type_num_embeddings",val:": int = 0"}],parametersDescription:[{anchor:"diffusers.Kandinsky6Transformer3DModel.in_visual_dim",description:"<strong>in_visual_dim</strong> (<em>int</em>, <em>optional</em>, defaults to 16) — Number of input video latent channels.",name:"in_visual_dim"},{anchor:"diffusers.Kandinsky6Transformer3DModel.out_visual_dim",description:"<strong>out_visual_dim</strong> (<em>int</em>, <em>optional</em>, defaults to 16) — Number of output video latent channels.",name:"out_visual_dim"},{anchor:"diffusers.Kandinsky6Transformer3DModel.in_text_dim",description:"<strong>in_text_dim</strong> (<em>int</em>, <em>optional</em>, defaults to 3584) — Text token embedding dimension.",name:"in_text_dim"},{anchor:"diffusers.Kandinsky6Transformer3DModel.in_text_dim2",description:"<strong>in_text_dim2</strong> (<em>int</em>, <em>optional</em>, defaults to 768) — Pooled text embedding dimension.",name:"in_text_dim2"},{anchor:"diffusers.Kandinsky6Transformer3DModel.time_dim",description:"<strong>time_dim</strong> (<em>int</em>, <em>optional</em>, defaults to 1024) — Time embedding dimension.",name:"time_dim"},{anchor:"diffusers.Kandinsky6Transformer3DModel.patch_size",description:"<strong>patch_size</strong> (<em>tuple[int, int, int]</em>, <em>optional</em>, defaults to <code>(1, 2, 2)</code>) — Video patch size.",name:"patch_size"},{anchor:"diffusers.Kandinsky6Transformer3DModel.model_dim",description:"<strong>model_dim</strong> (<em>int</em>, <em>optional</em>, defaults to 4096) — Video transformer hidden dimension.",name:"model_dim"},{anchor:"diffusers.Kandinsky6Transformer3DModel.ff_dim",description:"<strong>ff_dim</strong> (<em>int</em>, <em>optional</em>, defaults to 16384) — Video feed-forward hidden dimension.",name:"ff_dim"},{anchor:"diffusers.Kandinsky6Transformer3DModel.num_text_blocks",description:"<strong>num_text_blocks</strong> (<em>int</em>, <em>optional</em>, defaults to 4) — Number of text blocks per modality.",name:"num_text_blocks"},{anchor:"diffusers.Kandinsky6Transformer3DModel.num_visual_blocks",description:"<strong>num_visual_blocks</strong> (<em>int</em>, <em>optional</em>, defaults to 60) — Number of fused video/audio blocks.",name:"num_visual_blocks"},{anchor:"diffusers.Kandinsky6Transformer3DModel.axes_dims",description:"<strong>axes_dims</strong> (<em>tuple[int, int, int]</em>, <em>optional</em>, defaults to <code>(32, 48, 48)</code>) — RoPE dimensions for video.",name:"axes_dims"},{anchor:"diffusers.Kandinsky6Transformer3DModel.visual_cond",description:"<strong>visual_cond</strong> (<em>bool</em>, <em>optional</em>, defaults to True) — Whether video conditioning channels are present.",name:"visual_cond"},{anchor:"diffusers.Kandinsky6Transformer3DModel.in_audio_dim",description:"<strong>in_audio_dim</strong> (<em>int</em>, <em>optional</em>, defaults to 20) — Number of input audio latent channels.",name:"in_audio_dim"},{anchor:"diffusers.Kandinsky6Transformer3DModel.out_audio_dim",description:"<strong>out_audio_dim</strong> (<em>int</em>, <em>optional</em>, defaults to 20) — Number of output audio latent channels.",name:"out_audio_dim"},{anchor:"diffusers.Kandinsky6Transformer3DModel.model_dim_a",description:"<strong>model_dim_a</strong> (<em>int</em>, <em>optional</em>) — Audio transformer hidden dimension. Defaults to <em>model_dim</em>.",name:"model_dim_a"},{anchor:"diffusers.Kandinsky6Transformer3DModel.time_dim_a",description:"<strong>time_dim_a</strong> (<em>int</em>, <em>optional</em>) — Audio time embedding dimension. Defaults to <em>time_dim</em>.",name:"time_dim_a"},{anchor:"diffusers.Kandinsky6Transformer3DModel.ff_dim_a",description:"<strong>ff_dim_a</strong> (<em>int</em>, <em>optional</em>) — Audio feed-forward hidden dimension. Defaults to <em>ff_dim</em>.",name:"ff_dim_a"},{anchor:"diffusers.Kandinsky6Transformer3DModel.axes_dims_a",description:"<strong>axes_dims_a</strong> (<em>tuple[int, int, int]</em>, <em>optional</em>) — Audio RoPE dimensions. Defaults to <em>axes_dims</em>.",name:"axes_dims_a"},{anchor:"diffusers.Kandinsky6Transformer3DModel.audio_freqs_scaling",description:"<strong>audio_freqs_scaling</strong> (<em>float</em>, <em>optional</em>, defaults to 1.0) — Audio RoPE frequency scaling.",name:"audio_freqs_scaling"},{anchor:"diffusers.Kandinsky6Transformer3DModel.scale_factor",description:`<strong>scale_factor</strong> (<em>tuple[float, float, float]</em>, <em>optional</em>, defaults to <em>(1.0, 2.0, 2.0)</em>) — Per-axis | |
| <em>(t, h, w)</em> RoPE frequency scaling applied to the video positions.`,name:"scale_factor"},{anchor:"diffusers.Kandinsky6Transformer3DModel.text_token_padding",description:`<strong>text_token_padding</strong> (<em>bool</em>, <em>optional</em>, defaults to False) — Checkpoint metadata recording whether the | |
| reference model’s text sequences are padded. <em>forward</em> always accepts an optional <em>encoder_attention_mask</em> | |
| regardless of this flag; whether one is actually passed is entirely up to the caller.`,name:"text_token_padding"},{anchor:"diffusers.Kandinsky6Transformer3DModel.ca_rope",description:"<strong>ca_rope</strong> (<em>bool</em>, <em>optional</em>, defaults to False) — Whether to use cross-modal audio RoPE.",name:"ca_rope"},{anchor:"diffusers.Kandinsky6Transformer3DModel.cross_gates",description:"<strong>cross_gates</strong> (<em>bool</em>, <em>optional</em>, defaults to False) — Whether to use cross-modal residual gates.",name:"cross_gates"},{anchor:"diffusers.Kandinsky6Transformer3DModel.fix_modulation",description:"<strong>fix_modulation</strong> (<em>bool</em>, <em>optional</em>, defaults to False) — Whether to use the fixed modulation variant.",name:"fix_modulation"},{anchor:"diffusers.Kandinsky6Transformer3DModel.visual_token_type_num_embeddings",description:"<strong>visual_token_type_num_embeddings</strong> (<em>int</em>, <em>optional</em>, defaults to 0) — Number of visual token type embeddings.",name:"visual_token_type_num_embeddings"}]});var u=e(f,8),w=n(u);o(w,{name:"forward",anchor:"diffusers.Kandinsky6Transformer3DModel.forward",source:"https://github.com/huggingface/diffusers/blob/vr_14521/src/diffusers/models/transformers/transformer_kandinsky6.py#L739",parameters:[{name:"hidden_states",val:": Tensor"},{name:"encoder_hidden_states",val:": Tensor"},{name:"pooled_projections",val:": Tensor"},{name:"timestep",val:": Tensor"},{name:"audio_hidden_states",val:": Tensor | None = None"},{name:"visual_rope_pos",val:": tuple[Tensor, Tensor, Tensor] | None = None"},{name:"encoder_attention_mask",val:": Tensor | None = None"},{name:"visual_token_type_ids",val:": Tensor | None = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.Kandinsky6Transformer3DModel.forward.hidden_states",description:`<strong>hidden_states</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_frames, height, width, in_channels)</code>) — | |
| Video latents in the <code>(B, T, H, W, C)</code> layout. With <code>visual_cond=True</code>, <code>in_channels</code> is <code>2 * in_visual_dim + 1</code>: the noisy latent, the conditioning latent and a conditioning mask.`,name:"hidden_states"},{anchor:"diffusers.Kandinsky6Transformer3DModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length, in_text_dim)</code>) — | |
| Text token embeddings, shared by the video and audio text branches.`,name:"encoder_hidden_states"},{anchor:"diffusers.Kandinsky6Transformer3DModel.forward.pooled_projections",description:`<strong>pooled_projections</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, in_text_dim2)</code>) — | |
| Pooled text embedding added to the timestep embedding of both branches.`,name:"pooled_projections"},{anchor:"diffusers.Kandinsky6Transformer3DModel.forward.timestep",description:`<strong>timestep</strong> (<code>torch.Tensor</code> of shape <code>(batch_size,)</code>) — | |
| Diffusion timestep on the <code>[0, num_train_timesteps]</code> scale, shared by both modalities.`,name:"timestep"},{anchor:"diffusers.Kandinsky6Transformer3DModel.forward.audio_hidden_states",description:`<strong>audio_hidden_states</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, audio_length, in_audio_dim)</code>, <em>optional</em>) — | |
| Audio latents. When omitted the fused blocks run their video path only.`,name:"audio_hidden_states"},{anchor:"diffusers.Kandinsky6Transformer3DModel.forward.visual_rope_pos",description:`<strong>visual_rope_pos</strong> (<code>tuple[torch.Tensor, torch.Tensor, torch.Tensor]</code>, <em>optional</em>) — | |
| Per-axis <code>(t, h, w)</code> rotary position indices of the patchified video tokens. Defaults to <code>arange</code> over | |
| each axis. The pipeline passes an explicit temporal index when it appends a reference frame that reuses | |
| position <code>0</code>.`,name:"visual_rope_pos"},{anchor:"diffusers.Kandinsky6Transformer3DModel.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) — | |
| Boolean padding mask for <code>encoder_hidden_states</code>. Pass <code>None</code> when no prompt is padded.`,name:"encoder_attention_mask"},{anchor:"diffusers.Kandinsky6Transformer3DModel.forward.visual_token_type_ids",description:`<strong>visual_token_type_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_frames)</code>, <em>optional</em>) — | |
| Per-frame token type ids, embedded through <code>visual_token_type_embeddings</code>. Requires | |
| <code>visual_token_type_num_embeddings > 0</code>.`,name:"visual_token_type_ids"},{anchor:"diffusers.Kandinsky6Transformer3DModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, defaults to <code>True</code>) — | |
| Whether to return a <code>Kandinsky6TransformerOutput</code> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>The predicted video velocity in the <code>(B, T, H, W, out_visual_dim)</code> layout and, when | |
| <code>audio_hidden_states</code> was given, the predicted audio velocity of shape <code>(B, audio_length, out_audio_dim)</code>.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>Kandinsky6TransformerOutput</code> or <code>tuple</code></p> | |
| `}),s(u),s(t);var p=e(t,2);i(p,{title:"Kandinsky6SRTransformer3DModel",local:"diffusers.Kandinsky6SRTransformer3DModel",headingTag:"h2"});var _=e(p,4);b(_,{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwS2FuZGluc2t5NlNSVHJhbnNmb3JtZXIzRE1vZGVsJTBBJTBBdHJhbnNmb3JtZXIlMjAlM0QlMjBLYW5kaW5za3k2U1JUcmFuc2Zvcm1lcjNETW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmthbmRpbnNreWxhYiUyRkthbmRpbnNreS02LjAtVlNSLWRpc3RpbGxlZDJzdGVwcy01cy1EaWZmdXNlcnMlMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJ0cmFuc2Zvcm1lciUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMEEpJTBBJTIzJTIwVGhlJTIwdHJhbnNmb3JtZXIlMjBhbHdheXMlMjBydW5zJTIwTkFCTEElMjBzcGFyc2UlMjBhdHRlbnRpb24lMjAoJTYwbmFibGFfdGhyZXNob2xkJTYwJTJDJTIwMC44JTIwYnklMjBkZWZhdWx0KSUyMG9uJTIwdGhlJTIwJTYwZmxleCU2MCUyMGJhY2tlbmQuJTBBJTIzJTIwQ29tcGlsZSUyMGl0JTJDJTIwb3RoZXJ3aXNlJTIwZmxleCUyMGZhbGxzJTIwYmFjayUyMHRvJTIwYW4lMjBlYWdlciUyMGltcGxlbWVudGF0aW9uJTIwdGhhdCUyMG5lZWRzJTIwZmFyJTIwbW9yZSUyMG1lbW9yeSUyMGF0JTIwdmlkZW8lMjByZXNvbHV0aW9ucy4lMEF0cmFuc2Zvcm1lci5jb21waWxlX3JlcGVhdGVkX2Jsb2NrcyhmdWxsZ3JhcGglM0RUcnVlKQ==",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> Kandinsky6SRTransformer3DModel | |
| transformer = Kandinsky6SRTransformer3DModel.from_pretrained( | |
| <span class="hljs-string">"kandinskylab/Kandinsky-6.0-VSR-distilled2steps-5s-Diffusers"</span>, subfolder=<span class="hljs-string">"transformer"</span>, torch_dtype=torch.bfloat16 | |
| ) | |
| <span class="hljs-comment"># The transformer always runs NABLA sparse attention (\`nabla_threshold\`, 0.8 by default) on the \`flex\` backend.</span> | |
| <span class="hljs-comment"># Compile it, otherwise flex falls back to an eager implementation that needs far more memory at video resolutions.</span> | |
| transformer.compile_repeated_blocks(fullgraph=<span class="hljs-literal">True</span>)`,lang:"python",wrap:!1});var a=e(_,2),h=n(a);o(h,{name:"class diffusers.Kandinsky6SRTransformer3DModel",anchor:"diffusers.Kandinsky6SRTransformer3DModel",source:"https://github.com/huggingface/diffusers/blob/vr_14521/src/diffusers/models/transformers/transformer_kandinsky6_sr.py#L412",parameters:[{name:"in_visual_dim",val:": int = 64"},{name:"out_visual_dim",val:": int = 640"},{name:"time_dim",val:": int = 512"},{name:"patch_size",val:": tuple[int, int, int] = (1, 1, 1)"},{name:"model_dim",val:": int = 1792"},{name:"ff_dim",val:": int = 7168"},{name:"num_visual_blocks",val:": int = 32"},{name:"axes_dims",val:": tuple[int, int, int] = (16, 24, 24)"},{name:"scale_factor",val:": tuple[float, float, float] = (1.0, 2.0, 2.0)"},{name:"nabla_threshold",val:": float = 0.8"},{name:"nabla_window",val:": tuple[int, int, int] = (11, 7, 7)"},{name:"tile_sizes",val:": tuple[tuple[int, int], ...] = ((512, 512), (512, 768), (768, 512))"}],parametersDescription:[{anchor:"diffusers.Kandinsky6SRTransformer3DModel.in_visual_dim",description:`<strong>in_visual_dim</strong> (<code>int</code>, defaults to <code>64</code>) — | |
| Number of latent channels of the K-VAE.`,name:"in_visual_dim"},{anchor:"diffusers.Kandinsky6SRTransformer3DModel.out_visual_dim",description:`<strong>out_visual_dim</strong> (<code>int</code>, defaults to <code>640</code>) — | |
| Number of output channels.`,name:"out_visual_dim"},{anchor:"diffusers.Kandinsky6SRTransformer3DModel.time_dim",description:`<strong>time_dim</strong> (<code>int</code>, defaults to <code>512</code>) — | |
| Dimension of the timestep embedding.`,name:"time_dim"},{anchor:"diffusers.Kandinsky6SRTransformer3DModel.patch_size",description:`<strong>patch_size</strong> (<code>tuple[int, int, int]</code>, defaults to <code>(1, 1, 1)</code>) — | |
| Patch size as <code>(temporal, height, width)</code>.`,name:"patch_size"},{anchor:"diffusers.Kandinsky6SRTransformer3DModel.model_dim",description:`<strong>model_dim</strong> (<code>int</code>, defaults to <code>1792</code>) — | |
| Hidden dimension of the transformer.`,name:"model_dim"},{anchor:"diffusers.Kandinsky6SRTransformer3DModel.ff_dim",description:`<strong>ff_dim</strong> (<code>int</code>, defaults to <code>7168</code>) — | |
| Inner dimension of the feed-forward networks.`,name:"ff_dim"},{anchor:"diffusers.Kandinsky6SRTransformer3DModel.num_visual_blocks",description:`<strong>num_visual_blocks</strong> (<code>int</code>, defaults to <code>32</code>) — | |
| Number of transformer blocks.`,name:"num_visual_blocks"},{anchor:"diffusers.Kandinsky6SRTransformer3DModel.axes_dims",description:`<strong>axes_dims</strong> (<code>tuple[int, int, int]</code>, defaults to <code>(16, 24, 24)</code>) — | |
| RoPE dimensions per <code>(t, h, w)</code> axis; their sum is the attention head dimension.`,name:"axes_dims"},{anchor:"diffusers.Kandinsky6SRTransformer3DModel.scale_factor",description:`<strong>scale_factor</strong> (<code>tuple[float, float, float]</code>, defaults to <code>(1.0, 2.0, 2.0)</code>) — | |
| Per-axis RoPE frequency scaling applied to the token positions.`,name:"scale_factor"},{anchor:"diffusers.Kandinsky6SRTransformer3DModel.nabla_threshold",description:`<strong>nabla_threshold</strong> (<code>float</code>, defaults to <code>0.8</code>) — | |
| Cumulative-attention threshold of the NABLA block selection.`,name:"nabla_threshold"},{anchor:"diffusers.Kandinsky6SRTransformer3DModel.nabla_window",description:`<strong>nabla_window</strong> (<code>tuple[int, int, int]</code>, defaults to <code>(11, 7, 7)</code>) — | |
| Odd <code>(t, h, w)</code> extents of the sliding-tile prior that every 8x8 token block always attends to.`,name:"nabla_window"},{anchor:"diffusers.Kandinsky6SRTransformer3DModel.tile_sizes",description:`<strong>tile_sizes</strong> (<code>tuple[tuple[int, int], ...]</code>, defaults to <code>((512, 512), (512, 768), (768, 512))</code>) — | |
| Pixel <code>(height, width)</code> sizes of the video tiles the model was trained on. <a href="/docs/diffusers/pr_14521/en/api/pipelines/kandinsky6#diffusers.Kandinsky6SRPipeline">Kandinsky6SRPipeline</a> refines | |
| every tile at the size whose aspect ratio is closest to the input video’s.`,name:"tile_sizes"}]});var g=e(h,6),D=n(g);o(D,{name:"forward",anchor:"diffusers.Kandinsky6SRTransformer3DModel.forward",source:"https://github.com/huggingface/diffusers/blob/vr_14521/src/diffusers/models/transformers/transformer_kandinsky6_sr.py#L496",parameters:[{name:"hidden_states",val:": Tensor"},{name:"timestep",val:": Tensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.Kandinsky6SRTransformer3DModel.forward.hidden_states",description:`<strong>hidden_states</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_frames, height, width, 2 * in_visual_dim + 1)</code>) — | |
| Latent tiles in the <code>(B, T, H, W, C)</code> layout: the noisy latent, the anchor latent and the anchor mask | |
| concatenated along the channel axis.`,name:"hidden_states"},{anchor:"diffusers.Kandinsky6SRTransformer3DModel.forward.timestep",description:`<strong>timestep</strong> (<code>torch.Tensor</code> of shape <code>(batch_size,)</code>) — | |
| Diffusion timestep on the <code>[0, num_train_timesteps]</code> scale.`,name:"timestep"},{anchor:"diffusers.Kandinsky6SRTransformer3DModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, defaults to <code>True</code>) — | |
| Whether to return a <a href="/docs/diffusers/pr_14521/en/api/models/hunyuan_video15_transformer_3d#diffusers.models.modeling_outputs.Transformer2DModelOutput">Transformer2DModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>The prediction of shape <code>(batch_size, num_frames, height, width, out_visual_dim)</code>.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><a | |
| href="/docs/diffusers/pr_14521/en/api/models/hunyuan_video15_transformer_3d#diffusers.models.modeling_outputs.Transformer2DModelOutput" | |
| >Transformer2DModelOutput</a> or <code>tuple</code></p> | |
| `}),s(g),s(a);var K=e(a,2);Z(K,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/kandinsky6_transformer.md"}),j(2),T(x,d),G()}export{C as component}; | |
Xet Storage Details
- Size:
- 25 kB
- Xet hash:
- e761bbae9dcdb007f460a4432bd13fa54f5453afa996ed1d806c856ebf9f2379
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.