Commit Graph

1026 Commits

Author SHA1 Message Date
Vladimir Mandic 51a0eaaa21 add experimental openai interface
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-02 14:36:44 +02:00
Vladimir Mandic fccbdcc1e9 update api response
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-26 10:38:14 +02:00
CalamitousFelicitousness 3dd0cd590c fix(pipelines): restore clip-skip text encoding for transformers 5.6+
The vendored encode_prompt copies in the PAG, APG, ControlNet-XS and differential
diffusion pipelines dereference the .text_model wrapper that transformers 5.6
removed from CLIPTextModel, so their clip-skip path crashes on SD1.5 and SDXL TE1.
Apply the same getattr(te, 'text_model', te) fix as the core parser.

Mirrors upstream diffusers, which still carries this deref in pipeline
encode_prompt; only the single-file loader was fixed there.
2026-06-25 02:25:33 +01:00
Vladimir Mandic 8d4ebcd5ef processors multiple fixes
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-18 11:45:34 +02:00
Vladimir Mandic b60c67ecd4 fix preview mapping
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-18 11:45:34 +02:00
Vladimir Mandic 6b02ac059d fix pulid
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-18 11:45:34 +02:00
Vladimir Mandic f69ce0d845 update requirements
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-15 14:55:14 +02:00
CalamitousFelicitousness e804d6df21 feat(samplers): group sampler dropdown into labeled sections
Reorder samplers_data_diffusers into recognizable solver-family groups (Euler, DPM/DPM++, UniPC/DEIS, Heun/KDPM2, ER-SDE, Classic, Distilled, Misc), each ending with its FlowMatch variants, and Res4Lyf as a fenced experimental section, so the dropdown is scannable.

