diff --git a/docs/inference/support_matrix.md b/docs/inference/support_matrix.md index 7017e11a8..d0eec1564 100644 --- a/docs/inference/support_matrix.md +++ b/docs/inference/support_matrix.md @@ -58,8 +58,8 @@ pipeline initialization and sampling. | FastWan2.1 T2V 1.3B | `FastVideo/FastWan2.1-T2V-1.3B-Diffusers` | 480P | ⭕ | ⭕ | ⭕ | ✅ | ⭕ | | FastWan2.2 TI2V 5B Full Attn* | `FastVideo/FastWan2.2-TI2V-5B-FullAttn-Diffusers` | 720P | ⭕ | ⭕ | ⭕ | ✅ | ⭕ | | Wan2.2 TI2V 5B | `Wan-AI/Wan2.2-TI2V-5B-Diffusers` | 720P | ⭕ | ⭕ | ✅ | ⭕ | ⭕ | -| DreamX-World 5B Cam | `GD-ML/DreamX-World-5B-Cam` | 480P | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | -| DreamX-World 5B AR | `GD-ML/DreamX-World-5B` | 704px1280p | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | +| DreamX-World 5B Cam | `FastVideo/DreamX-World-5B-Cam-Diffusers` | 480P | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | +| DreamX-World 5B AR | `FastVideo/DreamX-World-5B-Diffusers` | 704px1280p | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | | Lucy Edit Dev 5B*** | `decart-ai/Lucy-Edit-Dev` | 480P | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | | Wan2.2 T2V A14B | `Wan-AI/Wan2.2-T2V-A14B-Diffusers` | 480P
720P | ❌ | ❌ | ✅ | ⭕ | ⭕ | | Wan2.2 I2V A14B | `Wan-AI/Wan2.2-I2V-A14B-Diffusers` | 480P
720P | ❌ | ❌ | ✅ | ⭕ | ⭕ | diff --git a/examples/inference/basic/basic_dreamx_world.py b/examples/inference/basic/basic_dreamx_world.py index 990d8ca97..361fbf37c 100644 --- a/examples/inference/basic/basic_dreamx_world.py +++ b/examples/inference/basic/basic_dreamx_world.py @@ -1,3 +1,10 @@ +"""DreamX-World-5B-Cam camera-controlled video generation. + +Uses the pre-converted Diffusers checkpoint FastVideo/DreamX-World-5B-Cam-Diffusers. +To convert the raw GD-ML/DreamX-World-5B-Cam checkpoint yourself, see +scripts/checkpoint_conversion/dreamx_world_to_diffusers.py. +""" + import os from fastvideo import VideoGenerator @@ -15,7 +22,7 @@ def _env_float(name: str, default: float) -> float: def main(): - model_name = os.getenv("DREAMX_WORLD_MODEL_DIR", "GD-ML/DreamX-World-5B-Cam") + model_name = os.getenv("DREAMX_WORLD_MODEL_DIR", "FastVideo/DreamX-World-5B-Cam-Diffusers") generator = VideoGenerator.from_pretrained( model_name, num_gpus=1, @@ -24,7 +31,6 @@ def main(): vae_cpu_offload=True, text_encoder_cpu_offload=True, pin_cpu_memory=False, - override_pipeline_cls_name="DreamXWorldPipeline", ) prompt = os.getenv( diff --git a/fastvideo/registry.py b/fastvideo/registry.py index e13bb2209..e2f289b79 100644 --- a/fastvideo/registry.py +++ b/fastvideo/registry.py @@ -780,13 +780,15 @@ def _register_configs() -> None: pipeline_config_cls=DreamXWorld5BCamPipelineConfig, workload_types=(WorkloadType.I2V, ), hf_model_paths=[ - "GD-ML/DreamX-World-5B-Cam", + "FastVideo/DreamX-World-5B-Cam-Diffusers", ], model_detectors=[ - # Mutually exclusive with the AR detector below: Cam requires an - # explicit "cam" marker so hyphenated AR local paths (e.g. - # /ckpts/dreamx-world-5b-converted) don't first-match here — - # detector resolution is first-match in registration order. + # Pattern also catches the raw GD-ML/DreamX-World-5B-Cam id and + # local converted dirs. Mutually exclusive with the AR detector + # below: Cam requires an explicit "cam" marker so hyphenated AR + # local paths (e.g. /ckpts/dreamx-world-5b-converted) don't + # first-match here — detector resolution is first-match in + # registration order. lambda path: ("dreamx-world" in path.lower() and "cam" in path.lower()) or "dreamxworldpipeline" in path.lower() ], @@ -798,7 +800,7 @@ def _register_configs() -> None: pipeline_config_cls=DreamXWorld5BARPipelineConfig, workload_types=(WorkloadType.I2V, ), hf_model_paths=[ - "GD-ML/DreamX-World-5B", + "FastVideo/DreamX-World-5B-Diffusers", ], model_detectors=[ lambda path: diff --git a/tests/local_tests/dreamx_world/test_dreamx_world_ar_transformer_parity.py b/tests/local_tests/dreamx_world/test_dreamx_world_ar_transformer_parity.py index 70c011733..312c7832f 100644 --- a/tests/local_tests/dreamx_world/test_dreamx_world_ar_transformer_parity.py +++ b/tests/local_tests/dreamx_world/test_dreamx_world_ar_transformer_parity.py @@ -26,6 +26,7 @@ from fastvideo.models.loader.weight_utils import resolve_safetensors_files, safe REPO_ROOT = Path(__file__).resolve().parents[3] OFFICIAL_REF_DIR = Path(os.getenv("DREAMX_WORLD_OFFICIAL_REF_DIR", REPO_ROOT / "DreamX-World")) CONVERTED_AR_DIR = Path(os.getenv("DREAMX_WORLD_AR_CONVERTED_DIR", "/tmp/converted_dreamx_world_ar")) +CONVERTED_AR_HF_REPO = "FastVideo/DreamX-World-5B-Diffusers" PARITY_SCOPE = "both" @@ -161,7 +162,10 @@ def test_dreamx_world_ar_5b_config_matches_official_shape(): def test_dreamx_world_ar_converted_5b_transformer_strict_loads(): transformer_dir = CONVERTED_AR_DIR / "transformer" if not transformer_dir.exists(): - pytest.skip(f"Converted AR transformer missing: {transformer_dir}") + # No local conversion: pull the published Diffusers transformer from the hub. + from huggingface_hub import snapshot_download + + transformer_dir = Path(snapshot_download(CONVERTED_AR_HF_REPO, allow_patterns=["transformer/*"])) / "transformer" with torch.device("meta"): model = DreamXWorldARTransformer3DModel(make_dreamx_world_5b_ar_dit_config(), {}) incompatible = load_model_from_full_model_state_dict( diff --git a/tests/local_tests/dreamx_world/test_dreamx_world_transformer_parity.py b/tests/local_tests/dreamx_world/test_dreamx_world_transformer_parity.py index fff655317..b4f9e3e8a 100644 --- a/tests/local_tests/dreamx_world/test_dreamx_world_transformer_parity.py +++ b/tests/local_tests/dreamx_world/test_dreamx_world_transformer_parity.py @@ -38,6 +38,7 @@ OFFICIAL_REF_DIR = Path(os.getenv("DREAMX_WORLD_OFFICIAL_REF_DIR", REPO_ROOT / " LOCAL_WEIGHTS_DIR = Path(os.getenv("DREAMX_WORLD_LOCAL_WEIGHTS_DIR", REPO_ROOT / "official_weights" / "dreamx_world")) WAN_BASE_DIR = Path(os.getenv("DREAMX_WORLD_WAN_BASE_DIR", REPO_ROOT / "official_weights" / "Wan2.2-TI2V-5B")) CONVERTED_WEIGHTS_DIR = Path(os.getenv("DREAMX_WORLD_CONVERTED_WEIGHTS_DIR", REPO_ROOT / "converted_weights" / "dreamx_world")) +CONVERTED_HF_REPO = "FastVideo/DreamX-World-5B-Cam-Diffusers" PARITY_SCOPE = "both" @@ -130,7 +131,10 @@ def _load_fastvideo_transformer(device: torch.device, dtype: torch.dtype) -> tor def _load_fastvideo_transformer_strict(device: torch.device, dtype: torch.dtype) -> torch.nn.Module: transformer_dir = CONVERTED_WEIGHTS_DIR / "transformer" if not transformer_dir.exists(): - pytest.skip(f"Converted DreamX transformer missing: {transformer_dir}") + # No local conversion: pull the published Diffusers transformer from the hub. + from huggingface_hub import snapshot_download + + transformer_dir = Path(snapshot_download(CONVERTED_HF_REPO, allow_patterns=["transformer/*"])) / "transformer" safetensors_files = resolve_safetensors_files(str(transformer_dir)) config = make_dreamx_world_5b_cam_dit_config() import fastvideo.models.dits.dreamx_world as fastvideo_dreamx diff --git a/tests/local_tests/pipelines/test_dreamx_world_pipeline_parity.py b/tests/local_tests/pipelines/test_dreamx_world_pipeline_parity.py index ce839132d..d2ed7d8ee 100644 --- a/tests/local_tests/pipelines/test_dreamx_world_pipeline_parity.py +++ b/tests/local_tests/pipelines/test_dreamx_world_pipeline_parity.py @@ -20,7 +20,8 @@ from torch.testing import assert_close os.environ.setdefault("FASTVIDEO_ATTENTION_BACKEND", "TORCH_SDPA") -MODEL_DIR = Path(os.getenv("DREAMX_WORLD_MODEL_DIR", "converted_weights/dreamx_world")) +# Local converted dir or HF repo id; the loader downloads hub ids itself. +MODEL_DIR = os.getenv("DREAMX_WORLD_MODEL_DIR", "FastVideo/DreamX-World-5B-Cam-Diffusers") pytestmark = pytest.mark.skipif( @@ -68,9 +69,6 @@ def _close_generator(generator: Any) -> None: def test_dreamx_world_one_step_pipeline_latent_matches_manual_pass() -> None: - if not MODEL_DIR.exists(): - pytest.fail(f"DreamX-World converted model directory is missing: {MODEL_DIR}") - from fastvideo import VideoGenerator common_kwargs = dict( prompt="a quiet road through a futuristic city at sunrise", @@ -88,7 +86,7 @@ def test_dreamx_world_one_step_pipeline_latent_matches_manual_pass() -> None: ) generator = VideoGenerator.from_pretrained( - str(MODEL_DIR), + MODEL_DIR, num_gpus=1, use_fsdp_inference=False, dit_cpu_offload=False, diff --git a/tests/local_tests/pipelines/test_dreamx_world_pipeline_smoke.py b/tests/local_tests/pipelines/test_dreamx_world_pipeline_smoke.py index bd956bdcd..92b2a9f7b 100644 --- a/tests/local_tests/pipelines/test_dreamx_world_pipeline_smoke.py +++ b/tests/local_tests/pipelines/test_dreamx_world_pipeline_smoke.py @@ -13,7 +13,8 @@ from PIL import Image, ImageDraw os.environ.setdefault("FASTVIDEO_ATTENTION_BACKEND", "TORCH_SDPA") -MODEL_DIR = Path(os.getenv("DREAMX_WORLD_MODEL_DIR", "converted_weights/dreamx_world")) +# Local converted dir or HF repo id; the loader downloads hub ids itself. +MODEL_DIR = os.getenv("DREAMX_WORLD_MODEL_DIR", "FastVideo/DreamX-World-5B-Cam-Diffusers") @@ -113,16 +114,13 @@ def test_dreamx_world_camera_stage_writes_y_camera() -> None: def test_dreamx_world_pipeline_load_generate_latent_smoke(tmp_path: Path) -> None: - if not MODEL_DIR.exists(): - pytest.fail(f"DreamX-World converted model directory is missing: {MODEL_DIR}") - from fastvideo import VideoGenerator image_path = tmp_path / "dreamx_world_smoke_input.png" _write_smoke_image(image_path) generator = VideoGenerator.from_pretrained( - str(MODEL_DIR), + MODEL_DIR, num_gpus=1, use_fsdp_inference=False, dit_cpu_offload=False,