CoolFace
Apppublic

anvilinteractiv/PolyGeniixAI5.0

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
setup_texturing.py28 linesDownload Raw Back to root
1import os2import subprocess3import sys4 5def run_setup(directory):6    try:7        os.chdir(directory)8        result = subprocess.run([sys.executable, "setup.py", "install"], check=True, capture_output=True, text=True)9        print(f"Successfully installed {directory}: {result.stdout}")10    except subprocess.CalledProcessError as e:11        print(f"Error installing {directory}: {e.stderr}")12    except Exception as e:13        print(f"Unexpected error in {directory}: {e}")14 15# Install custom_rasterizer16run_setup("hy3dgen/texgen/custom_rasterizer")17 18# Install differentiable_renderer19run_setup("hy3dgen/texgen/differentiable_renderer")20 21# Download Real-ESRGAN model22try:23    os.makedirs("hy3dpaint/ckpt", exist_ok=True)24    realesrgan_url = "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth"25    subprocess.run(["wget", realesrgan_url, "-P", "hy3dpaint/ckpt"], check=True, capture_output=True, text=True)26    print("Successfully downloaded Real-ESRGAN model")27except Exception as e:28    print(f"Error downloading Real-ESRGAN: {e}")