Repository navigation
FastGen v0.2.0 - #45
Conversation
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.
[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. FindingsSummaryFastGen v2 adds training methods, image and audio-video networks, and shared causal sampling. It also rebuilds module preparation, guidance, precision settings, and checkpoint support.
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]
Reviews (1) · Last reviewed commit: "FastGen v2" · Reviewed by Greptile |
| iio.imwrite( | ||
| buf, | ||
| arr, | ||
| extension=".mp4", | ||
| fps=target_fps, |
There was a problem hiding this comment.
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.
| else: | ||
| snippet = (result.raw or "<empty>")[:400].replace("\n", " | ") | ||
| logger.warning(f"vlm: rank {entry.rank} parse fail — raw={snippet!r}") |
There was a problem hiding this comment.
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.
Methods
Networks
Core refactoring
Tooling