hysts HF Staff commited on
Commit
2a9ffd4
·
1 Parent(s): 289f4e4
Files changed (2) hide show
  1. app_image_to_3d.py +3 -3
  2. app_text_to_3d.py +3 -3
app_image_to_3d.py CHANGED
@@ -28,14 +28,14 @@ def create_demo(model: Model) -> gr.Blocks:
28
  return model.run_image(image_path)
29
 
30
  @spaces.GPU
31
- def run(image: PIL.Image.Image, seed: int, guidance_scale: float, num_inference_steps: int) -> str:
32
  """Generate a 3D model from an image.
33
 
34
  Args:
35
  image (PIL.Image.Image): The input image.
36
  seed (int): The seed for the random number generator.
37
- guidance_scale (float): The guidance scale for the model.
38
- num_inference_steps (int): The number of inference steps for the model.
39
 
40
  Returns:
41
  str: The path to the 3D model.
 
28
  return model.run_image(image_path)
29
 
30
  @spaces.GPU
31
+ def run(image: PIL.Image.Image, seed: int, guidance_scale: float = 3.0, num_inference_steps: int = 64) -> str:
32
  """Generate a 3D model from an image.
33
 
34
  Args:
35
  image (PIL.Image.Image): The input image.
36
  seed (int): The seed for the random number generator.
37
+ guidance_scale (float): The guidance scale for the model. Defaults to 3.0.
38
+ num_inference_steps (int): The number of inference steps for the model. Defaults to 64.
39
 
40
  Returns:
41
  str: The path to the 3D model.
app_text_to_3d.py CHANGED
@@ -26,14 +26,14 @@ def create_demo(model: Model) -> gr.Blocks:
26
  return model.run_text(prompt)
27
 
28
  @spaces.GPU
29
- def run(prompt: str, seed: int, guidance_scale: float, num_inference_steps: int) -> str:
30
  """Generate a 3D model from a text prompt.
31
 
32
  Args:
33
  prompt (str): The text prompt.
34
  seed (int): The seed for the random number generator.
35
- guidance_scale (float): The guidance scale for the model.
36
- num_inference_steps (int): The number of inference steps for the model.
37
 
38
  Returns:
39
  str: The path to the 3D model.
 
26
  return model.run_text(prompt)
27
 
28
  @spaces.GPU
29
+ def run(prompt: str, seed: int, guidance_scale: float = 15.0, num_inference_steps: int = 64) -> str:
30
  """Generate a 3D model from a text prompt.
31
 
32
  Args:
33
  prompt (str): The text prompt.
34
  seed (int): The seed for the random number generator.
35
+ guidance_scale (float): The guidance scale for the model. Defaults to 15.0.
36
+ num_inference_steps (int): The number of inference steps for the model. Defaults to 64.
37
 
38
  Returns:
39
  str: The path to the 3D model.