Spaces:
Runtime error
Runtime error
Vishnu Sarukkai
commited on
Commit
·
04b5ed6
1
Parent(s):
b2e4488
Fix
Browse files- app.py +3 -2
- requirements.txt +6 -5
app.py
CHANGED
@@ -4,13 +4,14 @@ import torch
|
|
4 |
import numpy as np
|
5 |
from controlnet_aux import HEDdetector
|
6 |
from PIL import Image
|
|
|
7 |
|
8 |
negative_prompt = ""
|
9 |
device = 'cpu'
|
10 |
-
controlnet = ControlNetModel.from_pretrained("vsanimator/
|
11 |
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
12 |
"runwayml/stable-diffusion-v1-5",
|
13 |
-
controlnet=controlnet
|
14 |
).to(device)
|
15 |
pipe.safety_checker = None
|
16 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
|
|
4 |
import numpy as np
|
5 |
from controlnet_aux import HEDdetector
|
6 |
from PIL import Image
|
7 |
+
import os
|
8 |
|
9 |
negative_prompt = ""
|
10 |
device = 'cpu'
|
11 |
+
controlnet = ControlNetModel.from_pretrained("vsanimator/sketch-a-sketch").to(device)
|
12 |
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
13 |
"runwayml/stable-diffusion-v1-5",
|
14 |
+
controlnet=controlnet#, torch_dtype=torch.float16
|
15 |
).to(device)
|
16 |
pipe.safety_checker = None
|
17 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
requirements.txt
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
1 |
+
gradio
|
2 |
+
diffusers
|
3 |
+
controlnet_aux
|
4 |
+
accelerate
|
5 |
+
transformers
|
6 |
+
torch
|