File size: 8,352 Bytes
78360e7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
# Troubleshooting Guide

This guide covers common issues and their solutions when using WanGP.

## Installation Issues

### PyTorch Installation Problems

#### CUDA Version Mismatch
**Problem**: PyTorch can't detect GPU or CUDA errors
**Solution**: 
```bash

# Check your CUDA version

nvidia-smi



# Install matching PyTorch version

# For CUDA 12.4 (RTX 10XX-40XX)

pip install torch==2.6.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cu124



# For CUDA 12.8 (RTX 50XX)

pip install torch==2.7.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cu128

```

#### Python Version Issues
**Problem**: Package compatibility errors
**Solution**: Ensure you're using Python 3.10.9
```bash

python --version  # Should show 3.10.9

conda create -n wan2gp python=3.10.9

```

### Dependency Installation Failures

#### Triton Installation (Windows)
**Problem**: `pip install triton-windows` fails
**Solution**:
1. Update pip: `pip install --upgrade pip`
2. Try pre-compiled wheel
3. Fallback to SDPA attention: `python wgp.py --attention sdpa`

#### SageAttention Compilation Issues
**Problem**: SageAttention installation fails
**Solution**:
1. Install Visual Studio Build Tools (Windows)
2. Use pre-compiled wheels when available
3. Fallback to basic attention modes

## Memory Issues

### CUDA Out of Memory

#### During Model Loading
**Problem**: "CUDA out of memory" when loading model
**Solutions**:
```bash

# Use smaller model

python wgp.py --t2v-1-3B



# Enable quantization (usually default)

python wgp.py --quantize-transformer True



# Use memory-efficient profile

python wgp.py --profile 4



# Reduce preloaded model size

python wgp.py --preload 0

```

#### During Video Generation
**Problem**: Memory error during generation
**Solutions**:
1. Reduce frame count (shorter videos)
2. Lower resolution in advanced settings
3. Use lower batch size
4. Clear GPU cache between generations

### System RAM Issues

#### High RAM Usage
**Problem**: System runs out of RAM
**Solutions**:
```bash

# Limit reserved memory

python wgp.py --perc-reserved-mem-max 0.3



# Use minimal RAM profile

python wgp.py --profile 5



# Enable swap file (OS level)

```

## Performance Issues

### Slow Generation Speed

#### General Optimization
```bash

# Enable compilation (requires Triton)

python wgp.py --compile



# Use faster attention

python wgp.py --attention sage2



# Enable TeaCache

python wgp.py --teacache 2.0



# Use high-performance profile

python wgp.py --profile 3

```

#### GPU-Specific Optimizations

**RTX 10XX/20XX Series**:
```bash

python wgp.py --attention sdpa --profile 4 --teacache 1.5

```

**RTX 30XX/40XX Series**:
```bash

python wgp.py --compile --attention sage --profile 3 --teacache 2.0

```

**RTX 50XX Series**:
```bash

python wgp.py --attention sage --profile 4 --fp16

```

### Attention Mechanism Issues

#### Sage Attention Not Working
**Problem**: Sage attention fails to compile or work
**Diagnostic Steps**:
1. Check Triton installation:
   ```python

   import triton

   print(triton.__version__)

   ```
2. Clear Triton cache:
   ```bash

   # Windows

   rmdir /s %USERPROFILE%\.triton

   # Linux

   rm -rf ~/.triton

   ```
3. Fallback solution:
   ```bash

   python wgp.py --attention sdpa

   ```

#### Flash Attention Issues
**Problem**: Flash attention compilation fails
**Solution**: 
- Windows: Often requires manual CUDA kernel compilation
- Linux: Usually works with `pip install flash-attn`
- Fallback: Use Sage or SDPA attention

## Model-Specific Issues

### Lora Problems

#### Loras Not Loading
**Problem**: Loras don't appear in the interface
**Solutions**:
1. Check file format (should be .safetensors, .pt, or .pth)
2. Verify correct directory:
   ```

   loras/          # For t2v models

   loras_i2v/      # For i2v models

   loras_hunyuan/  # For Hunyuan models

   ```
3. Click "Refresh" button in interface
4. Use `--check-loras` to filter incompatible files

