|
| 1 | +# Helios Local Verification |
| 2 | + |
| 3 | +Reviewer-facing setup and verification record for the native |
| 4 | +`BestWishYsh/Helios-Distilled` text-to-video port. These tests compare FastVideo |
| 5 | +against the exact Diffusers Helios implementation and require local assets for |
| 6 | +non-skip author verification. |
| 7 | + |
| 8 | +Port state and resolved issues live in |
| 9 | +`tests/local_tests/helios/PORT_STATUS.md`. |
| 10 | + |
| 11 | +## Pinned Sources |
| 12 | + |
| 13 | +| Field | Value | |
| 14 | +| --- | --- | |
| 15 | +| Model family | `helios` | |
| 16 | +| Public scope | Helios-Distilled T2V | |
| 17 | +| Architecture source | `PKU-YuanGroup/Helios@8f2a2faab3298c8a7630a2c73aea37c01b5bab01` | |
| 18 | +| Executable parity reference | Diffusers `0.39.0` `HeliosPyramidPipeline` | |
| 19 | +| HF checkpoint | `BestWishYsh/Helios-Distilled` | |
| 20 | +| HF revision | `1999182614cb08d3bdcc46b9827504af2914b87b` | |
| 21 | +| Local assets | `official_weights/helios` | |
| 22 | +| Source layout | Diffusers; no conversion required | |
| 23 | +| Integration base | `upstream/main@b2062556a9bc100a4edd7636cda47078efc41389` | |
| 24 | + |
| 25 | +The official T2V model index loads one `transformer`; `transformer_ode` is not |
| 26 | +declared or used and remains outside this PR. Base/Mid, training, ODE, I2V, and |
| 27 | +other variants are not supported by this first pipeline. |
| 28 | + |
| 29 | +## Environment And Assets |
| 30 | + |
| 31 | +Run from the FastVideo repository root: |
| 32 | + |
| 33 | +```bash |
| 34 | +uv venv --python 3.12 --seed |
| 35 | +UV_TORCH_BACKEND=cu130 uv pip install -e ".[dev]" |
| 36 | + |
| 37 | +.venv/bin/python -c "from diffusers import AutoencoderKLWan, HeliosDMDScheduler, HeliosPyramidPipeline, HeliosTransformer3DModel; from transformers import AutoTokenizer, UMT5EncoderModel; print('imports ok')" |
| 38 | +``` |
| 39 | + |
| 40 | +The verified environment uses Python 3.12.3, PyTorch `2.12.0+cu130`, CUDA 13, |
| 41 | +Diffusers 0.39.0, Transformers 5.13.1, and `flash-attn==2.8.1`. |
| 42 | + |
| 43 | +Download the pinned inference snapshot without the unused ODE transformer: |
| 44 | + |
| 45 | +```bash |
| 46 | +.venv/bin/python \ |
| 47 | + .agents/skills/add-model-01-prep/scripts/download_hf_weights.py \ |
| 48 | + BestWishYsh/Helios-Distilled \ |
| 49 | + official_weights/helios \ |
| 50 | + --revision 1999182614cb08d3bdcc46b9827504af2914b87b \ |
| 51 | + --ignore-pattern "transformer_ode/*" |
| 52 | +``` |
| 53 | + |
| 54 | +Use only `HF_TOKEN`, `HUGGINGFACE_HUB_TOKEN`, or `HF_API_KEY` when auth is |
| 55 | +needed. Never put a token value in this file or a command log. |
| 56 | + |
| 57 | +## Component Matrix |
| 58 | + |
| 59 | +| Component | FastVideo target | Test | Current author result | |
| 60 | +| --- | --- | --- | --- | |
| 61 | +| Transformer | `fastvideo/models/dits/helios.py` | `tests/local_tests/transformers/test_helios_transformer_parity.py` | Non-skip PASS: 1101/1101 strict load, tiny exact normal/pyramid, full BF16 normal/pyramid, SP=2, FlashAttention-vs-SDPA | |
| 62 | +| Scheduler | `fastvideo/models/schedulers/scheduling_helios_dmd.py` | `tests/local_tests/schedulers/test_helios_dmd_scheduler_parity.py` | 10 passed: registry resolution plus bit-exact three-stage/amplify/step parity | |
| 63 | +| VAE | Existing native Wan VAE | `tests/local_tests/vaes/test_helios_vae_parity.py` | Non-skip PASS; decode max/mean diff `0/0` | |
| 64 | +| UMT5 | Existing native UMT5 | `tests/local_tests/encoders/test_helios_umt5_parity.py` | FP32 max/mean `1.25e-6/1.0e-7`; BF16 `0.0234375/0.00160135` | |
| 65 | +| Tokenizer | Production tokenizer loader | `tests/local_tests/encoders/test_helios_umt5_parity.py` | Exact IDs and attention masks | |
| 66 | +| Pipeline | `fastvideo/pipelines/basic/helios/` | `tests/local_tests/pipelines/test_helios_pipeline_parity.py` | Non-skip final-latent PASS | |
| 67 | + |
| 68 | +## Mandatory Commands |
| 69 | + |
| 70 | +Run component gates before pipeline gates: |
| 71 | + |
| 72 | +```bash |
| 73 | +PYTHONPATH="$PWD" .venv/bin/pytest \ |
| 74 | + tests/local_tests/transformers/test_helios_transformer_parity.py -v -s |
| 75 | + |
| 76 | +PYTHONPATH="$PWD" .venv/bin/pytest \ |
| 77 | + tests/local_tests/vaes/test_helios_vae_parity.py -v -s |
| 78 | + |
| 79 | +PYTHONPATH="$PWD" .venv/bin/pytest \ |
| 80 | + tests/local_tests/encoders/test_helios_umt5_parity.py -v -s |
| 81 | + |
| 82 | +PYTHONPATH="$PWD" .venv/bin/pytest \ |
| 83 | + tests/local_tests/schedulers/test_helios_dmd_scheduler_parity.py -v -s |
| 84 | + |
| 85 | +PYTHONPATH="$PWD" .venv/bin/pytest \ |
| 86 | + tests/local_tests/pipelines/test_helios_pipeline_math.py \ |
| 87 | + tests/local_tests/pipelines/test_helios_pipeline_stages.py \ |
| 88 | + tests/local_tests/pipelines/test_helios_pipeline_smoke.py -v -s |
| 89 | + |
| 90 | +DISABLE_SP=1 PYTHONPATH="$PWD" .venv/bin/pytest \ |
| 91 | + tests/local_tests/pipelines/test_helios_pipeline_parity.py -v -s |
| 92 | +``` |
| 93 | + |
| 94 | +## End-To-End Latent Parity |
| 95 | + |
| 96 | +Both implementations load the same checkpoint from scratch and use CPU seed |
| 97 | +42, 128×192, 33 pixel frames, guidance 1.0, three `[2,2,2]` DMD stages, |
| 98 | +history `[16,2,1]`, and nine latent frames per chunk. |
| 99 | + |
| 100 | +```text |
| 101 | +shape [1, 16, 9, 16, 24] |
| 102 | +official abs mean 0.95911187 |
| 103 | +FastVideo abs mean 0.96272093 |
| 104 | +abs-mean relative drift 0.3763% |
| 105 | +max absolute diff 1.89453125 |
| 106 | +mean absolute diff 0.17001711 |
| 107 | +RMSE 0.24650776 |
| 108 | +cosine 0.97970295 |
| 109 | +result PASS |
| 110 | +``` |
| 111 | + |
| 112 | +Fixed gates are shape equality, cosine ≥0.95, abs-mean drift ≤5%, mean |
| 113 | +absolute error ≤0.30, and RMSE ≤0.40. The managed current-head run completed in |
| 114 | +130.11 seconds with one passed test and no skip. |
| 115 | + |
| 116 | +## Typed Public Example |
| 117 | + |
| 118 | +```bash |
| 119 | +HELIOS_MODEL_PATH=official_weights/helios \ |
| 120 | +HELIOS_OUTPUT_PATH=outputs/helios/helios_distilled_t2v_384x640_33f.mp4 \ |
| 121 | +PYTHONPATH="$PWD" .venv/bin/python \ |
| 122 | + examples/inference/basic/basic_helios_distilled_t2v.py |
| 123 | +``` |
| 124 | + |
| 125 | +The example uses `VideoGenerator.from_config`, `GeneratorConfig`, |
| 126 | +`GenerationRequest`, and typed sampling/output configs. The current-head run |
| 127 | +completed generation in 29.77 seconds and produced: |
| 128 | + |
| 129 | +```text |
| 130 | +codec H.264 |
| 131 | +resolution 640x384 |
| 132 | +fps 24 |
| 133 | +frames 33 |
| 134 | +duration 1.375 s |
| 135 | +SHA-256 2e6d5099715256b16b865cb300479b328b2835f9f8792cb5427a98c17eb0b038 |
| 136 | +``` |
| 137 | + |
| 138 | +Full ffmpeg decode and the non-black-frame/container quality gate pass. The |
| 139 | +contact sheet contains the requested fish, coral, and underwater scene. |
| 140 | + |
| 141 | +Run the committed local quality gate with: |
| 142 | + |
| 143 | +```bash |
| 144 | +HELIOS_QUALITY_CANDIDATE=outputs/helios/helios_distilled_t2v_384x640_33f.mp4 \ |
| 145 | + PYTHONPATH="$PWD" .venv/bin/pytest \ |
| 146 | + tests/local_tests/helios/test_helios_quality_regression.py -v -s |
| 147 | +``` |
| 148 | + |
| 149 | +Expected author result is one passed integrity test and one skipped reference |
| 150 | +comparison. A CI SSIM reference is deliberately `deferred_with_reason`: its |
| 151 | +publication requires separate upload approval, which this PR does not have. |
| 152 | + |
| 153 | +## Review Notes |
| 154 | + |
| 155 | +- Production code does not import Diffusers or Transformers model classes; |
| 156 | + those imports exist only in parity tests. The existing tokenizer boundary is |
| 157 | + reused. |
| 158 | +- The dedicated pyramid stage is required by the official nine-frame |
| 159 | + autoregressive chunks, three spatial levels, history geometry, block-noise |
| 160 | + covariance, stage-local DMD schedules, and chunk decode contract. |
| 161 | +- `use_zero_init` and `zero_steps` remain in the public call surface for |
| 162 | + Diffusers signature compatibility. The pinned Distilled model declares |
| 163 | + `is_cfg_zero_star=false`, so both official and FastVideo standard-CFG paths |
| 164 | + intentionally ignore zero-star initialization for this checkpoint. |
| 165 | +- Final decoded and latent outputs are moved to CPU inside the worker before |
| 166 | + multiprocessing return. A regression test prevents CUDA-IPC OOM from |
| 167 | + returning a GPU tensor while the 14.31B transformer remains resident. |
| 168 | +- Generated media, tensor artifacts, weights, reference clones, and private |
| 169 | + reports remain ignored and must not be committed. |
| 170 | + |
| 171 | +## Latest-Main Unit-Lane Baseline |
| 172 | + |
| 173 | +The branch is rebased onto `b2062556`, which includes the upstream CI/schema |
| 174 | +repairs that followed the earlier `6388db81` baseline. The current |
| 175 | +`.buildkite/scripts/unit_test.sh` completes with `964 passed` and 21 warnings in |
| 176 | +32.04 seconds. `pre-commit run --all-files` also passes completely. |
0 commit comments