Skip to content

Commit c31a44f

Browse files
committed
Fix bugs
1 parent e7438c7 commit c31a44f

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/maxdiffusion/generate_wan.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,12 @@ def run(config, pipeline=None, filename_prefix=""):
150150
else:
151151
raise ValueError(f"Unsupported model_name for checkpointer: {model_key}")
152152
pipeline, _, _ = checkpoint_loader.load_checkpoint()
153-
pipeline_lib = get_pipeline(model_key)
154-
WanPipeline = pipeline_lib.WanPipeline
155-
pipeline = WanPipeline.from_pretrained(config)
156153

157154
# If LoRA is specified, inject layers and load weights.
158155
if hasattr(config, "lora_config") and config.lora_config and config.lora_config["lora_model_name_or_path"]:
159156
lora_loader = WanNnxLoraLoader()
160157
lora_config = config.lora_config
161-
158+
162159
if len(lora_config["lora_model_name_or_path"]) > 1:
163160
max_logging.warning("Found multiple LoRAs in config, but only loading the first one for WAN 2.2.")
164161

0 commit comments

Comments
 (0)