mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-10 20:11:49 +00:00
The shared PageDraw lib's PromptBox emits resolution and aspect ratio as UI
labels ("1k", "wide", …), and each host adapter is responsible for mapping
them to the server's CommonResolution / CommonAspectRatio enum values
("one_k", …) — the desktop adapter does this, but the webapp adapter forwarded
the raw label. The omni-gen endpoint then rejected the whole body with
'unknown variant 1k', so every generation 400'd.
Add mapAspectRatio / mapResolution helpers mirroring the desktop PageDraw
adapter and apply them when building the OmniGenImageRequest.