feat(models): add diffusers-based world-model generation backends (Wan 2.1/2.2, Cosmos, LTX-Video, MAGI-1, fal.ai)#1389
Open
Luodian wants to merge 2 commits into
Open
feat(models): add diffusers-based world-model generation backends (Wan 2.1/2.2, Cosmos, LTX-Video, MAGI-1, fal.ai)#1389Luodian wants to merge 2 commits into
Luodian wants to merge 2 commits into
Conversation
…n 2.1/2.2, Cosmos, LTX-Video, MAGI-1, fal.ai)
…nels, rank/device wiring, atomic downloads, unified seeds
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a family of diffusers/API-based world-model generation backends to lmms-eval, covering text/image-to-video and video-to-video generation.
New model backends (registered in
AVAILABLE_SIMPLE_MODELS):wan2_1_t2vWanPipeline)wan2_1_t2inum_frames=1)wan2_2wan2_2_t2vltx_videoLTXPipeline)cosmos_wmmagi1_wmgeneration_apiFAL_KEYenvA shared
DiffusersWMBaseconsolidates per-rank device selection, lazy pipeline load, the dual-expert (transformer/transformer_2) device-placement fix, the UniPCMultistepScheduler sigma-device patch, cache-path hashing, and the DP generation loop.Notes
Wan-AI/*,Lightricks/LTX-Video,nvidia/Cosmos-*,sand-ai/MAGI-1).diffusers,fal_client, andimageio/imageio-ffmpegare lazy-imported with clear, actionableImportErrormessages so the package imports fine without them.DiffusersWMBaseenforcestp_size == 1, and MAGI-1 raises a clear error for model-parallel configs (cp_size*pp_size > 1) under the stock evaluator — its sharding is per-rank data-parallel, which would desync model-parallel collectives.Review note
diffusers_wm_base.pyinlines a minimalParallelPlandataclass. #1382 (gemini SDK) separately shipsmodel_utils/parallel.pywith the full version — if that lands first, the inline copy here can switch to importing it (one-line follow-up).Review pass (2026-07-06)
Self-review follow-up commit, all backends:
[GENERATION_FAILED]sentinels; MAGI-1's fallback image pre-processing likewise returns per-request[ERROR]sentinels._rank/_world_size/device(cuda:{LOCAL_RANK} / Accelerator-based respectively) like the sibling backends, fixing pad/gather underaccelerate launch/torchrun..part+os.replace), so an interrupted download can't be resume-hit as a finished video.generate_until_agenticpath from wan2_2; unified all seed defaults on 42; stable sha1-based output ids for non-int doc_ids (washash(), PYTHONHASHSEED-dependent); actionable ImportErrors for lazy diffusers/imageio imports;_nim_submitannotation corrected.