Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -158,17 +158,11 @@ dtype = torch.bfloat16
|
|
| 158 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 159 |
|
| 160 |
pipe = QwenImageEditPlusPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509",
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
repo_type="model"
|
| 167 |
-
)
|
| 168 |
-
state_dict = load_file(weights_path)
|
| 169 |
-
|
| 170 |
-
# load next scene LoRA
|
| 171 |
-
pipe.transformer.load_state_dict(state_dict, strict=False)
|
| 172 |
pipe.load_lora_weights(
|
| 173 |
"lovis93/next-scene-qwen-image-lora-2509",
|
| 174 |
weight_name="next-scene_lora-v2-3000.safetensors", adapter_name="next-scene"
|
|
|
|
| 158 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 159 |
|
| 160 |
pipe = QwenImageEditPlusPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509",
|
| 161 |
+
transformer= QwenImageTransformer2DModel.from_pretrained("linoyts/Qwen-Image-Edit-Rapid-AIO",
|
| 162 |
+
subfolder='transformer',
|
| 163 |
+
torch_dtype=dtype,
|
| 164 |
+
device_map='cuda'),torch_dtype=dtype).to(device)
|
| 165 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
pipe.load_lora_weights(
|
| 167 |
"lovis93/next-scene-qwen-image-lora-2509",
|
| 168 |
weight_name="next-scene_lora-v2-3000.safetensors", adapter_name="next-scene"
|