Skip to content

Fix graph execution state resume after JSON round-trip#9042

Open
JPPhoto wants to merge 1 commit intoinvoke-ai:mainfrom
JPPhoto:resume-graph-execution-state
Open

Fix graph execution state resume after JSON round-trip#9042
JPPhoto wants to merge 1 commit intoinvoke-ai:mainfrom
JPPhoto:resume-graph-execution-state

Conversation

@JPPhoto
Copy link
Copy Markdown
Collaborator

@JPPhoto JPPhoto commented Apr 10, 2026

Summary

Fix a graph execution resume bug in invokeai/app/services/shared/graph.py where GraphExecutionState could stall after model_dump_json() / validate_json() on a partially executed session. The fix rehydrates runtime scheduler state for already-materialized exec nodes after deserialization, and adds a regression test covering partial execution, JSON round-trip, and successful completion.

Related Issues / Discussions

QA Instructions

  • Run pytest tests/test_graph_execution_state.py
  • Confirm the new round-trip resume test passes
  • Confirm a partially executed graph can be serialized, deserialized, and then finished without next() stalling
  • Run ruff check --fix invokeai tests scripts
  • Run ruff format invokeai tests scripts

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)

@github-actions github-actions bot added python PRs that change python files services PRs that change app services python-tests PRs that change python tests labels Apr 10, 2026
@JPPhoto JPPhoto force-pushed the resume-graph-execution-state branch 3 times, most recently from 07e160a to 85df41d Compare April 14, 2026 00:39
@lstein lstein self-assigned this Apr 14, 2026
@JPPhoto JPPhoto force-pushed the resume-graph-execution-state branch from 902db0d to e86c59b Compare April 14, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python PRs that change python files python-tests PRs that change python tests services PRs that change app services

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants