Commit graph

602 commits

Author SHA1 Message Date
Michael Cahill
59e46fa069 M10: ProcessingRunner skeleton
- 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
2026-03-11 21:50:25 -07:00
Michael Cahill
372e0673f3 feat(M09): introduce RuntimeContext and attach to processing object
- 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
2026-03-11 20:06:35 -07:00
Michael Cahill
be214f4eda M08: Thread opts_snapshot into process_images_inner for save-related 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
2026-03-11 19:43:06 -07:00
Michael Cahill
87c8fe8651 M07: Opts snapshot introduction
- 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
2026-03-10 00:33:55 -07:00
Michael Cahill
92fbf62319 M06: Extract prompt/seed prep to prompt_seed_prep.py
- 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
2026-03-09 23:15:47 -07:00
Michael Cahill
5fe8245957 M05: Override isolation / temporary opts seam
- Add modules/runtime_utils.py with temporary_opts context manager
- Refactor process_images() to use temporary_opts for override application
- Preserve opts.set(is_api=True, run_callbacks=False) and setattr restore
- Add test/quality/test_opts_override.py (samples_save, restore_afterwards)
- Model/VAE reload and token merging remain in process_images per decisions

Made-with: Cursor
2026-03-09 14:14:13 -07:00
AUTOMATIC1111
d67348a0a5 allow generation to be started with any dimensions specified 2024-06-28 18:06:49 +03:00
AUTOMATIC1111
0b64633584 fix img2img 2024-06-28 09:23:41 +03:00
AUTOMATIC1111
5b2a60b8e2 initial SD3 support 2024-06-16 08:04:31 +03:00
huchenlei
17e846150c Add process_before_every_sampling hook 2024-06-09 23:06:28 -04:00
AUTOMATIC1111
57e6d05a43 added tool for profiling code 2024-06-09 21:18:36 +03:00
AUTOMATIC1111
6214aa7d2a performance: check for nans in unet only once, after all steps have been completed 2024-06-09 16:24:04 +03:00
huchenlei
d875cda565 Fix sdxl inpaint 2024-06-08 22:11:11 -04:00
AUTOMATIC1111
6450d24afe
Merge pull request #15806 from huchenlei/inpaint_fix
[Performance 4/6] Precompute is_sdxl_inpaint flag
2024-06-08 11:06:39 +03:00
AUTOMATIC1111
c3c90deec0
Merge pull request #15681 from AUTOMATIC1111/fix_p_invalid_sampler_and_scheduler
more old sampler scheduler compatibility
2024-06-08 10:42:42 +03:00
AUTOMATIC1111
5429e4cff5 add proper infotext support for #15607
fix settings override not working for NGMI, s_churn, etc...
2024-06-08 09:56:09 +03:00
NouberNou
53f62674ae
Typo on edit
Edited in fix in Github editor and mistyped from local copy
2024-06-06 16:30:01 -07:00
NouberNou
25bbf31f57
Fix for grids without comprehensive infotexts
When generating grids, some scripts such as img2img loopback and ultimate SD upscale do not pass infotexts for each image since they are the same prompt.

