tokenid commited on
Commit
3539c9b
1 Parent(s): 3c9122e

Align mesh to image. Move seed prompt.

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -232,8 +232,9 @@ def make3d(images):
232
  )
233
 
234
  vertices, faces, vertex_colors = mesh_out
235
- vertices = vertices[:, [0, 2, 1]]
236
  vertices[:, -1] *= -1
 
237
 
238
  save_obj(vertices, faces, vertex_colors, mesh_fpath)
239
 
@@ -290,7 +291,7 @@ with gr.Blocks() as demo:
290
  do_remove_background = gr.Checkbox(
291
  label="Remove Background", value=True
292
  )
293
- sample_seed = gr.Number(value=42, label="Seed (Try a different value if the result is unsatisfying)", precision=0)
294
 
295
  sample_steps = gr.Slider(
296
  label="Sample Steps",
@@ -339,6 +340,10 @@ with gr.Blocks() as demo:
339
  label="Output Model (OBJ Format)",
340
  interactive=False,
341
  )
 
 
 
 
342
  gr.Markdown(_LINKS_)
343
  gr.Markdown(_CITE_)
344
 
 
232
  )
233
 
234
  vertices, faces, vertex_colors = mesh_out
235
+ vertices = vertices[:, [1, 2, 0]]
236
  vertices[:, -1] *= -1
237
+ faces = faces[:, [2, 1, 0]]
238
 
239
  save_obj(vertices, faces, vertex_colors, mesh_fpath)
240
 
 
291
  do_remove_background = gr.Checkbox(
292
  label="Remove Background", value=True
293
  )
294
+ sample_seed = gr.Number(value=42, label="Seed Value", precision=0)
295
 
296
  sample_steps = gr.Slider(
297
  label="Sample Steps",
 
340
  label="Output Model (OBJ Format)",
341
  interactive=False,
342
  )
343
+
344
+ with gr.Row():
345
+ gr.Markdown('''Try a different <b>seed value</b> if the result is unsatisfying (Default: 42).''')
346
+
347
  gr.Markdown(_LINKS_)
348
  gr.Markdown(_CITE_)
349