How to Install TripoSR for 2D to 3D Printing with AI – Step-by-Step Guide

How to Install TripoSR for 2D to 3D Printing with AI – Step-by-Step Guide

1.785 Lượt nghe
How to Install TripoSR for 2D to 3D Printing with AI – Step-by-Step Guide
Learn how to install TripoSR and transform your 2D images into 3D models ready for 3D printing! In this step-by-step tutorial, I’ll walk you through the full installation process of TripoSR, including setting up a batch file and a small Python script to streamline launching the application. With this setup, you’ll be able to start the Gradio UI quickly, making it even easier to convert your images into 3D printable models. Whether you're new to AI tools or looking to optimize your workflow, this video is designed to help you get started. 00:00 - Intro 00:44 - Installing Global Requirements 05:36 - Removing CUDA References from System Environment Variables 08:04 - TripoSR Main Installation 25:28 - Installing Batch File & Pi Script for Automatic Startup 30:50 - Outro Global Requirements: Python: https://www.python.org/downloads/ (I recommend using Python 3.12) Visual Studio Build Tools: https://visualstudio.microsoft.com/visual-cpp-build-tools/ (install everything having to do with C++) Rust & Cargo: www.rustup.rs Notepad++ https://notepad-plus-plus.org/ Installation Steps 1. Install all the Global Requirements. 2. Remove any reference to CUDA from System Environment Variables. Make sure to make a copy of the information in an application such as Notepad++ 3. Make a folder for TripoSR C:/TripoSR 4. Open up the Command Line Interface (CLI) and go to the TripoSR folder: cd C:/TripoSR 5. Clone the TripoSR repository from GitHub: git clone https://github.com/VAST-AI-Research/TripoSR.git 6. Create a Virtual Environment: python -m venv venv 7. Activate the virtual environment: venv\Scripts\activate 8. Install PyTorch: pip3 install torch torchvision torchaudio 9. Update PIP: python.exe -m pip install --upgrade pip 10. Update setuptools: pip install --upgrade setuptools 11. Go into the folder with the requirements.txt: cd C:/TripoSR/TripoSR 12. Install the TripoSR dependencies: pip install -r requirements.txt 13. Install onnxruntime: pip install onnxruntime 14. Uninstall Gradio 4.8.0 (which does not work properly): pip uninstall gradio 15. Install the newest version of Gradio: pip install --upgrade gradio . Ignore the red error... 16. Run the Gradio script to run the program: python gradio_app.py Installing the Batch and Python script for easier accessibility to the program: 1. Copy the batch script and the Python script to a text program such as Notepad++ 2. Copy Batch script into Notepad++ and name it -- run_triposr.bat -- Save it in C:/TripoSR @echo off cd C:\TripoSR call venv\Scripts\activate cd C:\TripoSR\TripoSR start cmd /k python gradio_app.py REM Wait for the server to be available using the Python script python wait_for_server.py REM Launch Chrome after server is ready start chrome http://127.0.0.1:7860 pause 3. Copy Python script into Notepad++ and name it -- wait_for_server.py -- Save it in C:/TripoSR/TripoSR import socket import time def wait_for_server(host, port): while True: try: with socket.create_connection((host, port), timeout=2): print("Server is up!") breakw except (OSError, ConnectionRefusedError): print("Waiting for server...") time.sleep(2) wait_for_server("127.0.0.1", 7860) ENJOY!