moose Claude Opus 4.5 commited on
Commit
bca4977
·
1 Parent(s): 07e1710

Fix device mismatch during AOT compilation warmup

Browse files

Move text encoder offloading inside optimize_pipeline_() to happen
AFTER the warmup pass but BEFORE torch.export. This ensures:
1. Warmup run has all components on GPU (avoids CPU/CUDA mismatch)
2. torch.export has reduced memory (text encoder on CPU)
3. Text encoder returns to GPU after compilation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

2 files changed +18 -11
Files changed (2)
app.py+1-9
optimization.py+17-2