Spaces:
Runtime error
Runtime error
Sophia Yang
commited on
Commit
·
dd213e4
1
Parent(s):
6cd7a87
update
Browse files- Dockerfile +1 -0
- app.py +1 -1
Dockerfile
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
WORKDIR /code
|
|
|
1 |
+
FROM nvidia/cuda
|
2 |
FROM python:3.9
|
3 |
|
4 |
WORKDIR /code
|
app.py
CHANGED
@@ -21,7 +21,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
21 |
# Model
|
22 |
model_id = "timbrooks/instruct-pix2pix"
|
23 |
|
24 |
-
if
|
25 |
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(
|
26 |
model_id, torch_dtype=torch.float16
|
27 |
)
|
|
|
21 |
# Model
|
22 |
model_id = "timbrooks/instruct-pix2pix"
|
23 |
|
24 |
+
if device == "cuda":
|
25 |
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(
|
26 |
model_id, torch_dtype=torch.float16
|
27 |
)
|