Spaces:
Runtime error
Runtime error
Commit
·
1796e8a
1
Parent(s):
ce9d54d
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ model_id = "CompVis/stable-diffusion-v1-4"
|
|
22 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
23 |
context = autocast if device == "cuda" else nullcontext
|
24 |
|
25 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id,
|
26 |
|
27 |
|
28 |
def infer(prompt,samples):
|
|
|
22 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
23 |
context = autocast if device == "cuda" else nullcontext
|
24 |
|
25 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id,torch_dtype=torch.float16,use_auth_token=token).to(device)
|
26 |
|
27 |
|
28 |
def infer(prompt,samples):
|