refactor: optimize audio encoding logic with caching enhancements#446
refactor: optimize audio encoding logic with caching enhancements#446
Conversation
- Improved efficiency by implementing a caching mechanism for VAE audio encoding, allowing reuse of encoded latents for identical audio inputs. - Introduced a reference audio cache to prevent unnecessary re-encoding for shared reference audio across batch items. - Updated logging to provide clarity on the reuse of cached latents. Files changed: - acestep/handler.py: modified audio encoding logic to incorporate caching
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThe PR extends GPU tier configuration with new public APIs and UI-friendly metadata (labels, choices, device name retrieval), adds a Gradio tier override dropdown with associated event handlers, updates backend defaults across tiers from restrictive to permissive with vllm as recommended, introduces MPS-specific overrides, refines VRAM gating logic, and adds internationalization strings supporting the new UI. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Dropdown as Tier Dropdown
participant Handler as on_tier_change Handler
participant Config as GPU Config
participant Backend as Backend Selector
participant UI as Gradio Components
User->>Dropdown: Selects tier
Dropdown->>Handler: Trigger tier change event
Handler->>Config: get_gpu_config_for_tier(tier)
Config->>Config: Apply MPS overrides if on macOS
Config->>Handler: Return GPUConfig
Handler->>Handler: set_global_gpu_config()
Handler->>Backend: Compute available backends<br/>& LM models
Backend->>Handler: Return choices & default model
Handler->>UI: Update backend dropdown<br/>Update model selector<br/>Update batch size<br/>Update duration<br/>Update GPU info
UI->>User: Display reconfigured UI
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Files changed:
Summary by CodeRabbit
New Features
Bug Fixes
Chores