Spaces:
Running
on
Zero
Running
on
Zero
Alexander Bagus
commited on
Commit
·
ee3b958
1
Parent(s):
43221fb
22
Browse files
app.py
CHANGED
|
@@ -79,21 +79,21 @@ spaces.aoti_blocks_load(pipe.transformer.layers,
|
|
| 79 |
def prepare(prompt, input_image, control_mode='Canny'):
|
| 80 |
polished_prompt = polish_prompt(prompt)
|
| 81 |
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
if control_mode == 'HED':
|
| 85 |
-
|
| 86 |
-
if control_mode =='Midas':
|
| 87 |
-
|
| 88 |
-
if control_mode =='MLSD':
|
| 89 |
-
|
| 90 |
-
if control_mode =='Pose':
|
| 91 |
-
|
| 92 |
-
else:
|
| 93 |
-
|
| 94 |
-
control_image = processor(input_image)
|
| 95 |
|
| 96 |
-
return polished_prompt, control_image
|
| 97 |
|
| 98 |
@spaces.GPU
|
| 99 |
def inference(
|
|
|
|
| 79 |
def prepare(prompt, input_image, control_mode='Canny'):
|
| 80 |
polished_prompt = polish_prompt(prompt)
|
| 81 |
|
| 82 |
+
return polished_prompt
|
| 83 |
+
|
| 84 |
+
# if control_mode == 'HED':
|
| 85 |
+
# processor = HEDdetector.from_pretrained("lllyasviel/Annotators")
|
| 86 |
+
# if control_mode =='Midas':
|
| 87 |
+
# processor = MidasDetector.from_pretrained("lllyasviel/Annotators")
|
| 88 |
+
# if control_mode =='MLSD':
|
| 89 |
+
# processor = MLSDdetector.from_pretrained("lllyasviel/Annotators")
|
| 90 |
+
# if control_mode =='Pose':
|
| 91 |
+
# processor = OpenposeDetector.from_pretrained("lllyasviel/Annotators")
|
| 92 |
+
# else:
|
| 93 |
+
# processor = CannyDetector()
|
| 94 |
+
# control_image = processor(input_image)
|
| 95 |
|
| 96 |
+
# return polished_prompt, control_image
|
| 97 |
|
| 98 |
@spaces.GPU
|
| 99 |
def inference(
|