Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -86,12 +86,13 @@ Please provide the rewritten instruction in a clean `json` format as:
|
|
| 86 |
dtype = torch.bfloat16
|
| 87 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 88 |
pipe = QwenImageEditPipeline.from_pretrained("Qwen/Qwen-Image-Edit", torch_dtype=dtype).to(device)
|
|
|
|
| 89 |
pipe.load_lora_weights(
|
| 90 |
-
"lightx2v/Qwen-Image-
|
| 91 |
-
weight_name="Qwen-Image-Edit-Lightning-8steps-V1.1.safetensors"
|
| 92 |
)
|
| 93 |
pipe.fuse_lora()
|
| 94 |
|
|
|
|
| 95 |
@spaces.GPU(duration=60)
|
| 96 |
def infer(
|
| 97 |
image,
|
|
|
|
| 86 |
dtype = torch.bfloat16
|
| 87 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 88 |
pipe = QwenImageEditPipeline.from_pretrained("Qwen/Qwen-Image-Edit", torch_dtype=dtype).to(device)
|
| 89 |
+
# Load LoRA weights for acceleration
|
| 90 |
pipe.load_lora_weights(
|
| 91 |
+
"lightx2v/Qwen-Image-Lightning", weight_name="Qwen-Image-Lightning-8steps-V1.1.safetensors"
|
|
|
|
| 92 |
)
|
| 93 |
pipe.fuse_lora()
|
| 94 |
|
| 95 |
+
|
| 96 |
@spaces.GPU(duration=60)
|
| 97 |
def infer(
|
| 98 |
image,
|