Skip to content
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

[WWB]: Add ImageText-to-Image pipeline validation #1373

Merged
merged 40 commits into from
Dec 27, 2024

Conversation

AlexKoff88
Copy link
Collaborator

@AlexKoff88 AlexKoff88 commented Dec 12, 2024

CVS-159223

@github-actions github-actions bot added the category: WWB PR changes WWB label Dec 12, 2024
@ilya-lavrenov ilya-lavrenov added this to the 2025.0 milestone Dec 12, 2024
@ilya-lavrenov ilya-lavrenov self-assigned this Dec 12, 2024
@ilya-lavrenov
Copy link
Contributor

is image to image sensitive to random echarlaix/tiny-random-stable-diffusion-xl-image-to-image models?

@AlexKoff88
Copy link
Collaborator Author

is image to image sensitive to random echarlaix/tiny-random-stable-diffusion-xl-image-to-image models?

the problem came from the difference in the resolutions of generated images by HF and GenAI libs.

@github-actions github-actions bot removed the category: tokenizers Tokenizer class or submodule update label Dec 18, 2024
@AlexKoff88
Copy link
Collaborator Author

AlexKoff88 commented Dec 20, 2024

I am getting good accuracy convergence for big models, e.g. SD-XL but cannot make tests working with GenAI for any dummy model (I tried several). Waiting for fixes from OV.

@AlexKoff88
Copy link
Collaborator Author

@ilya-lavrenov, CI is passed with non-dummy model.

@ilya-lavrenov ilya-lavrenov added this pull request to the merge queue Dec 26, 2024
@ilya-lavrenov
Copy link
Contributor

ilya-lavrenov commented Dec 26, 2024

WWB tests on master:
{1B722F12-7A91-46C6-910F-C419862FD060}

WWB tests on current PR:
{74B06E4B-C0BD-484D-991A-F4D2ABA9AA72}

WWB tests with dummy random model:
{C71C9DDE-648B-440B-9A3A-FBC08384E0A8}

Even if we switch to dummy model once the related issue is fixed by CPU team, execution time is still very huge, can it be optimized? why did im2im give 3x to execution time even with dummy models?

@ilya-lavrenov ilya-lavrenov removed this pull request from the merge queue due to a manual request Dec 26, 2024
prompt,
image=image_data,
num_inference_steps=num_inference_steps,
strength=0.8,
Copy link
Contributor

@ilya-lavrenov ilya-lavrenov Dec 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you run optimum / diffusers with the same strength value?

I just don't see where reference image2timage is called..

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. It is 0.8 by default in Diffusers but it is better to set it explicitly.

Copy link
Collaborator Author

@AlexKoff88 AlexKoff88 Dec 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it is already set to 0.8 as well in the default_gen_image_fn of im2im pipeline.

@@ -65,6 +67,7 @@ def test_image_model_types(model_id, model_type, backend):
@pytest.mark.parametrize(
("model_id", "model_type"),
[
("dreamlike-art/dreamlike-anime-1.0", "image-to-image"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe echarlaix/tiny-random-latent-consistency can work here instead of non-working echarlaix/tiny-random-stable-diffusion-xl ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried several of them including the one you mentioned and they do not work due the known bug.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need torch model in these tests or openvino only enough?
We have several preconverted models here https://huggingface.co/collections/OpenVINO/image-generation-67697d9952fb1eee4a252aa8 (I requested dreamlike models too, but current status is waiting approval)

among trained but still small is https://huggingface.co/segmind/tiny-sd
but not sure that used in model scheduler currently supported

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also for speedup testing, you can expose num_infeence_steps parameter in cli (I suppose even with streigh=0.8, it runs 40 steps

Copy link
Collaborator Author

@AlexKoff88 AlexKoff88 Dec 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need torch model in these tests or openvino only enough? We have several preconverted models here https://huggingface.co/collections/OpenVINO/image-generation-67697d9952fb1eee4a252aa8 (I requested dreamlike models too, but current status is waiting approval)

among trained but still small is https://huggingface.co/segmind/tiny-sd but not sure that used in model scheduler currently supported

Yes, I need a Torch model and I tried "segmind/tiny-sd" but it didn't work OOB.

And, yes num_infeence_steps is already exposed and I am planning to use it in the test to reduce the test time if I don't find a dummy model that works.

@ilya-lavrenov ilya-lavrenov added this pull request to the merge queue Dec 27, 2024
Merged via the queue into openvinotoolkit:master with commit c9d63b2 Dec 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: WWB PR changes WWB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants