[Frontend/Model] Support Optional Prompt Upscale#3783
Open
alex-jw-brooks wants to merge 11 commits into
Open
Conversation
Signed-off-by: Alex Brooks <albrooks@redhat.com>
Signed-off-by: Alex Brooks <albrooks@redhat.com>
Signed-off-by: Alex Brooks <albrooks@redhat.com>
Signed-off-by: Alex Brooks <albrooks@redhat.com>
Signed-off-by: Alex Brooks <albrooks@redhat.com>
Signed-off-by: Alex Brooks <albrooks@redhat.com>
Signed-off-by: Alex Brooks <albrooks@redhat.com>
Signed-off-by: Alex Brooks <albrooks@redhat.com>
Signed-off-by: Alex Brooks <albrooks@redhat.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Signed-off-by: Alex Brooks <albrooks@redhat.com>
|
Works wonderfully for Ernie-Image-Turbo. Thanks! |
Contributor
Author
|
Great! Thanks for trying it out @retowyss 🙏 |
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.
Purpose
FIX #3713
Exposes param to turn prompt upscaling on/off and unifies the behavior for the following Diffusion models:
In cases where the model prompt upscaler is external (i.e., of the above, Ernie Image), the download for the extra files is gated on whether or not it's actually going to be used, and the prompt upscaler won't be loaded until you actually make a request using it, since the prompt upscaler takes a nontrivial amount of extra VRAM. For models like this, you need to pass an additional opt-in flag
enable_external_prompt_upscaler(or the corresponding CLI arg), which is set to False by default. If you try to make a request with prompt upscale on while its disabled, and the model has an external upscaler component, you will get a warning and it'll skip the upscale part:Test Plan
Validated for all 3 models that outputs do not match the raw gen with same seed when upscale is enabled for:
Test Result
Upscale results are different (i.e., due to prompt manipulation) on all paths for each of the models. Added additional tests for Ernie since the other changes were very straightforward. Also verified when running the server online that the GPU usage was low (~24 Gi) until I made a request with the upscale param, which increased it (to ~30 Gi) and that we get a warning instead of blowing up the memory if it's disabled. For Flux2/LongCat, we don't need to externally disable it since the component is always loaded anyway, which is why it would still work without issues.
@RuixiangMa @retowyss could you please take a look?