Upload server.py with huggingface_hub
Browse files
server.py
CHANGED
|
@@ -29,8 +29,8 @@ def load_model():
|
|
| 29 |
vae=vae,
|
| 30 |
torch_dtype=torch.bfloat16,
|
| 31 |
)
|
| 32 |
-
pipe.
|
| 33 |
-
print("[video] Model loaded
|
| 34 |
|
| 35 |
@app.route("/health", methods=["GET"])
|
| 36 |
def health():
|
|
|
|
| 29 |
vae=vae,
|
| 30 |
torch_dtype=torch.bfloat16,
|
| 31 |
)
|
| 32 |
+
pipe.enable_model_cpu_offload()
|
| 33 |
+
print("[video] Model loaded with CPU offload!", flush=True)
|
| 34 |
|
| 35 |
@app.route("/health", methods=["GET"])
|
| 36 |
def health():
|