Manjushri commited on
Commit
600e95f
·
verified ·
1 Parent(s): f77c2d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -14,7 +14,9 @@ from openai import OpenAI
14
  device = "cuda" if torch.cuda.is_available() else "cpu"
15
 
16
  pipe = CogView4Pipeline.from_pretrained("THUDM/CogView4-6B", torch_dtype=torch.bfloat16).to(device)
17
-
 
 
18
 
19
  def clean_string(s):
20
  s = s.replace("\n", " ")
 
14
  device = "cuda" if torch.cuda.is_available() else "cpu"
15
 
16
  pipe = CogView4Pipeline.from_pretrained("THUDM/CogView4-6B", torch_dtype=torch.bfloat16).to(device)
17
+ pipe.enable_model_cpu_offload()
18
+ pipe.vae.enable_slicing()
19
+ pipe.vae.enable_tiling()
20
 
21
  def clean_string(s):
22
  s = s.replace("\n", " ")