A newer version of the Gradio SDK is available: 6.28.0
metadata
title: TEXTure CPU Lite
emoji: π¨
colorFrom: green
colorTo: pink
sdk: gradio
sdk_version: 6.2.0
app_file: app.py
pinned: false
license: mit
TEXTure CPU Lite - Text-Guided 3D Texturing
Generate proper UV texture maps for 3D meshes using text prompts. Uses SD-2-Depth (same as original TEXTure paper) for depth-conditioned generation and xatlas for UV unwrapping.
Features
- Proper UV Texture Output: Creates UV atlas that can be applied to the mesh
- SD-2-Depth: Native depth conditioning (same model as original TEXTure)
- OBJ Export: Outputs OBJ + MTL + texture PNG ready to use
- xatlas UV Unwrapping: Automatic UV coordinate generation
How it works
- Upload a 3D mesh (.obj, .stl, .ply, .glb)
- Enter a text prompt describing the desired texture
- xatlas generates UV coordinates
- Depth is rendered from multiple viewpoints
- SD-2-Depth generates textures conditioned on depth
- Textures are projected back to UV space
- Download textured mesh (OBJ + MTL + PNG)
Models Used
| Component | Model | Size |
|---|---|---|
| SD-2-Depth | radames/stable-diffusion-2-depth-img2img | ~5GB |
Same architecture as original TEXTure paper (SD-2-Depth) - has native depth conditioning built-in.
Uses public community copy since official stabilityai/stable-diffusion-2-depth is gated.
Runtime:
- First run: Downloads
5GB model (cached in `/.cache/huggingface/`) - CPU uses INT8 quantization via
optimum.quantofor 3-5x speedup - ONNX not supported (SD-2-Depth has 5-channel UNet)
Debug logs: Check build logs for [OK], [ERROR], [WARN] messages if something fails.
Performance
| Device | Steps | Time per View | 4 Views Total |
|---|---|---|---|
| GPU (CUDA) | 20 | ~2-3 sec | ~12 sec |
| CPU (INT8) | 10 | ~1.5 min | ~6 min |
| CPU (INT8) | 20 | ~3 min | ~14 min |
Tip: For faster results on CPU, use fewer steps (5-10) or fewer views (2-3).
Local Development
pip install -r requirements.txt
python app.py
Files Structure
βββ app.py # Single-file implementation
βββ requirements.txt
βββ README.md
βββ shapes/
βββ bunny.obj # Sample mesh
Credits
- TEXTure Paper - Yael Vinker et al.
- ControlNet - Lvmin Zhang
- Stable Diffusion - RunwayML
- xatlas - UV unwrapping