Dividers are SamplerData sentinels with U+2500 names: create_sampler keeps the current scheduler when one is selected, get_sampler_name falls back to Default, set_samplers and validate_sampler_name exclude them, and a visible_samplers() helper drops them from the xyz axes, detailer, and folder pickers. The main and refine dropdowns render them as section labels. No sampler is removed or renamed, so saved infotexts, styles, and API calls keep resolving.
2026-06-14 01:41:05 +01:00
Vladimir Mandic 1cf715fac2 add gemma-4-unified, tensor-compressed, qat
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-12 15:15:16 +02:00
Vladimir Mandic 2a632920e1 Merge pull request #4919 from QualiaRain/fix/mutable-default-args
Fix mutable default arguments and wrong cfg gating eva_clip text checkpoint
2026-06-12 15:01:33 +02:00
QualiaRain a127ae4e83 lint: fix RUF013 implicit Optional in model_google and eva_clip factory
Seven 'list = None' / 'list[...] = None' parameters lacked the | None
annotation required by PEP 484; ruff RUF013 flagged them in CI.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 05:41:52 -04:00
QualiaRain 6325f08be7 fix: mutable default arguments + wrong cfg var gating eva_clip text checkpoint download
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 05:08:03 -04:00
Vladimir Mandic 10414e01a1 Merge pull request #4912 from QualiaRain/fix/script-extension-fixes
Fix seven small bugs in script extensions
2026-06-12 10:49:39 +02:00
Vladimir Mandic 227e398024 Merge pull request #4913 from QualiaRain/fix/freescale-fixes
Fix FreeScale early-return state corruption and stage resolution rounding
2026-06-12 10:41:18 +02:00
Vladimir Mandic ccc8f92d05 Merge pull request #4911 from QualiaRain/fix/upscale-postprocess-fixes
Fix four small bugs in upscale and postprocess paths
2026-06-12 10:40:12 +02:00
Vladimir Mandic b31efdb75b Merge pull request #4909 from QualiaRain/fix/xyz-grid-state-fixes
Fix XYZ grid state leaks and sub-grid gallery leak
2026-06-12 10:35:59 +02:00
QualiaRain 58386c657d Fix XYZ grid state.end leak on invalid axis values in xyz_grid_on
Same except-path as the previous commit: jobid is begun before the
try block but never ended on the error return, mirroring the
xyz_grid.py fix.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:42:15 -04:00
Claude 92517f8a58 Fix Remove Background mask-only and merge-alpha options
Both options inspected pp.image (the original input, normally RGB)
instead of the background-removed RGBA result, so the checkboxes did
nothing. merge_alpha also discarded the convert('RGB') return value.
Operate on the rembg output and keep the converted image.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:35 -04:00
Claude 9c0ab938f2 Fix SD Upscale task_args image fallback never triggering
hasattr() on the task_args dict checked for an attribute instead of a
key, so it was always False and images passed via task_args were
ignored. Use dict.get instead.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:35 -04:00
Claude 1225abc265 Fix Simple Upscale crash when upscaler name is not found
A stale or renamed upscaler name fell through after the debug log and
dereferenced None in upscale(), raising AttributeError. Return early
like the standard upscale class does.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:34 -04:00
Claude 642e891c81 Fix AnimateDiff error reporting
errors.display received the literal string 'e' instead of the caught
exception, losing the traceback on adapter load failures. The restore
debug log also nulled loaded_adapter before printing it, so it always
showed adapter=None.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:32 -04:00
Claude ba8b6d23e8 Fix LBM output never resized back to input dimensions
PIL Image.resize returns a new image; the result was discarded, so the
final output stayed at the snapped aspect-ratio bucket size instead of
being restored to the original input size.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:32 -04:00
Claude fd38a9bf63 Fix FreeU crash in ConsiStory script
Enabling FreeU called len() on the checkbox bool instead of the parsed
preset list, raising TypeError and aborting the run. Even without the
crash, all four FreeU parameters were passed the same value. Use the
parsed freeu_preset values, and log the invalid input before clearing it.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:32 -04:00
Claude cfcc7c7338 Fix MuLan negative prompt overwriting the positive prompt
When negative_prompt arrived as a list, the unwrap assigned it to
p.prompt instead of p.negative_prompt, replacing the user's prompt with
the negative prompt text and passing an unsupported list to the
pipeline.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:32 -04:00
Claude 7851afc707 Fix IP-Instruct crash in after() hook
The framework passes the script's ui values positionally, but after()
only accepted keyword args, so every run raised TypeError after
processing and the original pipeline was never restored. Accept *args
like sibling scripts.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:31 -04:00
Claude 00eff5e803 Fix PixelSmith proceeding on unsupported model types
The unsupported-model warning fell through and switched non-SDXL models
into PixelSmithXLPipeline with an SDXL VAE, corrupting the pipeline.
Return early like every sibling script does after this check.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:31 -04:00
Claude 1fdb9ecfdb Fix XYZ grid sub-grid count ignoring sub-grids created with the main grid
draw_xyz_grid inserts one sub-grid per Z value whenever the main grid
or sub-grids are enabled, but have_subgrids only counted them when
'Include sub grids' was checked. With main grid on and sub grids off,
the Z sub-grids leaked into the results as ordinary images (shown in
the gallery, fed into video creation, misaligning infotexts) and the
removal branch was unreachable since its condition contradicted itself.
Count sub-grids based on the same condition that inserts them.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:29 -04:00
Claude 16145a5bdd Fix XYZ grid state leaks on invalid axis values
The always-on variant returned from its parse-error handler without
resetting the module-level active flag, silently disabling the XYZ grid
for every later generation until restart. The selectable variant
likewise returned without ending the job state it had begun.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:29 -04:00
Claude 5077db32a7 Fix FreeScale stage resolutions not snapped to multiple of 8
Operator precedence made 8 * w * x // 8 cancel out, so fractional scale
factors produced resolutions not divisible by 8 and broke the SDXL
latent shape requirements. Apply the same idiom as pixelsmith_ext.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:27 -04:00
Claude 20a148fd69 Fix FreeScale resolution check running after processing state is modified
The sub-1024 early return happened after init_images was nulled,
task_args were injected and the sampler overridden, so the fallback to
normal processing ran with a broken img2img setup. Check the resolution
before mutating the processing object.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:27 -04:00
QualiaRain d361705280 fix prompts-from-file batch save metadata misalignment
The script concatenated each per-line result's images and infotexts INCLUDING the per-line grid, while all_seeds/all_prompts hold only real images and the final Processed gets index_of_first_image=0. With batch count > 1 the interleaved grids shift every index, so the manual save button writes neighboring images' metadata and filenames (and indexes past the end of infotexts for the last image). Slice each per-line result from proc.index_of_first_image so grids never enter the combined result and all lists stay 1:1 with the gallery. Fixes #2385.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 01:58:37 -04:00
Vladimir Mandic 745ccae962 Merge pull request #4904 from QualiaRain/fix/assorted-typos
Fix assorted small typos: dead __str__, unformatted messages, preview min-height
2026-06-11 08:20:07 +02:00
QualiaRain 2b9a387670 fix transposed tile dimensions in mixture tiling script
tile_width/tile_height and tile_col_overlap/tile_row_overlap were cross-assigned from p.height/p.width, transposing output geometry for every non-square tile size. Fixes #4902.
2026-06-11 02:04:14 -04:00
QualiaRain 148a7883a2 Fix assorted small typos: dead __str__, unformatted messages, preview min-height, tooltip
- processing.py: __str___ misspelled dunder never dispatched; rename to __str__
- demofusion.py: missing f-prefix printed literal {width}x{height} in user-facing error
- sparse_backend.py: missing f-prefix printed literal {size} in ValueError
- generation_parameters_copypaste.py: debug message typo 'Not not registered'
- progressBar.ts: live-preview gallery minHeight computed from naturalWidth; mirrors the adjacent maxHeight line (naturalHeight)
- settings.ts: stray } in settings-tab tooltip
2026-06-11 01:42:29 -04:00
Vladimir Mandic 84228f1657 update sampler behavior and user definable fallback
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-08 17:00:00 +02:00
Vladimir Mandic cad27637b4 schedulers validate ui sections
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-08 08:58:13 +02:00
Vladimir Mandic 5e99dee3c2 full codespell coverage
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-04 12:36:10 +02:00
Vladimir Mandic f25f325efb fixes based on full skills run
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-04 11:10:26 +02:00
Vladimir Mandic 35aa8c6422 fix openpose and add test-compile
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-02 17:06:18 +02:00
CalamitousFelicitousness f9ab0bf04d feat(api): add detailer postprocess script and /sdapi/v1/detail endpoint
Surface YoloRestorer.restore() as a standalone operation: a Detailer
postprocessing script in the Process tab and a thin /sdapi/v1/detail
endpoint, neither requiring a base generation pass.

