Fix base model detection for Wan LoRA adapters

For Wan LoRA adapters, skip reading base_model from stored config
(which may have incorrect values like T2V instead of I2V).
Instead, always infer from LoRA ID by checking for 'i2v' in the name.

This ensures wan2_2_i2v_general_nsfw_lora uses the correct
Wan-AI/Wan2.2-I2V-A14B-Diffusers base model instead of the
incorrect Wan-AI/Wan2.2-T2V-A14B-Diffusers.
parent e668b610
...@@ -8654,7 +8654,14 @@ def main(args): ...@@ -8654,7 +8654,14 @@ def main(args):
if is_lora: if is_lora:
lora_id = m_info["id"] lora_id = m_info["id"]
base_model_id = m_info.get("base_model") # For Wan LoRA adapters, don't use stored base_model as it may be incorrect
# Instead, always infer from LoRA ID (check for i2v vs t2v)
lora_id_lower = lora_id.lower()
if "wan" in lora_id_lower:
# Skip reading from config - infer from LoRA ID instead
base_model_id = None
else:
base_model_id = m_info.get("base_model")
# Allow manual override via --base-model # Allow manual override via --base-model
if args.base_model: if args.base_model:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment