陈硕 commited on
Commit
65899a2
1 Parent(s): e7b0784

fix cuda bug

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -275,6 +275,7 @@ def infer(
275
  # Load LoRA weights on CPU
276
  pipe.load_lora_weights(lora_path, weight_name=weight_name, adapter_name=f"adapter_{adapter_timestamp}")
277
  pipe.fuse_lora(lora_scale=1 / lora_rank)
 
278
 
279
  if image_input is not None:
280
  image_input = Image.fromarray(image_input).resize(size=(720, 480)) # Convert to PIL
 
275
  # Load LoRA weights on CPU
276
  pipe.load_lora_weights(lora_path, weight_name=weight_name, adapter_name=f"adapter_{adapter_timestamp}")
277
  pipe.fuse_lora(lora_scale=1 / lora_rank)
278
+ pipe = pipe.to(device)
279
 
280
  if image_input is not None:
281
  image_input = Image.fromarray(image_input).resize(size=(720, 480)) # Convert to PIL