xinjie.wang commited on
Commit
07a8a18
·
1 Parent(s): 4d0533e
Files changed (1) hide show
  1. app.py +10 -16
app.py CHANGED
@@ -233,11 +233,7 @@ with gr.Blocks(
233
  )
234
  ],
235
  inputs=[image_prompt_sam],
236
- fn=partial(
237
- preprocess_sam_image_fn,
238
- buffer=IMAGE_BUFFER,
239
- model=SAM_PREDICTOR,
240
- ),
241
  outputs=[image_prompt_sam],
242
  run_on_click=True,
243
  examples_per_page=32,
@@ -334,9 +330,7 @@ with gr.Blocks(
334
  )
335
 
336
  image_prompt_sam.upload(
337
- partial(
338
- preprocess_sam_image_fn, buffer=IMAGE_BUFFER, model=SAM_PREDICTOR
339
- ),
340
  inputs=[image_prompt_sam],
341
  outputs=[image_prompt_sam],
342
  )
@@ -387,7 +381,7 @@ with gr.Blocks(
387
  image_prompt_sam,
388
  selected_points,
389
  fg_bg_radio,
390
- gr.State(lambda: SAM_PREDICTOR),
391
  ],
392
  [image_mask_sam, image_seg_sam],
393
  )
@@ -410,8 +404,8 @@ with gr.Blocks(
410
  ss_sampling_steps,
411
  slat_guidance_strength,
412
  slat_sampling_steps,
413
- gr.State(lambda: IMAGE_BUFFER),
414
- gr.State(lambda: PIPELINE),
415
  gr.State(lambda: TMP_DIR),
416
  image_seg_sam,
417
  is_samimage,
@@ -428,8 +422,8 @@ with gr.Blocks(
428
  output_buf,
429
  project_delight,
430
  gr.State(lambda: TMP_DIR),
431
- gr.State(lambda: DELIGHT),
432
- gr.State(lambda: IMAGESR_MODEL),
433
  ],
434
  outputs=[
435
  model_output_mesh,
@@ -452,9 +446,9 @@ with gr.Blocks(
452
  mass_range_text,
453
  asset_version_text,
454
  gr.State(lambda: TMP_DIR),
455
- gr.State(lambda: URDF_CONVERTOR),
456
- gr.State(lambda: IMAGE_BUFFER),
457
- gr.State(lambda: CHECKERS),
458
  ],
459
  outputs=[
460
  download_urdf,
 
233
  )
234
  ],
235
  inputs=[image_prompt_sam],
236
+ fn=preprocess_sam_image_fn,
 
 
 
 
237
  outputs=[image_prompt_sam],
238
  run_on_click=True,
239
  examples_per_page=32,
 
330
  )
331
 
332
  image_prompt_sam.upload(
333
+ preprocess_sam_image_fn,
 
 
334
  inputs=[image_prompt_sam],
335
  outputs=[image_prompt_sam],
336
  )
 
381
  image_prompt_sam,
382
  selected_points,
383
  fg_bg_radio,
384
+ # gr.State(lambda: SAM_PREDICTOR),
385
  ],
386
  [image_mask_sam, image_seg_sam],
387
  )
 
404
  ss_sampling_steps,
405
  slat_guidance_strength,
406
  slat_sampling_steps,
407
+ # gr.State(lambda: IMAGE_BUFFER),
408
+ # gr.State(lambda: PIPELINE),
409
  gr.State(lambda: TMP_DIR),
410
  image_seg_sam,
411
  is_samimage,
 
422
  output_buf,
423
  project_delight,
424
  gr.State(lambda: TMP_DIR),
425
+ # gr.State(lambda: DELIGHT),
426
+ # gr.State(lambda: IMAGESR_MODEL),
427
  ],
428
  outputs=[
429
  model_output_mesh,
 
446
  mass_range_text,
447
  asset_version_text,
448
  gr.State(lambda: TMP_DIR),
449
+ # gr.State(lambda: URDF_CONVERTOR),
450
+ # gr.State(lambda: IMAGE_BUFFER),
451
+ # gr.State(lambda: CHECKERS),
452
  ],
453
  outputs=[
454
  download_urdf,