Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
|
21 |
|
22 |
|
23 |
model_id1 = os.getenv("API_KEY")
|
24 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id1, torch_dtype=torch_dtype, use_safetensors=True)
|
25 |
pipe = pipe.to('cpu')
|
26 |
|
27 |
# Updated function for text generation using the new API structure
|
|
|
21 |
|
22 |
|
23 |
model_id1 = os.getenv("API_KEY")
|
24 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id1, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True)
|
25 |
pipe = pipe.to('cpu')
|
26 |
|
27 |
# Updated function for text generation using the new API structure
|