22 Commits

Author SHA1 Message Date
CalamitousFelicitousness ff42f1631c feat(api): add video generation endpoint
Add POST /sdapi/v1/video plus GET /sdapi/v1/video/models and
GET /sdapi/v1/video/file. The generation body is extracted from the
gradio handler into a keyword-only core, video_run.run, which returns a
structured result and raises typed errors; the positional generate
signature is unchanged and now adapts to the core. Omitting engine and
model drives the currently loaded checkpoint when it is video-capable,
which covers models loaded from local folders without a registry entry.

- registry helpers in models_def (find, engines, pipeline_classes,
  workflow_for_class); validate_pipeline reuses the shared class set
- modular pipes stamp their workflow so out-of-registry loads dispatch
  onto the modular branch
- disk switches (mp4_*) and wire switches (send_*) are independent;
  artifacts above the base64 cap fall back to path plus the file route,
  which is jailed to the video output directory and serves video/mp4
  with range support
- always-on video scripts get bootstrapped default args, matching the
  txt2img handler; missing bootstrap raised a TypeError per frame
- checkpoint overrides are rejected with a pointer to the checkpoint
  endpoint; unknown engine, model and sampler names return 404 with the
  valid choices
- cli/api-video.py client, test/test-video-api.py suite and a
  full-test.sh entry; video mimetypes registered; rate-limit cost set
- remove the unreferenced video_ui.run_video dispatcher
2026-08-10 22:14:18 +01:00
Vladimir Mandic 98a7d17207 linting
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-03 22:05:33 +02:00
Vladimir Mandic a4d107a919 refactor detailer
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-03 21:03:28 +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
QualiaRain 584f2b84c4 fix cli+api: data-uri decode guards, mutable default, caption/ffprobe/palette IndexError guards
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 13:00:23 -04:00
CalamitousFelicitousness 0c0d455c11 fix(api): resolve sampler names case-insensitively to canonical form
validate_sampler_name only matched the exact, case-sensitive name, so near-miss client names such as lowercase variants were rejected while an omitted name silently used the model scheduler via the Default sentinel. Fall back to find_sampler and return the canonical name so create_sampler applies the intended sampler; unknown names still return 404. Add an API test covering case-insensitive resolution and rejection of unknown names.
2026-06-07 06:57:07 +01:00
vladmandic ac5ae390d8 merge: modules/api/helpers.py 2026-03-12 14:16:50 +01:00
Vladimir Mandic e5c494f999 cleanup logger 2026-02-19 11:09:13 +01:00
Vladimir Mandic a3074baf8b unified logger 2026-02-19 09:46:42 +01:00
vladmandic b5f000ab8a add xyz and script support to control api
Signed-off-by: vladmandic <mandic00@live.com>
2025-11-23 13:07:42 -05:00
Vladimir Mandic 6489e4c37d prompt-enhance api support and img2img support
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-05-08 15:31:07 -04:00
Vladimir Mandic 1da43e4f62 api b64 error handler
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-05-05 22:28:03 -04:00
Disty0 705556d68d JPEG XL support 2025-01-12 00:38:13 +03:00
Vladimir Mandic fa5de3dc22 api resiliency improvements
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2024-11-21 11:28:19 -05:00
Vladimir Mandic aa52feb757 dpm flowmatch
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2024-11-17 12:43:46 -05:00
Vladimir Mandic 4f1c9cf5c7 api validation
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2024-11-14 11:18:24 -05:00
Vladimir Mandic 9b08e720a5 better image save reporting 2024-05-17 10:10:52 -04:00
Vladimir Mandic 77f2d6c570 fix api generate save metadata 2024-03-24 09:04:49 -04:00
Vladimir Mandic d0ff929fd2 update api compatibility 2024-01-30 14:17:32 -05:00
Vladimir Mandic 3b09027c67 cleanup 2024-01-29 14:06:54 -05:00
Vladimir Mandic 6c75539b0b fix api image to bas64 2024-01-29 13:42:39 -05:00
Vladimir Mandic 7e447222a1 refactor api 2024-01-28 10:13:09 -05:00