From 0e8ce1e83271127daeb8fc7934dc7ee8d7ea81b1 Mon Sep 17 00:00:00 2001 From: Mick Date: Fri, 28 Nov 2025 18:14:00 +0800 Subject: [PATCH] [diffusion] refactor: clean useless files (#14094) --- .../sglang/multimodal_gen/configs/configs.py | 55 ------------------- .../configs/fasthunyuan_t2v.json | 48 ---------------- .../configs/wan_1.3B_t2v_pipeline.json | 41 -------------- .../configs/wan_14B_i2v_480p_pipeline.json | 49 ----------------- 4 files changed, 193 deletions(-) delete mode 100644 python/sglang/multimodal_gen/configs/configs.py delete mode 100644 python/sglang/multimodal_gen/configs/fasthunyuan_t2v.json delete mode 100644 python/sglang/multimodal_gen/configs/wan_1.3B_t2v_pipeline.json delete mode 100644 python/sglang/multimodal_gen/configs/wan_14B_i2v_480p_pipeline.json diff --git a/python/sglang/multimodal_gen/configs/configs.py b/python/sglang/multimodal_gen/configs/configs.py deleted file mode 100644 index fee722967..000000000 --- a/python/sglang/multimodal_gen/configs/configs.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copied and adapted from: https://github.com/hao-ai-lab/FastVideo - -from enum import Enum - -from sglang.multimodal_gen.runtime.utils.logging_utils import init_logger - -logger = init_logger(__name__) - - -class DatasetType(str, Enum): - """ - Enumeration for different dataset types. - """ - - HF = "hf" - MERGED = "merged" - - @classmethod - def from_string(cls, value: str) -> "DatasetType": - """Convert string to DatasetType enum.""" - try: - return cls(value.lower()) - except ValueError: - raise ValueError( - f"Invalid dataset type: {value}. Must be one of: {', '.join([m.value for m in cls])}" - ) from None - - @classmethod - def choices(cls) -> list[str]: - """Get all available choices as strings for argparse.""" - return [dataset_type.value for dataset_type in cls] - - -class VideoLoaderType(str, Enum): - """ - Enumeration for different video loaders. - """ - - TORCHCODEC = "torchcodec" - TORCHVISION = "torchvision" - - @classmethod - def from_string(cls, value: str) -> "VideoLoaderType": - """Convert string to VideoLoader enum.""" - try: - return cls(value.lower()) - except ValueError: - raise ValueError( - f"Invalid video loader: {value}. Must be one of: {', '.join([m.value for m in cls])}" - ) from None - - @classmethod - def choices(cls) -> list[str]: - """Get all available choices as strings for argparse.""" - return [video_loader.value for video_loader in cls] diff --git a/python/sglang/multimodal_gen/configs/fasthunyuan_t2v.json b/python/sglang/multimodal_gen/configs/fasthunyuan_t2v.json deleted file mode 100644 index ac570a6b2..000000000 --- a/python/sglang/multimodal_gen/configs/fasthunyuan_t2v.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "embedded_cfg_scale": 6, - "flow_shift": 17, - "dit_cpu_offload": false, - "disable_autocast": false, - "precision": "bf16", - "vae_precision": "fp32", - "vae_tiling": true, - "vae_sp": true, - "vae_config": { - "load_encoder": false, - "load_decoder": true, - "tile_sample_min_height": 256, - "tile_sample_min_width": 256, - "tile_sample_min_num_frames": 16, - "tile_sample_stride_height": 192, - "tile_sample_stride_width": 192, - "tile_sample_stride_num_frames": 12, - "blend_num_frames": 4, - "use_tiling": true, - "use_temporal_tiling": true, - "use_parallel_tiling": true - }, - "dit_config": { - "prefix": "Hunyuan", - "quant_config": null - }, - "text_encoder_precisions": [ - "fp16", - "fp16" - ], - "text_encoder_configs": [ - { - "prefix": "llama", - "quant_config": null, - "lora_config": null - }, - { - "prefix": "clip", - "quant_config": null, - "lora_config": null, - "num_hidden_layers_override": null, - "require_post_norm": null - } - ], - "mask_strategy_file_path": null, - "enable_torch_compile": false -} diff --git a/python/sglang/multimodal_gen/configs/wan_1.3B_t2v_pipeline.json b/python/sglang/multimodal_gen/configs/wan_1.3B_t2v_pipeline.json deleted file mode 100644 index 724c9cebd..000000000 --- a/python/sglang/multimodal_gen/configs/wan_1.3B_t2v_pipeline.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "embedded_cfg_scale": 6.0, - "flow_shift": 3, - "dit_cpu_offload": true, - "disable_autocast": false, - "precision": "bf16", - "vae_precision": "fp32", - "vae_tiling": false, - "vae_sp": false, - "vae_config": { - "load_encoder": false, - "load_decoder": true, - "tile_sample_min_height": 256, - "tile_sample_min_width": 256, - "tile_sample_min_num_frames": 16, - "tile_sample_stride_height": 192, - "tile_sample_stride_width": 192, - "tile_sample_stride_num_frames": 12, - "blend_num_frames": 8, - "use_tiling": false, - "use_temporal_tiling": false, - "use_parallel_tiling": false, - "use_feature_cache": true - }, - "dit_config": { - "prefix": "Wan", - "quant_config": null - }, - "text_encoder_precisions": [ - "fp32" - ], - "text_encoder_configs": [ - { - "prefix": "t5", - "quant_config": null, - "lora_config": null - } - ], - "mask_strategy_file_path": null, - "enable_torch_compile": false -} diff --git a/python/sglang/multimodal_gen/configs/wan_14B_i2v_480p_pipeline.json b/python/sglang/multimodal_gen/configs/wan_14B_i2v_480p_pipeline.json deleted file mode 100644 index 3bb7b3e2a..000000000 --- a/python/sglang/multimodal_gen/configs/wan_14B_i2v_480p_pipeline.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "embedded_cfg_scale": 6.0, - "flow_shift": 3, - "dit_cpu_offload": true, - "disable_autocast": false, - "precision": "bf16", - "vae_precision": "fp32", - "vae_tiling": false, - "vae_sp": false, - "vae_config": { - "load_encoder": true, - "load_decoder": true, - "tile_sample_min_height": 256, - "tile_sample_min_width": 256, - "tile_sample_min_num_frames": 16, - "tile_sample_stride_height": 192, - "tile_sample_stride_width": 192, - "tile_sample_stride_num_frames": 12, - "blend_num_frames": 8, - "use_tiling": false, - "use_temporal_tiling": false, - "use_parallel_tiling": false, - "use_feature_cache": true - }, - "dit_config": { - "prefix": "Wan", - "quant_config": null - }, - "text_encoder_precisions": [ - "fp32" - ], - "text_encoder_configs": [ - { - "prefix": "t5", - "quant_config": null, - "lora_config": null - } - ], - "mask_strategy_file_path": null, - "enable_torch_compile": false, - "image_encoder_config": { - "prefix": "clip", - "quant_config": null, - "lora_config": null, - "num_hidden_layers_override": null, - "require_post_norm": null - }, - "image_encoder_precision": "fp32" -}