On Windows, if torchmcubes fails, see TripoSR README (CUDA version match, then reinstall torchmcubes).
2b. Stable Diffusion model (Hugging Face)
If you see "Cannot load model ... model is not cached locally and an error occurred while trying to fetch metadata", the app cannot reach Hugging Face. Use one of these:
Option 1 – Log in (uses cached token)
From a terminal with internet:
Then set the path and run the app (no Hugging Face needed):
powershell
1$env:SD_MODEL_PATH = "D:\project\evoneural\weights\stable-diffusion-2-1-base"2streamlit run app.py
How it works
Skybox tab: You enter a text prompt → the app loads Stable Diffusion (from cache or Hugging Face) → generates a 2:1 image → saves to outputs/ and shows a download button. Optional “seamless” check compares left/right edges.
Mesh tab: You enter a prompt (or upload an image) → the app generates an image with SD (if needed) → runs TripoSR on that image → outputs a .obj or .glb to outputs/ (requires TripoSR repo cloned in ./TripoSR).
Model loading: The app first tries a local folder (SD_MODEL_PATH or weights/stable-diffusion-2-1-base if complete). If none, it loads runwayml/stable-diffusion-v1-5 from the Hub (first run downloads the model; later runs use the cache). No token needed unless your network restricts Hugging Face.
3. Run the app
From the project root (with venv activated):
powershell
1cd D:\project\evoneural
2.venv\Scripts\Activate.ps1
3streamlit run app.py
Text → 3D Mesh: Enter a prompt (or upload an image). First run downloads SD 2.1 and TripoSR weights.
Text → Skybox: Enter a prompt; image is 2:1 (e.g. 1024×512). Use “Run seamless edge check” to compare left/right edges.
Outputs are under outputs/. Use the download buttons to save mesh (.glb/.obj) and skybox (.png).
4. Performance
Skybox: ~6–8 GB VRAM (SD 2.1, 1024×512, FP16). Use 2048×1024 only if you have enough VRAM.
Mesh: ~6 GB for TripoSR + ~6 GB for SD (text-to-image). Total peak can be ~10–12 GB if both run in same process.
If you run out of VRAM:
Use 1024×512 for skybox.
Close other GPU apps.
Consider quantization (e.g. 8-bit) or CPU offload in diffusers (see Optimization).
5. Optimization (if VRAM is exceeded)
Quantization: Use load_in_8bit=True or load_in_4bit=True with bitsandbytes where supported in diffusers.
Model CPU offload: In diffusers, pipe.enable_sequential_cpu_offload() or pipe.enable_model_cpu_offload() to move parts to CPU and reduce peak VRAM (slower).
Smaller resolution: 512×512 for text-to-image; 1024×512 for skybox.