FIBO-virtual-photo-studio / ENABLE_GPU.md
Thomas Chauvel
πŸ“ Add better error messages and GPU enable guide
c816b35

A newer version of the Gradio SDK is available: 6.0.0

Upgrade

πŸš€ How to Enable GPU on Your Hugging Face Space

Your Space is currently running in MOCK MODE because GPU is not enabled.

⚠️ Current Issue

User provided device_type of 'cuda', but CUDA is not available

This means your Space is running on CPU, but FIBO requires GPU.

βœ… Solution: Enable GPU

Step 1: Go to Space Settings

  1. Open your Space: https://huggingface.co/spaces/ThomasChauv/FIBO-virtual-photo-studio
  2. Click βš™οΈ Settings (top right)

Step 2: Change Hardware

  1. Scroll to Hardware section
  2. Current: CPU basic (free)
  3. Click Change hardware

Step 3: Select GPU

Choose one of:

Hardware VRAM Speed Cost
GPU basic (T4) 16GB Good Free for Community
GPU small (A10G) 24GB Better Paid
GPU medium (A100) 40GB Best Paid

Recommended: Start with GPU basic (T4) - it's free and sufficient for FIBO!

Step 4: Save & Restart

  1. Click Save
  2. Space will restart (~2 minutes)
  3. Watch logs for: βœ… FIBO on GPU: Tesla T4

πŸ“Š What to Expect

With CPU (Current - Not Working):

⚠️ User provided device_type of 'cuda', but CUDA is not available
❌ Failed to load FIBO
βœ… Generation complete! (Mock mode - placeholder images)

With GPU (After Fix - Working):

πŸ”„ Loading FIBO pipelines...
πŸ“¦ Loading FIBO-VLM (prompt-to-JSON)...
βœ… VLM loaded
πŸ“¦ Loading FIBO-8B (image generation)...
βœ… FIBO on GPU: Tesla T4
πŸŽ‰ FIBO Ready!

[Generate button clicked]
πŸ“ Prompt: studio product shot...
πŸ”„ Generating structured JSON prompt...
βœ… JSON prompt: 1247 chars
🎨 Generating 4 image(s) (28 steps, 1024x1024)...
βœ… Done in 15.3s
[Real images displayed!]

🎯 Quick Checklist

Before GPU:

  • Space shows "Mock mode" message
  • Placeholder beige images
  • Logs show "CUDA is not available"

After GPU:

  • No "Mock mode" message
  • Real generated images
  • Logs show "FIBO on GPU: Tesla T4"
  • Generation takes 10-20 seconds

πŸ’‘ Tips

  1. First generation: Takes ~3-5 minutes (model download)
  2. Subsequent: Takes ~10-20 seconds (fast!)
  3. Free tier: T4 GPU is free with Hugging Face Community account
  4. Persistent storage: Enable for faster restarts (optional)

πŸ†˜ Still Having Issues?

If you enabled GPU but still see mock mode:

  1. Check logs for specific error (ujson, boltons, etc.)
  2. Wait 3-5 minutes for models to download on first run
  3. Restart Space if it's stuck
  4. Check disk space (~20GB needed for models)

πŸ“š Resources


TL;DR: Go to Settings β†’ Hardware β†’ Select "GPU basic (T4)" β†’ Save β†’ Wait 2 min β†’ FIBO will work! πŸš€