[new-model] Add native Helios-Distilled T2V pipeline - #1670
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
There was a problem hiding this comment.
Welcome to FastVideo! Thanks for your first pull request.
How our CI works:
PRs run a two-tier CI system:
- Pre-commit — formatting (yapf), linting (ruff), type checking (mypy). Runs immediately on every PR.
- Fastcheck — core GPU tests (encoders, VAEs, transformers, kernels, unit tests). Runs automatically via Buildkite on relevant file changes (~10-15 min).
- Full Suite — integration tests, training pipelines, SSIM regression. Runs only when a reviewer adds the
readylabel.
Before your PR is reviewed:
-
pre-commit run --all-filespasses locally - You've added or updated tests for your changes
- The PR description explains what and why
If pre-commit fails, a bot comment will explain how to fix it. Fastcheck and Full Suite results appear in the Checks section below.
Useful links:
Merge Protections🔴 1 of 1 protections blocking · waiting on 👀 reviews and 🤖 CI
🔴 PR merge requirementsWaiting for
This rule is failing.
|
e7fc69b to
20814fa
Compare
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
This PR has merge conflicts with the base branch. Please rebase: git fetch origin main
git rebase origin/main
# Resolve any conflicts, then:
git push --force-with-lease |
ab0eb5b to
7c494fc
Compare
|
This PR has merge conflicts with the base branch. Please rebase: git fetch origin main
git rebase origin/main
# Resolve any conflicts, then:
git push --force-with-lease |
7c494fc to
996b996
Compare
996b996 to
099c098
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 099c09867c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| temporal_scale = fastvideo_args.pipeline_config.vae_config.arch_config.scale_factor_temporal | ||
| generated_frames = get_generated_pixel_frames(frames.shape[2], temporal_scale) | ||
| batch.output = frames[:, :, :generated_frames].detach().to(dtype=torch.float32, device="cpu") |
There was a problem hiding this comment.
Trim decoded chunks to the requested frame count
For the default preset, num_frames=240 creates eight 33-frame chunks, but this calculation retains 261 frames (get_generated_pixel_frames(264, 4)) rather than the requested 240. The same issue is more pronounced for small non-chunk-aligned requests—for example, requesting 34 frames returns 65—so saved-video duration and API metadata no longer match the caller's request; crop to batch.num_frames or reject unsupported frame counts.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 3238ae7. The chunk decoder now caps decoded output at batch.num_frames, and the regression test requests 34 frames from two chunks and asserts an exact 34-frame result.
| raise ValueError("Helios UMT5 produced NaN hidden states") | ||
| trimmed = [hidden[:length] for hidden, length in zip(hidden_states, sequence_lengths, strict=True)] | ||
| return torch.stack( | ||
| [torch.cat([hidden, hidden.new_zeros(512 - hidden.shape[0], hidden.shape[1])]) for hidden in trimmed], |
There was a problem hiding this comment.
Cap Helios text length before padding
When a caller uses the public max_sequence_length override above 512 and supplies a prompt longer than 512 tokens, hidden.shape[0] exceeds 512 and hidden.new_zeros(512 - hidden.shape[0], ...) receives a negative dimension, aborting generation. Validate or clamp the override to 512 before encoding, or truncate here before applying fixed-length padding.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 3238ae7. Helios text postprocessing now truncates valid tokens to the fixed 512-token model context before padding, with a 520-token regression test.
Purpose
Add native, runnable FastVideo support for
BestWishYsh/Helios-Distilledtext-to-video generation. This expands the original transformer-only PR with
the scheduler, stage-composed pipeline, registry/preset wiring, typed inference
example, component parity, pipeline parity, and real-video evidence requested
during review.
Supported Scope
1999182614cb08d3bdcc46b9827504af2914b87b;tokenizer loader after exact-asset parity.
Base/Mid checkpoints,
transformer_ode, training, ODE workflows, I2V, andconditioned generation are outside this PR.
Changes
HeliosConfigand nativeHeliosTransformer3DModelwith direct1101/1101 checkpoint-key compatibility;
HeliosDMDSchedulerand scheduler registry resolution;HeliosPipelineConfig,helios_distilled_t2vpreset, exact modeldetection, and
HeliosPyramidPipelineentry-class resolution;autoregressive pyramid denoising, and chunk decoding stages;
SamplingParam, typedSamplingConfig, CLI parsing, schema inventory, andForwardBatch;examples/inference/basic/basic_helios_distilled_t2v.py;tests plus reviewer setup/state records.
The worker moves final decoded/latent outputs to CPU before multiprocessing
return. This prevents CUDA-IPC allocation OOM after high-memory inference and
is protected by a regression test.
Pinned References
PKU-YuanGroup/Helios@8f2a2faab3298c8a7630a2c73aea37c01b5bab01;0.39.0;BestWishYsh/Helios-Distilled@1999182614cb08d3bdcc46b9827504af2914b87b.Test Results
Components
Pipeline
Public Example
Static Checks
CI Base Alignment
The branch is rebased onto
upstream/main@a159b63c. The current shared.buildkite/scripts/unit_test.shpasses all 1047 collected tests locally in28.70 seconds.
pre-commit run --all-filesalso passes.Quality Regression
Local real-video integrity and non-black-frame checks pass. Publishing a CI
SSIM reference is deferred because reference upload requires separate approval;
this PR does not claim CI SSIM passed.
Checklist
pre-commit run --all-files