Spaces:
Runtime error
Runtime error
adding accelerate
Browse files- app.py +2 -0
- requirements.txt +4 -1
app.py
CHANGED
@@ -7,6 +7,8 @@ pipeline = DiffusionPipeline.from_pretrained("dreamlike-art/dreamlike-photoreal-
|
|
7 |
# move to GPU if available
|
8 |
if torch.cuda.is_available():
|
9 |
pipeline = pipeline.to("cuda")
|
|
|
|
|
10 |
|
11 |
def generate(prompts):
|
12 |
images = pipeline(list(prompts)).images
|
|
|
7 |
# move to GPU if available
|
8 |
if torch.cuda.is_available():
|
9 |
pipeline = pipeline.to("cuda")
|
10 |
+
else:
|
11 |
+
print('No CUDA, using CPU')
|
12 |
|
13 |
def generate(prompts):
|
14 |
images = pipeline(list(prompts)).images
|
requirements.txt
CHANGED
@@ -1,2 +1,5 @@
|
|
1 |
diffusers
|
2 |
-
torch
|
|
|
|
|
|
|
|
1 |
diffusers
|
2 |
+
torch
|
3 |
+
gradio
|
4 |
+
transformers
|
5 |
+
accelerate
|