Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,10 @@ def contrast_loss(image_tensor):
|
|
39 |
|
40 |
# Setup Stable Diffusion Pipeline
|
41 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
42 |
-
pipe = StableDiffusionPipeline.from_pretrained(
|
|
|
|
|
|
|
43 |
|
44 |
# Image transform to tensor
|
45 |
transform = transforms.ToTensor()
|
|
|
39 |
|
40 |
# Setup Stable Diffusion Pipeline
|
41 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
42 |
+
pipe = StableDiffusionPipeline.from_pretrained(
|
43 |
+
"CompVis/stable-diffusion-v1-4",
|
44 |
+
torch_dtype=torch.float16
|
45 |
+
).to(device)
|
46 |
|
47 |
# Image transform to tensor
|
48 |
transform = transforms.ToTensor()
|