Spaces:
Sleeping
Sleeping
updates to empty cache
Browse files
main.py
CHANGED
@@ -20,6 +20,8 @@ app = FastAPI()
|
|
20 |
|
21 |
@app.get("/generate")
|
22 |
def generate_image(prompt, inference_steps, model):
|
|
|
|
|
23 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
24 |
|
25 |
#model_id = "CompVis/stable-diffusion-v1-4" #stabilityai/stable-diffusion-2-1
|
|
|
20 |
|
21 |
@app.get("/generate")
|
22 |
def generate_image(prompt, inference_steps, model):
|
23 |
+
torch.cuda.empty_cache()
|
24 |
+
|
25 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
26 |
|
27 |
#model_id = "CompVis/stable-diffusion-v1-4" #stabilityai/stable-diffusion-2-1
|