#### Lora Compatibility Issues
**Problem**: Lora causes errors or poor results
**Solutions**:
1. Check model size compatibility (1.3B vs 14B)
2. Verify lora was trained for your model type
3. Try different multiplier values
4. Use `--check-loras` flag to auto-filter

### VACE-Specific Issues

#### Poor VACE Results
**Problem**: VACE generates poor quality or unexpected results
**Solutions**:
1. Enable Skip Layer Guidance
2. Use detailed prompts describing all elements
3. Ensure proper mask creation with Matanyone
4. Check reference image quality
5. Use at least 15 steps, preferably 30+

#### Matanyone Tool Issues
**Problem**: Mask creation difficulties
**Solutions**:
1. Use negative point prompts to refine selection
2. Create multiple sub-masks and combine them
3. Try different background removal options
4. Ensure sufficient contrast in source video

## Network and Server Issues

### Gradio Interface Problems

#### Port Already in Use
**Problem**: "Port 7860 is already in use"
**Solution**:
```bash

# Use different port

python wgp.py --server-port 7861



# Or kill existing process

# Windows

netstat -ano | findstr :7860

taskkill /PID <PID> /F



# Linux

lsof -i :7860

kill <PID>

```

#### Interface Not Loading
**Problem**: Browser shows "connection refused"
**Solutions**:
1. Check if server started successfully
2. Try `http://127.0.0.1:7860` instead of `localhost:7860`
3. Disable firewall temporarily
4. Use `--listen` flag for network access

### Remote Access Issues

#### Sharing Not Working
**Problem**: `--share` flag doesn't create public URL
**Solutions**:
1. Check internet connection
2. Try different network
3. Use `--listen` with port forwarding
4. Check firewall settings

## Quality Issues

### Poor Video Quality

#### General Quality Improvements
1. Increase number of steps (25-30+)
2. Use larger models (14B instead of 1.3B)
3. Enable Skip Layer Guidance
4. Improve prompt descriptions
5. Use higher resolution settings

#### Specific Quality Issues

**Blurry Videos**:
- Increase steps
- Check source image quality (i2v)
- Reduce TeaCache multiplier
- Use higher guidance scale

**Inconsistent Motion**:
- Use longer overlap in sliding windows
- Reduce window size
- Improve prompt consistency
- Check control video quality (VACE)

**Color Issues**:
- Check model compatibility
- Adjust guidance scale
- Verify input image color space
- Try different VAE settings

## Advanced Debugging

### Enable Verbose Output
```bash

# Maximum verbosity

python wgp.py --verbose 2



# Check lora compatibility

python wgp.py --check-loras --verbose 2

```

### Memory Debugging
```bash

# Monitor GPU memory

nvidia-smi -l 1



# Reduce memory usage

python wgp.py --profile 4 --perc-reserved-mem-max 0.2

```

### Performance Profiling
```bash

# Test different configurations

python wgp.py --attention sdpa --profile 4  # Baseline

python wgp.py --attention sage --profile 3  # Performance

python wgp.py --compile --teacache 2.0      # Maximum speed

```

## Getting Help

### Before Asking for Help
1. Check this troubleshooting guide
2. Read the relevant documentation:
   - [Installation Guide](INSTALLATION.md)
   - [Getting Started](GETTING_STARTED.md)
   - [Command Line Reference](CLI.md)
3. Try basic fallback configuration:
   ```bash

   python wgp.py --attention sdpa --profile 4

   ```

### Community Support
- **Discord Server**: https://discord.gg/g7efUW9jGV
- Provide relevant information:
  - GPU model and VRAM amount
  - Python and PyTorch versions
  - Complete error messages
  - Command used to launch WanGP
  - Operating system

### Reporting Bugs
When reporting issues:
1. Include system specifications
2. Provide complete error logs
3. List the exact steps to reproduce
4. Mention any modifications to default settings
5. Include command line arguments used

## Emergency Fallback

If nothing works, try this minimal configuration:
```bash

# Absolute minimum setup

python wgp.py --t2v-1-3B --attention sdpa --profile 4 --teacache 0 --fp16



# If that fails, check basic PyTorch installation

python -c "import torch; print(torch.cuda.is_available())"

```