Spaces:
Running
on
Zero
Running
on
Zero
Enable automatic RealESRGAN model download for texture generation
Browse files- Uncommented the automatic download of RealESRGAN_x4plus.pth in prepare_env()
- Added directory creation to ensure ckpt folder exists
- This fixes the missing texture generation functionality
- The model was supposed to be downloaded automatically but was commented out
- gradio_app.py +3 -2
gradio_app.py
CHANGED
@@ -311,8 +311,9 @@ if ENV == 'Huggingface':
|
|
311 |
|
312 |
print("cd /home/user/app/hy3dpaint/differentiable_renderer/ && bash compile_mesh_painter.sh")
|
313 |
os.system("cd /home/user/app/hy3dpaint/DifferentiableRenderer && bash compile_mesh_painter.sh")
|
314 |
-
|
315 |
-
|
|
|
316 |
|
317 |
def check():
|
318 |
import custom_rasterizer
|
|
|
311 |
|
312 |
print("cd /home/user/app/hy3dpaint/differentiable_renderer/ && bash compile_mesh_painter.sh")
|
313 |
os.system("cd /home/user/app/hy3dpaint/DifferentiableRenderer && bash compile_mesh_painter.sh")
|
314 |
+
print("Downloading RealESRGAN model for texture enhancement...")
|
315 |
+
os.makedirs("/home/user/app/hy3dpaint/ckpt", exist_ok=True)
|
316 |
+
os.system("wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P /home/user/app/hy3dpaint/ckpt")
|
317 |
|
318 |
def check():
|
319 |
import custom_rasterizer
|