If you attempt to save those images using the saved button in the UI it will fail because it will look for the selected image info text. This fixes those errors by replicating the infotext for as many images are passed into the image list if the infotext parameter is none.
2024-06-06 16:22:49 -07:00
huchenlei
6a48476502 Fix flag check for SD15 2024-05-15 16:54:26 -04:00
huchenlei
9eb2f78631 Precompute is_sdxl_inpaint flag 2024-05-15 16:32:29 -04:00
w-e-w
5d5224b322 fix_p_invalid_sampler_and_scheduler 2024-05-02 02:25:16 +09:00
w-e-w
6c7c176dc9 fix mistake in #15583 2024-04-22 00:10:49 +09:00
w-e-w
db263df5d5 get_crop_region_v2 2024-04-21 19:34:11 +09:00
AUTOMATIC1111
449bc7bcf3
Merge pull request #15534 from storyicon/fix-masking
Fix images do not match / Coordinate 'right' is less than 'left'
2024-04-21 07:06:45 +03:00
storyicon
71314e47b1 feat:compatible with inconsistent/empty mask
Signed-off-by: storyicon <storyicon@foxmail.com>
2024-04-18 11:59:25 +00:00
storyicon
0980fdfe8c fix: images do not match
Signed-off-by: storyicon <storyicon@foxmail.com>
2024-04-16 07:35:33 +00:00
w-e-w
e3aabe6959 add documentation for create_infotext 2024-04-08 20:14:02 +09:00
w-e-w
1e1176b6eb non-serializable as None 2024-04-08 18:18:33 +09:00
w-e-w
219e64489c re-work extra_generation_params for Hires prompt 2024-04-08 18:18:13 +09:00
w-e-w
47ed9b2d39 allow list or callables in generation_params 2024-04-08 01:39:31 +09:00
w-e-w
6efdfe3234 if use use_main_prompt index = 0 2024-04-07 22:58:12 +09:00
AUTOMATIC1111
9aa9e980a9 support scheduler selection in hires fix 2024-03-24 11:00:16 +03:00
kaalibro
f3ca6a92ad
Fix for #15333
- Fix "X/Y/Z plot" not working with "Schedule type"
- Fix "Schedule type" not being saved to "params.txt"
2024-03-23 00:50:37 +05:00
AUTOMATIC1111
ac9aa44cb8 do not add 'Automatic' to infotext 2024-03-20 10:27:53 +03:00
AUTOMATIC1111
25cd53d775 scheduler selection in main UI 2024-03-20 09:17:11 +03:00
w-e-w
887a512208 fix issue with Styles when Hires prompt is used 2024-03-15 21:06:54 +09:00
10sa
c50b7e4eff Add '--no-prompt-history' cmd args for disable last generation prompt history 2024-03-09 11:43:49 +09:00
catboxanon
ed386c84b6
Fix emphasis infotext missing from params.txt 2024-03-05 11:53:36 -05:00
AUTOMATIC1111
28bc85a20a Merge pull request #14979 from drhead/refiner_cumprod_fix
Protect alphas_cumprod during refiner switchover
2024-03-02 06:54:55 +03:00
drhead
94f23d00a7
move alphas cumprod override out of processing 2024-02-26 23:44:58 -05:00
AUTOMATIC1111
140d58b512 Merge pull request #14966 from light-and-ray/avoid_doble_upscaling_in_inpaint
[bug] avoid doble upscaling in inpaint
2024-02-19 18:06:16 +03:00
Andray
33c8fe1221 avoid doble upscaling in inpaint 2024-02-19 16:57:49 +04:00
AUTOMATIC1111
e2b19900ec add infotext entry for emphasis; put emphasis into a separate file, add an option to parse but still ignore emphasis 2024-02-11 09:39:51 +03:00
AUTOMATIC1111
de5a8c5cb4 add an option to not overlay original image for inpainting for #14727 2024-01-23 22:19:38 +03:00
w-e-w
e36827af32 improve get_crop_region 2024-01-21 09:02:18 +09:00
AUTOMATIC1111
41c2121e51
Merge pull request #14657 from AUTOMATIC1111/callback-postprocess_image_after_composite
callback postprocess_image_after_composite
2024-01-20 10:25:29 +03:00
w-e-w
2cf23099eb fix console total progress bar when using txt2img_upscale
add p.txt2img_upscale as indicator
2024-01-18 04:44:21 +09:00
w-e-w
c1e04c63b3 callback postprocess_image_after_composite 2024-01-16 14:18:20 +09:00
AUTOMATIC1111
233c66b36e Make the upscale button update the gallery with the new image rather than replace it. 2024-01-05 12:28:41 +03:00
AUTOMATIC1111
80873b1538 fix #14497 2024-01-02 07:05:05 +03:00