- modules/postprocess/yolo.py: YoloRestorer.make_processing() builds the
  synthetic Img2Img processing object both entry points feed to restore(),
  resolving the seed so the inpaint passes are reproducible
- modules/api/process.py: post_detail handler exposes the full detailer
  parameter set and returns the detailed image plus optional annotations
  as base64
- scripts/postprocessing_detailer.py: reuses shared.yolo.ui('extras') and
  runs through make_processing()
- modules/postprocessing.py: run_extras takes a per-script script_args
  dict, also letting the extras API drive other scripts such as Remove
  background; omitting it leaves existing callers unchanged
- modules/api/models.py: ReqDetail / ResDetail
- modules/processing_info.py: guard create_infotext's Image/Hires CFG
  reporting against an unset (None) cfg_image, matching the is-not-None
  checks the other cfg_image readers use; the detailer inpaint pass runs
  with it unset
- test/test-detailer-api.py: covers both paths; effect tests measure the
  diff inside the detected region with extreme isolated parameter values,
  and the suite disables model quantization for the run and restores the
  original settings afterward
2026-06-01 00:25:59 +01:00
Vladimir Mandic d2d9f7caea captioning improvements and cleanup
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-29 21:10:56 +02:00
Vladimir Mandic 60e6c37e24 fix script params
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-22 18:28:22 +02:00
Vladimir Mandic 082498e6bd prompt-enhance-v2 with steering
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-22 16:58:23 +02:00
Vladimir Mandic a56d1d299e add wildcards to image metadata and note separate template from prompt field
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-19 09:45:20 +02:00
Vladimir Mandic f67562b912 - all guidance values set to -1 to enable using model defaults
- log default values used if not overriden by user
- rename inconsistent guidance variables:

p.cfg_scale
p.image_cfg_scale -> p.cfg_image
p.diffusers_guidance_rescale -> p.cfg_rescale
p.pag_scale -> p.cfg_true
p.pag_adaptive -> p.cfg_adaptive

Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-16 11:06:23 +02:00
Vladimir Mandic 62a3653b49 ty lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-11 09:34:17 +02:00
Vladimir Mandic feeafc6286 strict ruff without exclude
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-11 08:36:49 +02:00
Vladimir Mandic c8d6fd5cf8 Revert "much stricter ruff linting"
This reverts commit 310dbf1574.
2026-05-11 08:13:57 +02:00
Vladimir Mandic 8296d07ff8 Revert "stricter pylint"
This reverts commit c27481e45a.
2026-05-11 08:13:48 +02:00
Vladimir Mandic c27481e45a stricter pylint
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-11 07:51:47 +02:00