gensym commited on
Commit
a8e79b5
·
1 Parent(s): 639772e
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -275,13 +275,14 @@ cleanup_thread.start()
275
 
276
  @spaces.GPU
277
  def preload():
278
- pass
279
 
280
 
281
  # Launch the Gradio app
282
  if __name__ == "__main__":
 
283
  pipeline = TrellisImageTo3DPipeline.from_pretrained("JeffreyXiang/TRELLIS-image-large")
284
- pipeline.cuda()
285
  try:
286
  pipeline.preprocess_image(Image.fromarray(np.zeros((512, 512, 3), dtype=np.uint8))) # Preload rembg
287
  except:
 
275
 
276
  @spaces.GPU
277
  def preload():
278
+ pipeline.cuda()
279
 
280
 
281
  # Launch the Gradio app
282
  if __name__ == "__main__":
283
+ global pipeline
284
  pipeline = TrellisImageTo3DPipeline.from_pretrained("JeffreyXiang/TRELLIS-image-large")
285
+ preload()
286
  try:
287
  pipeline.preprocess_image(Image.fromarray(np.zeros((512, 512, 3), dtype=np.uint8))) # Preload rembg
288
  except: