Spaces:
Sleeping
Sleeping
last shot
Browse files- Dockerfile +1 -1
- main.py +1 -1
Dockerfile
CHANGED
@@ -1,7 +1,7 @@
|
|
|
|
1 |
#FROM python:3.9
|
2 |
|
3 |
# Using the Ubuntu image (our OS)
|
4 |
-
FROM ubuntu:latest
|
5 |
# Update package manager (apt-get)
|
6 |
# and install (with the yes flag `-y`)
|
7 |
# Python and Pip
|
|
|
1 |
+
FROM nvidia/cuda:11.0-cudnn8-runtime-ubuntu18.04
|
2 |
#FROM python:3.9
|
3 |
|
4 |
# Using the Ubuntu image (our OS)
|
|
|
5 |
# Update package manager (apt-get)
|
6 |
# and install (with the yes flag `-y`)
|
7 |
# Python and Pip
|
main.py
CHANGED
@@ -23,7 +23,7 @@ def generate_image(prompt):
|
|
23 |
#pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
24 |
pipe = StableDiffusionPipeline.from_pretrained(model_id)
|
25 |
#pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
26 |
-
|
27 |
|
28 |
#prompt = "a photo of an astronaut riding a horse on mars"
|
29 |
|
|
|
23 |
#pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
24 |
pipe = StableDiffusionPipeline.from_pretrained(model_id)
|
25 |
#pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
26 |
+
pipe = pipe.to("cuda")
|
27 |
|
28 |
#prompt = "a photo of an astronaut riding a horse on mars"
|
29 |
|