Merge remote-tracking branch 'origin/main' into qwen-image-2.1
# Conflicts: # tests/entrypoints/openai_api/test_image_server.py # vllm_omni/entrypoints/openai/api_server.py
This commit is contained in:
commit
3e274a0024
220 files changed
+22342
-1079
No files matched your search
@@ -1719,7 +1719,7 @@ def test_image_edit_parameter_pass(async_omni_test_client):
|
||||
img = Image.open(io.BytesIO(img_bytes))
|
||||
assert img.format.lower() == "jpeg"
|
||||
assert data["output_format"] == "jpeg"
|
||||
assert data["size"] == f"{img.width}x{img.height}"
|
||||
assert data["size"] == "64x64"
|
||||
|
||||
|
||||
def test_image_edit_layers_and_resolution(async_omni_test_client):
|
||||
@@ -1896,6 +1896,7 @@ def test_image_edit_parameter_default_single_stage(test_client):
|
||||
|
||||
assert captured_sampling_params.width == 24
|
||||
assert captured_sampling_params.height == 16
|
||||
assert (captured_sampling_params.height_not_provided, captured_sampling_params.width_not_provided) == (True, True)
|
||||
assert captured_sampling_params.num_outputs_per_prompt == 1
|
||||
assert captured_sampling_params.num_inference_steps == 4
|
||||
assert captured_sampling_params.guidance_scale == 7.5
|
||||
@@ -1913,6 +1914,40 @@ def test_image_edit_parameter_default_single_stage(test_client):
|
||||
assert response.status_code == 400
|
||||
|
||||
|
||||
def test_image_edit_explicit_size_marks_canvas_provided_single_stage(test_client):
|
||||
response = test_client.post(
|
||||
"/v1/images/edits",
|
||||
files=[("image", make_test_image_bytes((24, 16)))],
|
||||
data={"prompt": "hello world.", "size": "16x24"},
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
sampling = test_client.app.state.engine_client.captured_sampling_params_list[0]
|
||||
assert (sampling.height, sampling.width) == (24, 16)
|
||||
assert (sampling.height_not_provided, sampling.width_not_provided) == (False, False)
|
||||
|
||||
|
||||
def test_image_edit_response_size_reports_generated_image_single_stage(test_client):
|
||||
response = test_client.post(
|
||||
"/v1/images/edits",
|
||||
files=[("image", make_test_image_bytes((24, 16)))],
|
||||
data={"prompt": "hello world.", "size": "16x24"},
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.json()["size"] == "64x64"
|
||||
|
||||
|
||||
def test_generate_images_response_size_reports_generated_image(test_client):
|
||||
response = test_client.post(
|
||||
"/v1/images/generations",
|
||||
json={"prompt": "a cat", "n": 1, "size": "1024x1024"},
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.json()["size"] == "64x64"
|
||||
|
||||
|
||||
def test_image_edit_compression_jpeg(test_client):
|
||||
img_bytes_1 = make_test_image_bytes((16, 16))
|
||||
# uploadfile with image key
|
||||
|
||||
Reference in new issue
Block a user