laloadrianmorales commited on
Commit
b6cb46d
·
verified ·
1 Parent(s): d836bef

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +81 -11
README.md CHANGED
@@ -1,14 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
- title: Matrix Game 2
3
- emoji: 🌖
4
- colorFrom: gray
5
- colorTo: pink
6
- sdk: gradio
7
- sdk_version: 5.43.1
8
- app_file: app.py
9
- pinned: false
10
- license: mit
11
- short_description: Matrix-Game-2 Demo by SkyWorldAI
 
12
  ---
13
 
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
+ # Matrix-Game-2.0 Hugging Face Space Setup
2
+
3
+ ## 🚀 Quick Setup Guide
4
+
5
+ ### 1. **Create the Space**
6
+ - Go to [Hugging Face Spaces](https://huggingface.co/spaces)
7
+ - Click "Create new Space"
8
+ - Choose **Gradio** as the SDK
9
+ - **IMPORTANT**: Set Hardware to **GPU (A100)** - this is crucial!
10
+
11
+ ### 2. **Upload Files**
12
+ Upload these three files to your Space:
13
+
14
+ 1. **app.py** - The main application (use the clean version provided)
15
+ 2. **requirements.txt** - Dependencies list (properly formatted)
16
+ 3. **README.md** - This file (optional)
17
+
18
+ ### 3. **Space Configuration**
19
+ In your Space settings, ensure:
20
+ - **SDK**: Gradio
21
+ - **Hardware**: A100 GPU (required!)
22
+ - **Visibility**: Public or Private (your choice)
23
+
24
+ ### 4. **Key Improvements Made**
25
+
26
+ #### ✅ **Fixed Issues:**
27
+ - Proper requirements.txt formatting (each dependency on new line)
28
+ - Added missing dependencies (opencv, xformers, etc.)
29
+ - Used `@spaces.GPU` decorator for proper GPU allocation
30
+ - Simplified model downloading and setup
31
+ - Added proper error handling and timeouts
32
+ - Reduced frame limits for HF Spaces constraints
33
+
34
+ #### ✅ **HF Spaces Optimizations:**
35
+ - Pre-download model weights efficiently
36
+ - Use temporary directories properly
37
+ - Clean up resources after generation
38
+ - Progress indicators for user feedback
39
+ - GPU memory management
40
+
41
+ ### 5. **Usage Tips**
42
+ - **First run**: Will take 2-3 minutes to download model (~10GB)
43
+ - **Subsequent runs**: Much faster (model cached)
44
+ - **Recommended**: 25-75 frames for reasonable generation time
45
+ - **Input images**: Works best with landscapes/scenes, max 512px
46
+
47
+ ### 6. **Troubleshooting**
48
+
49
+ #### If you get "CUDA out of memory":
50
+ - Reduce number of frames (try 25-50)
51
+ - Use smaller input images
52
+ - Restart the Space
53
+
54
+ #### If model download fails:
55
+ - Check internet connection in Space logs
56
+ - Verify you're using A100 GPU hardware
57
+ - Try restarting the Space
58
+
59
+ #### If generation is slow:
60
+ - This is normal! Video generation is compute-intensive
61
+ - A100 GPU should handle 50 frames in ~2-3 minutes
62
+ - Consider reducing frames for faster results
63
+
64
+ ### 7. **Expected Performance**
65
+ - **Model download**: 2-3 minutes (first time only)
66
+ - **25 frames**: ~1 minute generation
67
+ - **50 frames**: ~2-3 minutes generation
68
+ - **75+ frames**: 4-5+ minutes generation
69
+
70
  ---
71
+
72
+ ## 🎮 What is Matrix-Game-2.0?
73
+
74
+ Matrix-Game-2.0 is an interactive world foundation model that generates real-time video content based on input images. It uses advanced diffusion techniques to create dynamic, controllable video sequences that respond to user interactions.
75
+
76
+ **Key Features:**
77
+ - Real-time video generation (up to 25 FPS)
78
+ - Interactive control through keyboard/mouse inputs
79
+ - Long video generation capability
80
+ - Fine-grained scene control and evolution
81
+
82
  ---
83
 
84
+ *Built with ❤️ for the Hugging Face community*