DawnC commited on
Commit
b3626fc
·
verified ·
1 Parent(s): be779a5

Upload VideoEngine_optimized.py

Browse files
Files changed (1) hide show
  1. VideoEngine_optimized.py +6 -21
VideoEngine_optimized.py CHANGED
@@ -149,27 +149,12 @@ class VideoEngine:
149
  print(f"⚠ Quantization failed: {e}")
150
  raise RuntimeError("FP8 quantization required for this optimized version")
151
 
152
- # Stage 4: Load AOTI blocks
153
- print("→ [4/5] Loading AOTI blocks...")
154
- try:
155
- import aoti
156
-
157
- aoti.aoti_blocks_load(
158
- self.pipeline.transformer,
159
- 'zerogpu-aoti/Wan2',
160
- variant='fp8da'
161
- )
162
- aoti.aoti_blocks_load(
163
- self.pipeline.transformer_2,
164
- 'zerogpu-aoti/Wan2',
165
- variant='fp8da'
166
- )
167
- print("✓ AOTI blocks loaded (1.5-1.8x speedup)")
168
- self.use_aoti = True
169
- except Exception as e:
170
- print(f"⚠ AOTI loading failed: {e}")
171
- print(" Continuing without AOTI (FP8 only)")
172
- self.use_aoti = False
173
 
174
  # Stage 5: Move to GPU and enable optimizations
175
  print("→ [5/5] Moving to GPU...")
 
149
  print(f"⚠ Quantization failed: {e}")
150
  raise RuntimeError("FP8 quantization required for this optimized version")
151
 
152
+ # Stage 4: AOTI blocks (currently disabled for stability)
153
+ print("→ [4/5] Skipping AOTI (using FP8 only for stability)...")
154
+ # AOTI can cause runtime errors with certain PyTorch versions
155
+ # FP8 quantization alone provides excellent performance
156
+ self.use_aoti = False
157
+ print("✓ Using FP8 quantization only (stable and fast)")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
 
159
  # Stage 5: Move to GPU and enable optimizations
160
  print("→ [5/5] Moving to GPU...")