lionelgarnier commited on
Commit
c4611b8
·
1 Parent(s): 5d67648

remove gpu for get_trellis_pipeline

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -117,7 +117,7 @@ def get_text_gen_pipeline():
117
  return None
118
  return _text_gen_pipeline
119
 
120
- @spaces.GPU()
121
  def get_trellis_pipeline():
122
  global _trellis_pipeline
123
  if _trellis_pipeline is None:
@@ -136,6 +136,7 @@ def get_trellis_pipeline():
136
  return None
137
  return _trellis_pipeline
138
 
 
139
  @spaces.GPU()
140
  def refine_prompt(prompt, system_prompt=DEFAULT_SYSTEM_PROMPT, progress=gr.Progress()):
141
  text_gen = get_text_gen_pipeline()
@@ -571,11 +572,12 @@ def create_interface():
571
  fn=image_to_3d,
572
  inputs=[preprocessed_image, trellis_seed, ss_guidance_strength, ss_sampling_steps, slat_guidance_strength, slat_sampling_steps],
573
  outputs=[output_state, video_output],
574
- ).then(
575
- # Update button states after successful 3D generation
576
- lambda: (gr.Button.update(interactive=True), gr.Button.update(interactive=True), "3D model generated successfully"),
577
- outputs=[extract_glb_btn, extract_gs_btn, message_box]
578
  )
 
 
 
 
 
579
 
580
  # # Add handlers for GLB and Gaussian extraction
581
  # gr.on(
 
117
  return None
118
  return _text_gen_pipeline
119
 
120
+ # @spaces.GPU()
121
  def get_trellis_pipeline():
122
  global _trellis_pipeline
123
  if _trellis_pipeline is None:
 
136
  return None
137
  return _trellis_pipeline
138
 
139
+
140
  @spaces.GPU()
141
  def refine_prompt(prompt, system_prompt=DEFAULT_SYSTEM_PROMPT, progress=gr.Progress()):
142
  text_gen = get_text_gen_pipeline()
 
572
  fn=image_to_3d,
573
  inputs=[preprocessed_image, trellis_seed, ss_guidance_strength, ss_sampling_steps, slat_guidance_strength, slat_sampling_steps],
574
  outputs=[output_state, video_output],
 
 
 
 
575
  )
576
+ # .then(
577
+ # # Update button states after successful 3D generation
578
+ # lambda: (gr.Button.update(interactive=True), gr.Button.update(interactive=True), "3D model generated successfully"),
579
+ # outputs=[extract_glb_btn, extract_gs_btn, message_box]
580
+ # )
581
 
582
  # # Add handlers for GLB and Gaussian extraction
583
  # gr.on(