Skip to content

M10: ProcessingRunner skeleton#17332

Closed
m-cahill wants to merge 101 commits intoAUTOMATIC1111:masterfrom
m-cahill:m10-processing-runner
Closed

M10: ProcessingRunner skeleton#17332
m-cahill wants to merge 101 commits intoAUTOMATIC1111:masterfrom
m-cahill:m10-processing-runner

Conversation

@m-cahill
Copy link

Phase III — Runner & Service Boundary

Introduces ProcessingRunner abstraction as unified execution entrypoint.

Changes:

  • \modules/runtime/runner.py\ — ProcessingRunner, ProcessingRequest
  • \process_images\ delegates through runner (internal only)
  • \ est/quality/test_processing_runner.py\ — contract test

Invariants: Behavior-preserving. Zero blast radius. All callers (UI/API/scripts) unchanged.

Ref: docs/milestones/M10/M10_plan.md

Made with Cursor

m-cahill added 30 commits March 6, 2026 19:17
- docs/serena.md: Living ledger, phase map, invariants, milestone table
- docs/milestones/M00/: M00_plan, preflight, e2e_baseline, ci_inventory, toolcalls
- scripts/dev/: run_m00_baseline_e2e.ps1, .sh (thin verification helpers)
- Baseline tag baseline-pre-refactor created on 82a973c

No runtime/structural changes. Behavior-preserving docs and verification only.

Made-with: Cursor
- Add Invariant Registry and Serena Refactor Principles to serena.md
- Create M00_run1.md, M00_summary.md, M00_audit.md
- Update milestone ledger: M00 Completed
- Document CI evidence (Linter pass; Tests fail pre-existing)

Made-with: Cursor
…irmation

- Update ledger with CI run IDs 22794525690 (Linter ✓), 22794525698 (Tests ✗)
- Refresh M00_summary.md and M00_audit.md per governance closeout
- Add M00_run2.md (latest CI analysis)

Made-with: Cursor
- Remove same-repo PR skip condition (CI runs on all PRs)
- Install setuptools before env setup; add --do-not-download-clip
- Add pip-audit (non-blocking) before environment setup
- Add smoke startup step (verify app boots before full tests)
- Add --cov-fail-under=60 coverage threshold
- Pin GitHub Actions to commit SHAs
- Add .gitattributes for CRLF/LF normalization
- Add M01 plan and toolcalls ledger

Made-with: Cursor
Fixes pkg_resources in pip's isolated build env. Build-time fix only.

Made-with: Cursor
CLIP fix worked. Git clone of Stability-AI fails without auth.
Add token-based URLs for Stability-AI repos.

Made-with: Cursor
- Add --exit handling when --skip-prepare-environment (launch.py)
- Setup: python launch.py --skip-prepare-environment --skip-torch-cuda-test --exit
- Smoke: python launch.py --skip-prepare-environment --skip-torch-cuda-test --test-server --use-cpu all --exit

CI no longer depends on external git clones. Requires repositories cache to be seeded.

Made-with: Cursor
Fixes ModuleNotFoundError: torch when using --skip-prepare-environment.
Repositories still required from cache for paths.py.

Made-with: Cursor
- Create scripts/dev/create_stub_repos.py to satisfy paths.py assertion
  and import chain without cloning external repos
- Add Create stub repositories step before Setup environment in run_tests
- Remove Cache repositories step (stubs are deterministic, no network)

Made-with: Cursor
…onditioner stubs; M01_run3 and M01_summary

Made-with: Cursor
…Denoiser, BrownianTreeNoiseSampler, trange)

Made-with: Cursor
m-cahill added 27 commits March 9, 2026 22:41
- Add modules/prompt_seed_prep.py with prepare_prompt_seed_state(p)
- Replace inline all_seeds/all_subseeds logic in process_images_inner
- Mutate p.seed/p.subseed before call; prepare_prompt_seed_state writes to p
- Behavior-preserving: fill_fields_from_opts, setup_prompts unchanged
- Phase II runtime seam preparation

Made-with: Cursor
docs(M06): closeout — audit, summary, ledger
- Add modules/opts_snapshot.py with create_opts_snapshot(opts)
- Capture snapshot in process_images_inner after prepare_prompt_seed_state
- Full shallow copy of opts.data via SimpleNamespace
- No runtime behavior change; snapshot write-only for M07

Made-with: Cursor
M07: Opts snapshot introduction
docs(M07): closeout — run2, audit, summary, ledger, M08 seed
…reads

- Replace opts.foo with p.opts_snapshot.foo for safe read-only settings
- Migrated: save_images_before_face_restoration, save_images_before_color_correction,
  samples_format, return_mask, save_mask, return_mask_composite, save_mask_composite,
  grid_only_if_multiple, return_grid, grid_save, grid_format, grid_extended_filename
- Leave save_samples(), sample_hr_pass(), create_infotext(), metadata on shared.opts
- Behavior-preserving; no change to save paths or naming

Made-with: Cursor
M08: Opts Snapshot Threading (continued)
…mpt and RefactorSummaryPrompt

Made-with: Cursor
docs(M08): closeout — run2, audit, summary, ledger, M09 seed
Made-with: Cursor
- Add modules/runtime_context.py with RuntimeContext dataclass
- Attach p.runtime_context in process_images_inner() after opts_snapshot
- Write-only: no migration of shared.* reads yet
- Completes Phase II runtime seam preparation

Made-with: Cursor
M09: Execution Context Introduction
- Add modules/runtime/runner.py with ProcessingRunner and ProcessingRequest
- Wire process_images to delegate through runner (internal only)
- Add test/quality/test_processing_runner.py contract test

Behavior-preserving. Zero blast radius. All callers unchanged.

Made-with: Cursor
@m-cahill m-cahill requested a review from AUTOMATIC1111 as a code owner March 12, 2026 04:50
@m-cahill m-cahill closed this Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant