A newer version of the Gradio SDK is available:
6.0.1
MIMO HuggingFace Spaces - Fix Summary
Issues Fixed β
1. "Load Model" Button Not Working
Problem: After clicking "Setup Models" successfully, clicking "Load Model" showed "β οΈ Models not found"
Root Cause:
_check_existing_models()was checking for simple directory paths like./models/stable-diffusion-v1-5- Actual HuggingFace cache uses complex structure:
./models/stable-diffusion-v1-5/models--runwayml--stable-diffusion-v1-5/snapshots/[hash]/
Solution:
- Updated
_check_existing_models()to detect HuggingFace cache patterns - Looks for
models--org--namedirectories usingrglob()pattern matching - Sets
_model_cache_valid = Trueafter successful download - Re-checks cache validity when "Load Model" is clicked
2. UI Text Visibility (White on White)
Problem: All text appeared white on white background, making it unreadable
Solution: Added !important flag to all CSS color declarations to override Gradio's defaults
- Headers:
color: #2c3e50 !important - Body text:
color: #495057 !important - Links:
color: #3498db !important
3. Model Persistence
Problem: Models seemed to disappear after page refresh
Solution:
- Models actually persist in HuggingFace cache
- Added "β‘ Load Model" button for quick reactivation (30-60 sec vs 10+ min)
- Status message confirms: "β Model files found in cache - models persist across restarts!"
How It Works Now β
First Time Setup:
- Click "π§ Setup Models" (downloads ~8GB, takes 5-10 min)
- Models automatically load after download
- Status: "π MIMO is ready! Models loaded successfully..."
After Page Refresh:
- On page load, system checks for cached models
- If found, shows: "β Found X model components in cache"
- Click "β‘ Load Model" to activate (30-60 seconds)
- Status: "β Model loaded successfully! Ready to generate videos..."
Model States:
- Not Downloaded: Need to click "Setup Models"
- Downloaded but Not Loaded: Click "Load Model"
- Already Loaded: Shows "β Model already loaded and ready!"
Status Messages Guide
| Message | Meaning | Action |
|---|---|---|
| "β οΈ Models not found in cache" | No models downloaded yet | Click "π§ Setup Models" |
| "β Found X model components in cache" | Models downloaded, ready to load | Click "β‘ Load Model" |
| "β Model already loaded and ready!" | Already active | Start generating! |
| "π MIMO is ready! Models loaded..." | Setup complete, models loaded | Start generating! |
Template Upload Status
Uploaded (3/11):
- β dance_indoor_1
- β sports_basketball_gym
- β movie_BruceLee1
Pending Upload (8/11):
- β³ shorts_kungfu_desert1
- β³ shorts_kungfu_match1
- β³ sports_nba_dunk
- β³ sports_nba_pass
- β³ parkour_climbing
- β³ syn_basketball_06_13
- β³ syn_dancing2_00093_irish_dance
- β³ syn_football_10_05
Upload Command:
# Install required package first
pip3 install huggingface_hub
# Upload remaining templates
python3 upload_templates_to_hf.py --templates \
shorts_kungfu_desert1 \
shorts_kungfu_match1 \
sports_nba_dunk \
sports_nba_pass \
parkour_climbing \
syn_basketball_06_13 \
syn_dancing2_00093_irish_dance \
syn_football_10_05
Testing Checklist
Fresh Page Load:
- Check console for "β Found X model components in cache"
- UI text is visible (dark text on light background)
First Time Setup (if models not downloaded):
- Click "π§ Setup Models"
- Wait for download (~5-10 min)
- Check status: "π MIMO is ready! Models loaded successfully..."
- Models should be ready to use immediately
After Page Refresh (models already downloaded):
- Page loads, shows cache found message
- Click "β‘ Load Model"
- Wait 30-60 seconds
- Check status: "β Model loaded successfully!"
Template Operations:
- Click "π Refresh Templates"
- Dropdown shows available templates
- Select template from dropdown
Video Generation:
- Upload character image
- Select template
- Choose mode (animate/edit)
- Click "π¬ Generate Video"
- Wait 2-5 minutes
- Video appears in output
Known Behavior
β Expected:
- Models persist in cache across page refreshes
- Need to click "Load Model" after refresh (one-time per session)
- Template upload takes 10-20 minutes for all 8 remaining
- First video generation may take longer (model warmup)
β οΈ Limitations:
- ZeroGPU has quota limits for unlogged users
- Large templates increase storage usage
- Generation time varies with template length
Files Modified
app_hf_spaces.py:
_check_existing_models()- Fixed cache detectiondownload_models()- Sets cache validity flag- CSS styles - Added
!importantto all colors load_model_only()- Re-checks cache, better messagessetup_models()- Clearer success message
Created:
upload_templates_to_hf.py- Template upload scriptUPLOAD_TEMPLATES_INSTRUCTIONS.md- Upload guideFIX_SUMMARY.md- This document
Next Steps
Push fixes to HuggingFace:
git push hf deploy-clean-v2:mainUpload remaining templates (optional):
python3 upload_templates_to_hf.py --templates [template_names]Test on HuggingFace Spaces:
- https://huggingface.co/spaces/minhho/mimo-1.0
- Follow testing checklist above
Monitor logs for any new issues
Support
If issues persist:
- Check HuggingFace Spaces logs tab
- Verify model files exist in cache
- Try "Setup Models" again to re-download
- Check ZeroGPU quota (may need to login)
Last Updated: 2025-10-06 Status: β All fixes complete, ready to deploy