Skip to content

FastGen v0.2.0 - #45

Merged
juliusberner merged 1 commit into
NVlabs:mainfrom
juliusberner:v2
Oct 28, 2026
Merged

juliusberner merged 1 commit into
NVlabs:mainfrom
juliusberner:v2

Conversation

@juliusberner

Copy link
Copy Markdown
Collaborator

Methods

  • Trajectory matching now groups the consistency-model and knowledge distillation methods (CM, ECT, sCM, TCM, MeanFlow, KD, CausalKD) and adds Align Your Flow (AYF) and Parallel Decoding Distillation (PDD).
  • Distribution matching adds Phased DMD and Causal-Forcing, and backward simulation, which trains the student on its own sampling trajectories instead of noised data.
  • Causal video methods share autoregressive student sampling with KV caching.

Networks

  • Image: FLUX.2, including image editing.
  • Video: Cosmos 3 and LingBot-world camera-controlled generation.
  • Video with audio: LTX-2, LTX-2.3, LTX-2.5, and MiniMax H3.

Core refactoring

  • Module preparation: each module and its registered submodules are prepared once (precision, train mode, gradients, then device placement or FSDP sharding) in the same order on every rank, with support for tied parameters and shared submodules through training and resume.
  • LoRA for any network via model.net_adapter: PEFT adapters, extra trainable modules, and a teacher that reuses the student's frozen base weights with adapters disabled instead of keeping a second copy.
  • Guidance: sampling and training-time teacher passes go through one predict_with_guidance path with composable CFG and network-specific terms.
  • Noise schedules: configurable training-time timestep distributions and student sampling grids.
  • Separate precision settings for model weights, optimizer state, and autocast.

Tooling

  • ComfyUI custom nodes with a Qwen-Image and LTX-2.3 example workflow.
  • A VLM judge for generated media, FlashDreams streaming inference for Self-Forcing models, FSDP checkpoint conversion, and resumable S3 downloads.
  • Experiment configs for the new methods and networks, more tests, and updated documentation.

Methods
- Trajectory matching now groups the consistency-model and knowledge
  distillation methods (CM, ECT, sCM, TCM, MeanFlow, KD, CausalKD) and
  adds Align Your Flow (AYF) and Parallel Decoding Distillation (PDD).
- Distribution matching adds Phased DMD and Causal-Forcing, and backward
  simulation, which trains the student on its own sampling trajectories
  instead of noised data.
- Causal video methods share autoregressive student sampling with
  KV caching.

Networks
- Image: FLUX.2, including image editing.
- Video: Cosmos 3 and LingBot-world camera-controlled generation.
- Video with audio: LTX-2, LTX-2.3, LTX-2.5, and MiniMax H3.

Core refactoring
- Module preparation: each module and its registered submodules are
  prepared once (precision, train mode, gradients, then device placement
  or FSDP sharding) in the same order on every rank, with support for
  tied parameters and shared submodules through training and resume.
- LoRA for any network via model.net_adapter: PEFT adapters, extra
  trainable modules, and a teacher that reuses the student's frozen base
  weights with adapters disabled instead of keeping a second copy.
- Guidance: sampling and training-time teacher passes go through one
  predict_with_guidance path with composable CFG and network-specific
  terms.
- Noise schedules: configurable training-time timestep distributions and
  student sampling grids.
- Separate precision settings for model weights, optimizer state, and
  autocast.

Tooling
- ComfyUI custom nodes with a Qwen-Image and LTX-2.3 example workflow.
- A VLM judge for generated media, FlashDreams streaming inference for
  Self-Forcing models, FSDP checkpoint conversion, and resumable S3
  downloads.
- Experiment configs for the new methods and networks, more tests, and
  updated documentation.
@juliusberner juliusberner changed the title FastGen v2 FastGen v0.2.0 Oct 28, 2026
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[High impact] The update reaches shared training, inference, data, and model-integration paths.

The PR appears safe to merge with two non-blocking fixes recommended for media judging.

Findings

  1. P2 Short clips play too slowly ▶
  2. P2 Judge request errors disappear ▶

Summary

FastGen v2 adds training methods, image and audio-video networks, and shared causal sampling. It also rebuilds module preparation, guidance, precision settings, and checkpoint support.

  • FastGen prepares model parts in a shared order for training and resume.
  • FastGen trains students with more distillation methods and sampling paths.
  • FastGen supports more image, video, camera, and audio-video models.
  • ComfyUI users can build FastGen media workflows from nodes.
  • FastGen adds shared guidance and schedules plus tools for evaluation and operations.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Experiment config] --> B[Build student and teacher]
  B --> C[Prepare registered modules once]
  C --> D[Prepare encoders and VAE]
  D --> E[Build batch conditions]
  E --> F[Training or sampling]
  F --> G[Save checkpoints]
  F --> H[Decode generated media]
  H --> I[Optional VLM judge]
Loading

Reviews (1) · Last reviewed commit: "FastGen v2" · Reviewed by Greptile

Comment on lines +378 to +382
iio.imwrite(
buf,
arr,
extension=".mp4",
fps=target_fps,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Short clips play too slowly

load_video_b64 writes the requested target_fps even when min_frames makes the decoder keep frames more often. For a one-second clip with target_fps=1 and min_frames=4, it writes four frames as a four-second video. The judge then scores slowed-down motion rather than the generated clip.

Pass the actual capture rate to the writer, and test the encoded duration when the frame floor applies.

Comment on lines +357 to +359
else:
snippet = (result.raw or "<empty>")[:400].replace("\n", " | ")
logger.warning(f"vlm: rank {entry.rank} parse fail — raw={snippet!r}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Judge request errors disappear

score_sample returns failed requests in result.error, but VLMLogger drops that field and reports the empty reply as a parse failure. A bad API key, unavailable model, or failed request therefore leaves no useful warning or table entry explaining what went wrong.

Log result.error when present, or include it in the table, so users can fix the service setup instead of debugging score parsing.

@juliusberner
juliusberner merged commit deb93e6 into NVlabs:main Oct 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants