opsiclear-admin commited on
Commit
7d55f05
·
verified ·
1 Parent(s): d31856e

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +24 -24
app.py CHANGED
@@ -381,7 +381,7 @@ def preprocess_image(input: Image.Image) -> Image.Image:
381
 
382
 
383
  @spaces.GPU(duration=60)
384
- def preprocess_images(images: List[Tuple[Image.Image, str]]) -> List[Image.Image]:
385
  """
386
  Preprocess a list of input images for multi-image conditioning.
387
  """
@@ -409,7 +409,7 @@ def unpack_state(state: dict) -> Tuple[SparseTensor, SparseTensor, int]:
409
  return shape_slat, tex_slat, state['res']
410
 
411
 
412
- def get_seed(randomize_seed: bool, seed: int) -> int:
413
  """
414
  Get the random seed.
415
  """
@@ -485,26 +485,26 @@ def split_image(image: Image.Image) -> List[Image.Image]:
485
 
486
  @spaces.GPU(duration=120)
487
  def image_to_3d(
488
- seed: int,
489
- resolution: str,
490
- ss_guidance_strength: float,
491
- ss_guidance_rescale: float,
492
- ss_sampling_steps: int,
493
- ss_rescale_t: float,
494
- shape_slat_guidance_strength: float,
495
- shape_slat_guidance_rescale: float,
496
- shape_slat_sampling_steps: int,
497
- shape_slat_rescale_t: float,
498
- tex_slat_guidance_strength: float,
499
- tex_slat_guidance_rescale: float,
500
- tex_slat_sampling_steps: int,
501
- tex_slat_rescale_t: float,
502
- multiimages: List[Tuple[Image.Image, str]],
503
- multiimage_algo: str,
504
- tex_multiimage_algo: str,
505
  req: gr.Request,
506
  progress=gr.Progress(track_tqdm=True),
507
- ) -> str:
508
  if not multiimages:
509
  raise gr.Error("Please upload images or select an example first.")
510
 
@@ -628,12 +628,12 @@ def image_to_3d(
628
 
629
  @spaces.GPU(duration=120)
630
  def extract_glb(
631
- state: dict,
632
- decimation_target: int,
633
- texture_size: int,
634
  req: gr.Request,
635
  progress=gr.Progress(track_tqdm=True),
636
- ) -> Tuple[str, str]:
637
  """
638
  Extract a GLB file from the 3D model.
639
 
 
381
 
382
 
383
  @spaces.GPU(duration=60)
384
+ def preprocess_images(images):
385
  """
386
  Preprocess a list of input images for multi-image conditioning.
387
  """
 
409
  return shape_slat, tex_slat, state['res']
410
 
411
 
412
+ def get_seed(randomize_seed, seed):
413
  """
414
  Get the random seed.
415
  """
 
485
 
486
  @spaces.GPU(duration=120)
487
  def image_to_3d(
488
+ seed,
489
+ resolution,
490
+ ss_guidance_strength,
491
+ ss_guidance_rescale,
492
+ ss_sampling_steps,
493
+ ss_rescale_t,
494
+ shape_slat_guidance_strength,
495
+ shape_slat_guidance_rescale,
496
+ shape_slat_sampling_steps,
497
+ shape_slat_rescale_t,
498
+ tex_slat_guidance_strength,
499
+ tex_slat_guidance_rescale,
500
+ tex_slat_sampling_steps,
501
+ tex_slat_rescale_t,
502
+ multiimages,
503
+ multiimage_algo,
504
+ tex_multiimage_algo,
505
  req: gr.Request,
506
  progress=gr.Progress(track_tqdm=True),
507
+ ):
508
  if not multiimages:
509
  raise gr.Error("Please upload images or select an example first.")
510
 
 
628
 
629
  @spaces.GPU(duration=120)
630
  def extract_glb(
631
+ state,
632
+ decimation_target,
633
+ texture_size,
634
  req: gr.Request,
635
  progress=gr.Progress(track_tqdm=True),
636
+ ):
637
  """
638
  Extract a GLB file from the 3D model.
639