linoyts HF Staff commited on
Commit
1944f1a
·
verified ·
1 Parent(s): 2be9625

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -183,9 +183,12 @@ state_dict = load_file(weights_path)
183
  pipe.transformer.load_state_dict(state_dict, strict=False)
184
  pipe.load_lora_weights(
185
  "lovis93/next-scene-qwen-image-lora-2509",
186
- weight_name="next-scene_lora-v2-3000.safetensors"
187
  )
188
- pipe.fuse_lora()
 
 
 
189
 
190
  # Apply the same optimizations from the first version
191
  pipe.transformer.__class__ = QwenImageTransformer2DModel
 
183
  pipe.transformer.load_state_dict(state_dict, strict=False)
184
  pipe.load_lora_weights(
185
  "lovis93/next-scene-qwen-image-lora-2509",
186
+ weight_name="next-scene_lora-v2-3000.safetensors", adapter_name="next-scene"
187
  )
188
+ pipe.set_adapters(["next-scene"], adapter_weights=[1.])
189
+ pipe.fuse_lora(adapter_names=["next-scene"], lora_scale=1.)
190
+ pipe.unload_lora_weights()
191
+
192
 
193
  # Apply the same optimizations from the first version
194
  pipe.transformer.__class__ = QwenImageTransformer2DModel