redkits commited on
Commit
f222c15
·
verified ·
1 Parent(s): df61a16

Upload server.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. server.py +2 -2
server.py CHANGED
@@ -22,8 +22,8 @@ def load_model():
22
  "zai-org/GLM-Image",
23
  torch_dtype=torch.bfloat16,
24
  )
25
- pipe.enable_sequential_cpu_offload()
26
- print("[image] Model loaded with sequential CPU offload!", flush=True)
27
 
28
  @app.route("/health", methods=["GET"])
29
  def health():
 
22
  "zai-org/GLM-Image",
23
  torch_dtype=torch.bfloat16,
24
  )
25
+ pipe.enable_model_cpu_offload()
26
+ print("[image] Model loaded with model CPU offload!", flush=True)
27
 
28
  @app.route("/health", methods=["GET"])
29
  def health():