Spaces:
Runtime error
Runtime error
eliphatfs
commited on
Commit
β’
6cff14e
1
Parent(s):
796d131
Remove form.
Browse files
app.py
CHANGED
@@ -208,21 +208,20 @@ torch.set_grad_enabled(False)
|
|
208 |
st.title("Zero123++ Demo")
|
209 |
# st.caption("For faster inference without waiting in queue, you may clone the space and run it yourself.")
|
210 |
prog = st.progress(0.0, "Idle")
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
results_container = st.container()
|
226 |
sample_got = image_examples(iret, 4, 'rimageinput')
|
227 |
if sample_got:
|
228 |
pic = sample_got
|
|
|
208 |
st.title("Zero123++ Demo")
|
209 |
# st.caption("For faster inference without waiting in queue, you may clone the space and run it yourself.")
|
210 |
prog = st.progress(0.0, "Idle")
|
211 |
+
pic = st.file_uploader("Upload an Image", key='imageinput', type=['png', 'jpg', 'webp'])
|
212 |
+
left, right = st.columns(2)
|
213 |
+
with left:
|
214 |
+
rem_input_bg = st.checkbox("Remove Input Background")
|
215 |
+
with right:
|
216 |
+
rem_output_bg = st.checkbox("Remove Output Background")
|
217 |
+
num_inference_steps = st.slider("Number of Inference Steps", 15, 100, 75)
|
218 |
+
st.caption("Diffusion Steps. For general real or synthetic objects, around 28 is enough. For objects with delicate details such as faces (either realistic or illustration), you may need 75 or more steps.")
|
219 |
+
cfg_scale = st.slider("Classifier Free Guidance Scale", 1.0, 10.0, 4.0)
|
220 |
+
seed = st.text_input("Seed", "42")
|
221 |
+
submit = False
|
222 |
+
if st.button("Submit"):
|
223 |
+
submit = True
|
224 |
+
results_container = st.container()
|
|
|
225 |
sample_got = image_examples(iret, 4, 'rimageinput')
|
226 |
if sample_got:
|
227 |
pic = sample_got
|