Update app.py

This commit is contained in:
sigma
2026-01-07 23:17:07 +00:00
committed by system
parent 96a5398a97
commit 6480e58412

19
app.py
View File

@@ -254,6 +254,25 @@ pipe.fuse_lora()
print("lightning lora fused.")
# 2. download and load the mcnl lora
print("downloading qwen_mcnl_v1.0...")
try:
# the file is buried deep, so we fetch it by exact path
lora_path = hf_hub_download(
repo_id="Chroma111/CivitAI-Archive-2",
filename="1851673/2105899/qwen_MCNL_v1.0.safetensors"
)
# load it into the pipeline
pipe.load_lora_weights(lora_path)
pipe.fuse_lora(lora_scale=1.0) # bake it in
print("mcnl lora loaded and fused.")
except Exception as e:
print(f"failed to load mcnl lora: {e}")
# # Apply the same optimizations from the first version
# pipe.transformer.__class__ = QwenImageTransformer2DModel
# pipe.transformer.set_attn_processor(QwenDoubleStreamAttnProcessorFA3())