CoolFace
Apppublic

hugging-apps/cinescale-high-res-video

sourceHugging Faceupdated 9d agoView on Hugging Face
0likes
App README

CineScale — Tuning-Free High-Resolution Video Generation

Demo of **CineScale** (paper, project page), which generates video above a diffusion model's training resolution without any tuning or extra weights.

The pipeline here is the authors' wan2.1-t2v-1.3B single-DiT path:

  1. 1.denoise a prompt-conditioned base latent at the backbone's native 832*480 with UniPC and block-tiled self-attention disabled;
  2. 2.bilinearly upsample that latent to the high-resolution target area;
  3. 3.enable block-tiled self-attention with Adaptively Rectified RoPE (21×12 query tiles, global-RoPE thresholds 16/9, maximum zero-based relative offsets x=79 / y=44);
  4. 4.re-noise at sigma[sample_steps - refine_steps] and finish the DPM-Solver++ trajectory at high resolution;
  5. 5.decode with spatially tiled VAE decoding (64×64 latent tiles).

Backbone weights: `Wan-AI/Wan2.1-T2V-1.3B`.

Deviations from the reference

  • —The paper demonstrates 4K. A single ZeroGPU request cannot afford that, so the Space offers a 1.5× / 2× linear ladder over the base resolution and short clips (13–21 frames at 16 fps) instead of 3840*2160.
  • —The reference runs 50 sampling steps with --round_noise_steps 40 across four GPUs. Here the whole trajectory has to fit in one reservation, so the defaults are 30 steps with the last 8 at high resolution. Both are adjustable; 50 steps is still selectable.
  • —Single process — no FSDP / Ulysses sequence parallelism, and the --input_video refinement mode is not exposed.
  • —FlashAttention-2 is replaced by torch.nn.functional.scaled_dot_product_attention. The prebuilt sm_120 FA2 wheels are built against torch ≤ 2.12 and the ZeroGPU runtime ships torch 2.13. SDPA computes the same exact attention here: every CineScale call site is batch size 1 with no padding mask, so the varlen kernel has nothing extra to do.
  • —WanT2VSingle and the wan2.1-t2v-1.3B config entry are referenced by the reference script's variant table and documented in its README but are not yet published in the upstream repo, so they are reconstructed here from the README's documented values and the published checkpoint's config.json.

Sampler, flow shift, guidance, tile geometry, rectification thresholds and VAE decode tiles all follow the reference implementation.

Example prompts come from the authors' Wan2.2/prompts.json (CineScale, Apache-2.0).

The wan/ package in this Space is vendored (and pruned to the T2V path) from Eyeline-Labs/CineScale, itself derived from the Alibaba Wan codebase — both Apache-2.0.