[FEATURE] /v1/images/edit interface#1101
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 789b81cb8a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| # a proper generator is initialized in the backend. | ||
| # This fixes issues where using the default global generator | ||
| # might produce blurry images in some environments. | ||
| gen_params.seed = random.randint(0, 2**32 - 1) |
There was a problem hiding this comment.
Why remove random seed?
There was a problem hiding this comment.
actually not remove, we change to
_update_if_not_none(gen_params, "seed", random.randint(0, 2**32 - 1) if seed is None else seed)
| # 3.2 Parse and add size if provided | ||
| width, height = None, None | ||
| if size: | ||
| width, height = parse_size(size) |
There was a problem hiding this comment.
we should detect image' size if size is illegal
There was a problem hiding this comment.
acturally, the "size is illegal" detect is in parse_size: vllm_omni\entrypoints\openai\image_api_utils.py:parse_size, and will raise error if size is illegal
There was a problem hiding this comment.
acturally, the "size is illegal" detect is in parse_size: vllm_omni\entrypoints\openai\image_api_utils.py:parse_size, and will raise error if size is illegal
I hope that when the size is equal to "auto", instead of directly throwing an error, we can directly use the size of the first image.
789b81c to
1bbe1d9
Compare
| _update_if_not_none(gen_params, "height", height) | ||
|
|
||
| # 3.3 Add optional parameters ONLY if provided | ||
| _update_if_not_none(gen_params, "num_inference_steps", num_inference_steps) |
There was a problem hiding this comment.
How do we specify default sampling parameters (such as num_inference_steps, guidance_scale, and true_cfg_scale) when starting the server?
There was a problem hiding this comment.
we add --default-sampling-params --max-generated-image-size to init the system level default sample param and limit.
1bbe1d9 to
4a78559
Compare
ed15ecf to
3879890
Compare
|
@Bounty-hunter Could you also update related docs? And it will be great if you can test qwen image layerd |
952eafb to
9bc38cb
Compare
|
please use benchmark/diffusion to run the long-time test |
|
add acc result with image output |
| omni_config_group.add_argument( | ||
| "--default-sampling-params", | ||
| type=str, | ||
| help="Json str for Default sampling parameters, \n" |
There was a problem hiding this comment.
Could you explain why we need to add these? And I think read from a config file is more user friendly
There was a problem hiding this comment.
targeting for providing cli serve for default sampling to overwrite the default sampling params
|
fix ci please |
7f006d7 to
618510c
Compare
618510c to
d5b16fe
Compare
Signed-off-by: dengyunyang <584797741@qq.com>
d5b16fe to
a2bb617
Compare
| ) | ||
| # Diffusion model mixed precision | ||
| omni_config_group.add_argument( | ||
| "--max-generated-image-size", |
There was a problem hiding this comment.
It seems that we only check this in image edit, what about image generation?
There was a problem hiding this comment.
The two param only used for image edit now
There was a problem hiding this comment.
could you extend it in a follow-up PR?
|
please also update related test: test_image_gen_edit.py |
I plan to update following in follow-up PR: |
Signed-off-by: dengyunyang <584797741@qq.com>


PLEASE FILL IN THE PR DESCRIPTION HERE ENSURING ALL CHECKLIST ITEMS (AT THE BOTTOM) HAVE BEEN CONSIDERED.
Purpose
As describe in #1070
(1) Add multipart interface : /v1/images/edits
(2) extract common function for both edit and generate:
_get_engine_and_model_parse_lora_request_generate_with_async_omni_update_if_not_none_extract_images_from_result_choose_output_formatTest Plan
pytest
end2end test
start with:
qwem-bear.png

testing:
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.BEFORE SUBMITTING, PLEASE READ https://github.com/vllm-project/vllm-omni/blob/main/CONTRIBUTING.md (anything written below this line will be removed by GitHub Actions)