Spaces:
Running
on
Zero
Running
on
Zero
陈硕
commited on
Commit
•
d55b62c
1
Parent(s):
65899a2
fix pipe bug
Browse files
app.py
CHANGED
@@ -273,9 +273,9 @@ def infer(
|
|
273 |
adapter_timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
274 |
|
275 |
# Load LoRA weights on CPU
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
|
280 |
if image_input is not None:
|
281 |
image_input = Image.fromarray(image_input).resize(size=(720, 480)) # Convert to PIL
|
|
|
273 |
adapter_timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
274 |
|
275 |
# Load LoRA weights on CPU
|
276 |
+
pipe_image.load_lora_weights(lora_path, weight_name=weight_name, adapter_name=f"adapter_{adapter_timestamp}")
|
277 |
+
pipe_image.fuse_lora(lora_scale=1 / lora_rank)
|
278 |
+
pipe_image = pipe_image.to(device)
|
279 |
|
280 |
if image_input is not None:
|
281 |
image_input = Image.fromarray(image_input).resize(size=(720, 480)) # Convert to PIL
|