Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
dbbe505
1
Parent(s):
1adb3ff
Update app2.py
Browse files
app2.py
CHANGED
@@ -86,34 +86,34 @@ def depth_normal(img,
|
|
86 |
denoising_steps,
|
87 |
ensemble_size,
|
88 |
processing_res,
|
89 |
-
guidance_scale,
|
90 |
domain):
|
91 |
|
92 |
#img = img.resize((processing_res, processing_res), Image.Resampling.LANCZOS)
|
93 |
|
94 |
-
if guidance_scale > 0:
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
|
106 |
-
else:
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
|
118 |
depth_colored = pipe_out.depth_colored
|
119 |
normal_colored = pipe_out.normal_colored
|
@@ -174,13 +174,13 @@ def run_demo():
|
|
174 |
label="Data Type (Must Select One matches your image)",
|
175 |
value="indoor",
|
176 |
)
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
)
|
184 |
denoising_steps = gr.Slider(
|
185 |
label="Number of denoising steps (More steps, better quality)",
|
186 |
minimum=1,
|
@@ -217,7 +217,7 @@ def run_demo():
|
|
217 |
inputs=[input_image, denoising_steps,
|
218 |
ensemble_size,
|
219 |
processing_res,
|
220 |
-
guidance_scale,
|
221 |
domain],
|
222 |
outputs=[depth, normal]
|
223 |
)
|
|
|
86 |
denoising_steps,
|
87 |
ensemble_size,
|
88 |
processing_res,
|
89 |
+
#guidance_scale,
|
90 |
domain):
|
91 |
|
92 |
#img = img.resize((processing_res, processing_res), Image.Resampling.LANCZOS)
|
93 |
|
94 |
+
# if guidance_scale > 0:
|
95 |
+
# pipe_out = pipe_cfg(
|
96 |
+
# img,
|
97 |
+
# denoising_steps=denoising_steps,
|
98 |
+
# ensemble_size=ensemble_size,
|
99 |
+
# processing_res=processing_res,
|
100 |
+
# batch_size=0,
|
101 |
+
# guidance_scale=guidance_scale,
|
102 |
+
# domain=domain,
|
103 |
+
# show_progress_bar=True,
|
104 |
+
# )
|
105 |
|
106 |
+
# else:
|
107 |
+
pipe_out = pipe(
|
108 |
+
img,
|
109 |
+
denoising_steps=denoising_steps,
|
110 |
+
ensemble_size=ensemble_size,
|
111 |
+
processing_res=processing_res,
|
112 |
+
batch_size=0,
|
113 |
+
#guidance_scale=guidance_scale,
|
114 |
+
domain=domain,
|
115 |
+
show_progress_bar=True,
|
116 |
+
)
|
117 |
|
118 |
depth_colored = pipe_out.depth_colored
|
119 |
normal_colored = pipe_out.normal_colored
|
|
|
174 |
label="Data Type (Must Select One matches your image)",
|
175 |
value="indoor",
|
176 |
)
|
177 |
+
# guidance_scale = gr.Slider(
|
178 |
+
# label="Classifier Free Guidance Scale, 0 Recommended for no guidance",
|
179 |
+
# minimum=0,
|
180 |
+
# maximum=5,
|
181 |
+
# step=1,
|
182 |
+
# value=0,
|
183 |
+
# )
|
184 |
denoising_steps = gr.Slider(
|
185 |
label="Number of denoising steps (More steps, better quality)",
|
186 |
minimum=1,
|
|
|
217 |
inputs=[input_image, denoising_steps,
|
218 |
ensemble_size,
|
219 |
processing_res,
|
220 |
+
#guidance_scale,
|
221 |
domain],
|
222 |
outputs=[depth, normal]
|
223 |
)
|