Improve WebUI generated image workflows and manual model support#575
Open
wowugeng-max wants to merge 9 commits into
Open
Improve WebUI generated image workflows and manual model support#575wowugeng-max wants to merge 9 commits into
wowugeng-max wants to merge 9 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves the WebUI image workflow and manual-model experience end to end.
WebUI generated image handling
image_config.response_format = local_md, so generated chat images are saved in the existing local media cache and referenced as/v1/files/image?id=...instead of filling browser storage.imageandimage_editWebUI requests onlocal_url, matching the existing image pipeline and admin cache behavior.Continuous image editing in chat/image_edit
Storage and cache safety
data:image/...payloads directly into localStorage.Manual model registry/admin UI
Route manual imagine/image-style models through the image pipeline when applicable.
Expose manual models through the WebUI model list without requiring code changes for each entry.
Why
Before these changes, generated images could fail to render in WebUI chat, follow-up image edits did not reliably reuse the previous image, and base64 image history could quickly exhaust browser localStorage. The image model path already uses the project local media cache; this PR aligns WebUI chat image output with that same server-side cache behavior.
Test Plan
node tests/test_webui_image_payload.mjsnode tests/test_webui_media_normalization.mjsnode --check app/statics/js/webui/chat.jsuv run python -m unittest discover -s tests -p 'test_*.py'Notes
[image omitted from local storage]cannot be reconstructed because the original image bytes were already discarded by that older fallback.