Louischong commited on
Commit
979b6ce
·
verified ·
1 Parent(s): 8a68f15

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -132,7 +132,7 @@ def image_to_3d(trial_id: str, seed: int, randomize_seed: bool, ss_guidance_stre
132
  "cfg_strength": slat_guidance_strength,
133
  },
134
  )
135
- video = render_utils.render_video(outputs['gaussian'][0], num_frames=120)['color']
136
  video_geo = render_utils.render_video(outputs['mesh'][0], num_frames=120)['normal']
137
  video = [np.concatenate([video[i], video_geo[i]], axis=1) for i in range(len(video))]
138
  trial_id = uuid.uuid4()
@@ -214,8 +214,8 @@ with gr.Blocks() as demo:
214
  with gr.Row():
215
  examples = gr.Examples(
216
  examples=[
217
- f'assets/example_image/{image}'
218
- for image in os.listdir("assets/example_image")
219
  ],
220
  inputs=[image_prompt],
221
  fn=preprocess_image,
@@ -266,7 +266,7 @@ with gr.Blocks() as demo:
266
 
267
  # Launch the Gradio app
268
  if __name__ == "__main__":
269
- pipeline = TrellisImageTo3DPipeline.from_pretrained("JeffreyXiang/TRELLIS-image-large")
270
  if torch.cuda.is_available():
271
  pipeline.cuda()
272
  print("CUDA is available. Using GPU.")
 
132
  "cfg_strength": slat_guidance_strength,
133
  },
134
  )
135
+ video = render_utils.render_video(outputs['mesh'][0], num_frames=120)['color']
136
  video_geo = render_utils.render_video(outputs['mesh'][0], num_frames=120)['normal']
137
  video = [np.concatenate([video[i], video_geo[i]], axis=1) for i in range(len(video))]
138
  trial_id = uuid.uuid4()
 
214
  with gr.Row():
215
  examples = gr.Examples(
216
  examples=[
217
+ f'assets/example_imgs_trellis_oa/{image}'
218
+ for image in os.listdir("assets/example_imgs_trellis_oa")
219
  ],
220
  inputs=[image_prompt],
221
  fn=preprocess_image,
 
266
 
267
  # Launch the Gradio app
268
  if __name__ == "__main__":
269
+ pipeline = TrellisImageTo3DPipeline.from_pretrained("Louischong/Trellis-OA")
270
  if torch.cuda.is_available():
271
  pipeline.cuda()
272
  print("CUDA is available. Using GPU.")