lemonaddie
commited on
Commit
•
6524a56
1
Parent(s):
064b3ee
Update app2.py
Browse files
app2.py
CHANGED
@@ -87,8 +87,12 @@ def depth_normal(img,
|
|
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:
|
@@ -195,6 +199,8 @@ def run_demo():
|
|
195 |
step=1,
|
196 |
value=1,
|
197 |
)
|
|
|
|
|
198 |
processing_res = gr.Radio(
|
199 |
[
|
200 |
("Native", 0),
|
@@ -218,6 +224,7 @@ def run_demo():
|
|
218 |
ensemble_size,
|
219 |
processing_res,
|
220 |
#guidance_scale,
|
|
|
221 |
domain],
|
222 |
outputs=[depth, normal]
|
223 |
)
|
|
|
87 |
ensemble_size,
|
88 |
processing_res,
|
89 |
#guidance_scale,
|
90 |
+
seed,
|
91 |
domain):
|
92 |
|
93 |
+
seed = int(seed)
|
94 |
+
torch.manual_seed(seed)
|
95 |
+
|
96 |
#img = img.resize((processing_res, processing_res), Image.Resampling.LANCZOS)
|
97 |
|
98 |
# if guidance_scale > 0:
|
|
|
199 |
step=1,
|
200 |
value=1,
|
201 |
)
|
202 |
+
seed = gr.Number(42, label='Seed. May try different seed for better results.')
|
203 |
+
|
204 |
processing_res = gr.Radio(
|
205 |
[
|
206 |
("Native", 0),
|
|
|
224 |
ensemble_size,
|
225 |
processing_res,
|
226 |
#guidance_scale,
|
227 |
+
seed,
|
228 |
domain],
|
229 |
outputs=[depth, normal]
|
230 |
)
|