Spaces:
Paused
Paused
Update app.py
Browse files31 unmodified lines3233343536373811 unmodified lines5051525354555621 unmodified lines78798081828384352 unmodified lines43743843944044131 unmodified lines user_dir = os.path.join(TMP_DIR, str(req.session_hash)) shutil.rmtree(user_dir)
@spaces.GPUdef preprocess_image(image: Image.Image) -> Image.Image: """ Preprocess the input image for 3D generation.11 unmodified lines processed_image = pipeline.preprocess_image(image) return processed_image
@spaces.GPUdef preprocess_videos(video: str) -> List[Tuple[Image.Image, str]]: """ Preprocess the input video for multi-image 3D generation.21 unmodified lines processed_images = [pipeline.preprocess_image(image) for image in images] return processed_images
@spaces.GPUdef preprocess_images(images: List[Tuple[Image.Image, str]]) -> List[Image.Image]: """ Preprocess a list of input images for multi-image 3D generation.352 unmodified lines pipeline = TrellisVGGTTo3DPipeline.from_pretrained("Stable-X/trellis-vggt-v0-1") pipeline.cuda() pipeline.VGGT_model.cuda() pipeline.birefnet_model.cuda() demo.launch()app.py+4