[GH-ISSUE #969] Add support for Draw Things as an A1111-compatible image generation backend #472

Closed
opened 2026-10-20 17:29:13 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @etherious1804 on GitHub (May 18, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/969

Problem

Marinara already routes the drawthings provider through the AUTOMATIC1111 dispatch case (packages/server/src/services/image/image-generation.ts — normalizeExplicitImageSource coerces drawthings → automatic1111), but Draw Things' HTTP server diverges from A1111 in several ways that make image generation silently fail or 422 today.

What breaks today

  1. cfg_scale is ignored. Draw Things expects guidance_scale. A request that sends only cfg_scale returns HTTP 200 {"images": []} after a full generation cycle — looks like success, returns nothing.
  2. override_settings causes HTTP 422. As soon as a user fills in the Model field in the connection editor, generateAutomatic1111 adds override_settings.sd_model_checkpoint. Draw Things rejects the request entirely with Unrecognized keys: ["override_settings"]. Same for scheduler, restore_faces, n_iter, batch_size.
  3. Sampler dropdown is mostly unusable. Draw Things' sampler list (UniPC AYS, DPM++ SDE Substep, TCD, LCM, etc.) only overlaps on five names with SD_WEBUI_SAMPLER_OPTIONS. Picking a Draw Things-specific sampler isn't possible from the UI.
  4. Img2img init dimensions must match exactly. A1111/Forge auto-resize the init image to request width/height. Draw Things does not — it returns HTTP 422 init_images height doesn't match X from the parameter Y. So any path that passes a reference image (illustrator with useAvatarReferences, future img2img features) blows up.

Repro

  1. Set up a Draw Things connection in Marinara (http://127.0.0.1:7860, provider Draw Things)
  2. Test image button — appears to "work" silently with no image
  3. Pick any sampler other than Euler a from the dropdown — request rejected by Draw Things' validator
  4. Fill the Model field — every request 422s

Proposed fix

  • Pass the explicit serviceHint through to generateAutomatic1111 and branch on serviceHint === "drawthings".
  • For Draw Things requests: use guidance_scale, batch_count; drop override_settings, scheduler, restore_faces.
  • Lazy-load sharp (same pattern as sprites.routes.ts) and resize the init image to match request dims for Draw Things img2img.
  • Extend SD_WEBUI_SAMPLER_OPTIONS with the Draw Things-specific samplers, labeled so AUTOMATIC1111 users can distinguish them.

Verified locally against Draw Things 1.20260430.0 driving Anima 1.0 (Qwen-Image architecture). Patch ready — opening PR.

Out of scope

  • The selfie command using avatars as img2img init was prototyped during testing but is a separate UX choice that not every user will want defaulted on, so it's not part of this PR.
Originally created by @etherious1804 on GitHub (May 18, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/969 ## Problem Marinara already routes the `drawthings` provider through the AUTOMATIC1111 dispatch case (`packages/server/src/services/image/image-generation.ts` — `normalizeExplicitImageSource` coerces `drawthings` → `automatic1111`), but Draw Things' HTTP server diverges from A1111 in several ways that make image generation silently fail or 422 today. ## What breaks today 1. **`cfg_scale` is ignored.** Draw Things expects `guidance_scale`. A request that sends only `cfg_scale` returns `HTTP 200 {"images": []}` after a full generation cycle — looks like success, returns nothing. 2. **`override_settings` causes HTTP 422.** As soon as a user fills in the Model field in the connection editor, `generateAutomatic1111` adds `override_settings.sd_model_checkpoint`. Draw Things rejects the request entirely with `Unrecognized keys: ["override_settings"]`. Same for `scheduler`, `restore_faces`, `n_iter`, `batch_size`. 3. **Sampler dropdown is mostly unusable.** Draw Things' sampler list (`UniPC AYS`, `DPM++ SDE Substep`, `TCD`, `LCM`, etc.) only overlaps on five names with `SD_WEBUI_SAMPLER_OPTIONS`. Picking a Draw Things-specific sampler isn't possible from the UI. 4. **Img2img init dimensions must match exactly.** A1111/Forge auto-resize the init image to request `width`/`height`. Draw Things does not — it returns `HTTP 422 init_images height doesn't match X from the parameter Y`. So any path that passes a reference image (illustrator with `useAvatarReferences`, future img2img features) blows up. ## Repro 1. Set up a Draw Things connection in Marinara (`http://127.0.0.1:7860`, provider Draw Things) 2. Test image button — appears to "work" silently with no image 3. Pick any sampler other than `Euler a` from the dropdown — request rejected by Draw Things' validator 4. Fill the Model field — every request 422s ## Proposed fix - Pass the explicit `serviceHint` through to `generateAutomatic1111` and branch on `serviceHint === "drawthings"`. - For Draw Things requests: use `guidance_scale`, `batch_count`; drop `override_settings`, `scheduler`, `restore_faces`. - Lazy-load `sharp` (same pattern as `sprites.routes.ts`) and resize the init image to match request dims for Draw Things img2img. - Extend `SD_WEBUI_SAMPLER_OPTIONS` with the Draw Things-specific samplers, labeled so AUTOMATIC1111 users can distinguish them. Verified locally against Draw Things 1.20260430.0 driving Anima 1.0 (Qwen-Image architecture). Patch ready — opening PR. ## Out of scope - The selfie command using avatars as img2img init was prototyped during testing but is a separate UX choice that not every user will want defaulted on, so it's not part of this PR.
Author
Owner

@cha1latte commented on GitHub (May 18, 2026):

Triage note: labeling this as normal-scope because it makes the existing Draw Things provider path actually compatible with Draw Things' A1111-like API differences, rather than adding a separate provider architecture.

This can stay in the normal enhancement backlog and proceed through the linked implementation PR.

<!-- gh-comment-id:4480647911 --> @cha1latte commented on GitHub (May 18, 2026): Triage note: labeling this as `normal-scope` because it makes the existing Draw Things provider path actually compatible with Draw Things' A1111-like API differences, rather than adding a separate provider architecture. This can stay in the normal enhancement backlog and proceed through the linked implementation PR.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#472
No description provided.