-
Notifications
You must be signed in to change notification settings - Fork 452
[CI] add diffusion ci #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
ca509e6
ci
ZJY0516 852d51d
add test file
ZJY0516 ddd603a
update
ZJY0516 c604ffc
update
ZJY0516 e01765b
update
ZJY0516 e5ec82b
update
ZJY0516 0fb901b
update
ZJY0516 405a2dd
update
ZJY0516 5948882
update
ZJY0516 ccf084b
update
ZJY0516 6d8de80
update
ZJY0516 570beb6
update
ZJY0516 82dc002
add hf_home
ZJY0516 af75322
update
ZJY0516 94f6fc9
update test
ZJY0516 22f150a
fix pre-commit
ZJY0516 9586a86
revert
ZJY0516 a0626e1
add docker file
ZJY0516 1c9235c
change dir
ZJY0516 e63c151
p
khluu ebd1700
p
khluu 9dc7a70
p
khluu 205238f
p
khluu edda013
p
khluu 0b86583
Merge branch 'main' into diffusion-ci
ZJY0516 1b12c80
Merge branch 'khluu/ci' into diffusion-ci
ZJY0516 28e45fd
update
ZJY0516 baa9740
update env var and mount dir
ZJY0516 f3ca068
update
ZJY0516 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,31 @@ | ||
| steps: | ||
| - label: ":docker: Build image" | ||
| key: image-build | ||
| commands: | ||
| - "aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/q9t5s3a7" | ||
| - "docker build --file docker/Dockerfile.ci -t vllm-omni-ci ." | ||
| - "docker tag vllm-omni-ci public.ecr.aws/q9t5s3a7/vllm-ci-test-repo:$BUILDKITE_COMMIT" | ||
| - "docker push public.ecr.aws/q9t5s3a7/vllm-ci-test-repo:$BUILDKITE_COMMIT" | ||
| agents: | ||
| queue: "cpu_queue_premerge_us_east_1" | ||
|
|
||
| - label: "Simple Unit Test" | ||
| commands: | ||
| - ".buildkite/scripts/simple_test.sh" | ||
| agents: | ||
| queue: "cpu_queue_premerge" | ||
| - label: "Diffusion Model Test" | ||
| depends_on: image-build | ||
| commands: | ||
| - pytest -s -v tests/single_stage/test_diffusion_model.py | ||
| agents: | ||
| queue: "gpu_1_queue" # g6.4xlarge instance on AWS, has 1 L4 GPU | ||
| plugins: | ||
| - docker#v5.2.0: | ||
| image: public.ecr.aws/q9t5s3a7/vllm-ci-test-repo:$BUILDKITE_COMMIT | ||
| always-pull: true | ||
| propagate-environment: true | ||
| environment: | ||
| - "HF_HOME=/fsx/hf_cache" | ||
| volumes: | ||
| - "/fsx/hf_cache:/fsx/hf_cache" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -156,9 +156,6 @@ cython_debug/ | |
| # cursor | ||
| .cursor/ | ||
|
|
||
| # docker | ||
| docker/ | ||
|
|
||
| # scripts | ||
| /scripts/ | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| ARG VLLM_BASE_IMAGE=vllm/vllm-openai | ||
| ARG VLLM_BASE_TAG=v0.11.0 | ||
| FROM ${VLLM_BASE_IMAGE}:${VLLM_BASE_TAG} | ||
| ARG APP_DIR=/workspace/vllm-omni | ||
| WORKDIR ${APP_DIR} | ||
|
|
||
| COPY . . | ||
|
|
||
| # Install vllm-omni into the same uv-managed Python environment used by the base image. | ||
| RUN uv pip install --python "$(python3 -c 'import sys; print(sys.executable)')" --no-cache-dir ".[dev]" | ||
|
|
||
| RUN ln -sf /usr/bin/python3 /usr/bin/python | ||
|
|
||
| ENTRYPOINT [] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import pytest | ||
| import torch | ||
|
|
||
| from vllm_omni import Omni | ||
|
|
||
| models = ["Tongyi-MAI/Z-Image-Turbo"] | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("model_name", models) | ||
| def test_diffusion_model(model_name: str): | ||
| m = Omni(model=model_name) | ||
| # high resolution may cause OOM on L4 | ||
| height = 256 | ||
| width = 256 | ||
| images = m.generate( | ||
| "a photo of a cat sitting on a laptop keyboard", | ||
| height=height, | ||
| width=width, | ||
| num_inference_steps=2, | ||
| guidance_scale=0.0, | ||
| generator=torch.Generator("cuda").manual_seed(42), | ||
| num_outputs_per_prompt=2, | ||
| ) | ||
| assert len(images) == 2 | ||
| # check image size | ||
| assert images[0].width == width | ||
| assert images[0].height == height | ||
| images[0].save("z_image_output.png") | ||
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.
Uh oh!
There was an error while loading. Please reload this page.