LPX55 commited on
Commit
d9f9a42
·
1 Parent(s): 3544bd9

fix: type error

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -340,8 +340,9 @@ def load_and_fuse_lora(lora_name):
340
 
341
  load_and_fuse_additional_lora(lora_name)
342
 
343
- # Ahead-of-time compilation with tensor inputs (memory efficient)
344
- optimize_pipeline_(pipe, image=[torch.randn(1, 3, 1024, 1024, dtype=dtype).to(device), torch.randn(1, 3, 1024, 1024, dtype=dtype).to(device)], prompt="prompt")
 
345
 
346
  print("Model compilation complete.")
347
 
 
340
 
341
  load_and_fuse_additional_lora(lora_name)
342
 
343
+ # Ahead-of-time compilation with minimal memory footprint
344
+ # Use tiny images to minimize memory during compilation
345
+ optimize_pipeline_(pipe, image=[Image.new("RGB", (64, 64)), Image.new("RGB", (64, 64))], prompt="test")
346
 
347
  print("Model compilation complete.")
348