Update app.py
This commit is contained in:
19
app.py
19
app.py
@@ -254,6 +254,25 @@ pipe.fuse_lora()
|
|||||||
print("lightning lora fused.")
|
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
|
# # Apply the same optimizations from the first version
|
||||||
# pipe.transformer.__class__ = QwenImageTransformer2DModel
|
# pipe.transformer.__class__ = QwenImageTransformer2DModel
|
||||||
# pipe.transformer.set_attn_processor(QwenDoubleStreamAttnProcessorFA3())
|
# pipe.transformer.set_attn_processor(QwenDoubleStreamAttnProcessorFA3())
|
||||||
|
|||||||
Reference in New Issue
Block a user