Spaces:
Running
on
Zero
Running
on
Zero
bugfix
Browse files- app.py +4 -2
- requirements.txt +5 -2
app.py
CHANGED
@@ -276,6 +276,7 @@ def process(
|
|
276 |
image_resolution=width,
|
277 |
detect_resolution=512,
|
278 |
)
|
|
|
279 |
|
280 |
if control_mode == "scribble_hed":
|
281 |
preprocessor.load("HED")
|
@@ -284,7 +285,8 @@ def process(
|
|
284 |
image_resolution=image_resolution,
|
285 |
detect_resolution=preprocess_resolution,
|
286 |
)
|
287 |
-
|
|
|
288 |
control_mode_id = control_mode_ids[control_mode]
|
289 |
|
290 |
try:
|
@@ -360,7 +362,7 @@ with gr.Blocks() as demo:
|
|
360 |
)
|
361 |
|
362 |
control_mode = gr.Dropdown(
|
363 |
-
[ "canny", "depth_midas", "openpose", "mlsd"
|
364 |
)
|
365 |
|
366 |
submit_button_component = gr.Button(value='Submit', variant='primary', scale=0)
|
|
|
276 |
image_resolution=width,
|
277 |
detect_resolution=512,
|
278 |
)
|
279 |
+
|
280 |
|
281 |
if control_mode == "scribble_hed":
|
282 |
preprocessor.load("HED")
|
|
|
285 |
image_resolution=image_resolution,
|
286 |
detect_resolution=preprocess_resolution,
|
287 |
)
|
288 |
+
|
289 |
+
control_image = control_image.resize((width, height), Image.LANCZOS)
|
290 |
control_mode_id = control_mode_ids[control_mode]
|
291 |
|
292 |
try:
|
|
|
362 |
)
|
363 |
|
364 |
control_mode = gr.Dropdown(
|
365 |
+
[ "canny", "depth_midas", "openpose", "mlsd"], label="Controlnet Model", info="choose controlnet model!", value="openpose"
|
366 |
)
|
367 |
|
368 |
submit_button_component = gr.Button(value='Submit', variant='primary', scale=0)
|
requirements.txt
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
accelerate
|
2 |
invisible_watermark
|
3 |
-
torch
|
|
|
4 |
transformers
|
5 |
xformers
|
6 |
tqdm
|
@@ -18,4 +19,6 @@ boto3
|
|
18 |
sentencepiece
|
19 |
peft
|
20 |
controlnet-aux
|
21 |
-
kornia
|
|
|
|
|
|
1 |
accelerate
|
2 |
invisible_watermark
|
3 |
+
torch==2.0.1
|
4 |
+
torchvision==0.15.2
|
5 |
transformers
|
6 |
xformers
|
7 |
tqdm
|
|
|
19 |
sentencepiece
|
20 |
peft
|
21 |
controlnet-aux
|
22 |
+
kornia
|
23 |
+
deepspeed
|
24 |
+
einops
|