Alexander Bagus commited on
Commit
ad4cf92
·
1 Parent(s): c9fb392
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -58,6 +58,17 @@ pipe_lora = QwenImagePipeline.from_pretrained(
58
  vram_limit=torch.cuda.mem_get_info("cuda")[1] / (1024 ** 3) - 0.5,
59
  )
60
 
 
 
 
 
 
 
 
 
 
 
 
61
  pipe_imagen = QwenImagePipeline.from_pretrained(
62
  torch_dtype=torch.bfloat16,
63
  device="cuda",
 
58
  vram_limit=torch.cuda.mem_get_info("cuda")[1] / (1024 ** 3) - 0.5,
59
  )
60
 
61
+ vram_config = {
62
+ "offload_dtype": "disk",
63
+ "offload_device": "disk",
64
+ "onload_dtype": torch.bfloat16,
65
+ "onload_device": "cpu",
66
+ "preparing_dtype": torch.bfloat16,
67
+ "preparing_device": "cuda",
68
+ "computation_dtype": torch.bfloat16,
69
+ "computation_device": "cuda",
70
+ }
71
+
72
  pipe_imagen = QwenImagePipeline.from_pretrained(
73
  torch_dtype=torch.bfloat16,
74
  device="cuda",