Skip to content

Add opt-in PiD memory optimizations - #9460

Open
JPPhoto wants to merge 5 commits into
invoke-ai:mainfrom
JPPhoto:pid-optimization
Open

Add opt-in PiD memory optimizations#9460
JPPhoto wants to merge 5 commits into
invoke-ai:mainfrom
JPPhoto:pid-optimization

Conversation

@JPPhoto

@JPPhoto JPPhoto commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds opt-in PiD memory optimizations for GPUs with limited VRAM.

When pid_memory_optimization: true is set in invokeai.yaml, PiD uses float32 sampler intermediates and chunks full-resolution PiT activations. The option applies to every supported PiD decoder. It defaults to false, preserving existing behavior.

Chunking is configured per decode call so cached PiD models cannot retain optimization state between requests.

This PR adds backend tests, generated configuration types, the complete generated settings entry, and PiD/low-VRAM documentation.

Related Issues / Discussions

QA Instructions

  1. Add pid_memory_optimization: true to invokeai.yaml.
  2. Restart InvokeAI.
  3. Run a PiD decode and confirm it completes with reduced peak VRAM.
  4. Remove the setting or set it to false, restart, and confirm the original unchunked path is used.

Merge Plan

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@JPPhoto
JPPhoto requested a review from blessedcoolant as a code owner August 4, 2026 22:17
@JPPhoto JPPhoto added the 6.14.0 label Aug 4, 2026
@JPPhoto JPPhoto moved this to 6.14.x Theme: USER EXPERIENCE in Invoke - Community Roadmap Aug 4, 2026
@github-actions github-actions Bot added python PRs that change python files invocations PRs that change invocations backend PRs that change backend files services PRs that change app services frontend PRs that change frontend files python-tests PRs that change python tests docs PRs that change docs labels Aug 4, 2026
@JPPhoto JPPhoto changed the title Add opt-in PiD optimizations Add opt-in PiD memory optimizations Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.14 Nice-to-Have 6.14.0 backend PRs that change backend files docs PRs that change docs frontend PRs that change frontend files invocations PRs that change invocations python PRs that change python files python-tests PRs that change python tests services PRs that change app services

Projects

Status: 6.14.x Theme: USER EXPERIENCE

Development

Successfully merging this pull request may close these issues.

2 participants