ComfyUI/comfy/k_diffusion
Jedrzej Kosinski a6c7397b71 Cube3D: use channels-first 1D latent (B,1,L) like Hunyuan3Dv2
Replaces the dummy trailing-dim latent with a channels-first 1D latent
(B, 1, num_tokens) and a dedicated latent_formats.Cube3D
(latent_channels=1, latent_dimensions=1). This mirrors the existing
native 3D model Hunyuan3Dv2's (B, C, L) convention and avoids
fix_empty_latent_channels truncating the token sequence (it narrows
dim=1 to latent_channels for empty latents). Requires no core sampler
changes: encode_model_conds sees a valid noise.shape[2].

- latent_formats.Cube3D added; wired into supported_models.Cube3D
- EmptyCubeLatent emits (B, 1, num_tokens)
- sample_cube takes T from x.shape[-1], returns (B, 1, T), and repeats
  conditioning to the latent batch size

Amp-Thread-ID: https://ampcode.com/threads/T-019ec361-addb-70d8-a74b-438ce8a1e096
Co-authored-by: Amp <amp@ampcode.com>
2026-06-14 23:14:17 -07:00
..
deis.py Lint all unused variables (#5989) 2024-12-12 17:59:16 -05:00
sa_solver.py Add SA-Solver sampler (#8834) 2025-07-08 16:17:06 -04:00
sampling.py Cube3D: use channels-first 1D latent (B,1,L) like Hunyuan3Dv2 2026-06-14 23:14:17 -07:00
utils.py Remove useless code. 2023-06-13 02:40:58 -04:00