-
Notifications
You must be signed in to change notification settings - Fork 141
[OpenVINO]Add Kontext support #1374
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
base: main
Are you sure you want to change the base?
[OpenVINO]Add Kontext support #1374
Conversation
@nikita-savelyevv could help to review ? |
@bot /style |
Style bot fixed some files and pushed the changes. |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
@@ -76,6 +76,7 @@ | |||
"flaubert": "hf-internal-testing/tiny-random-flaubert", | |||
"flux": "katuni4ka/tiny-random-flux", | |||
"flux-fill": "katuni4ka/tiny-random-flux-fill", | |||
"flux-kontext": "snake7gun/flux-kontext-random", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe adding this here is not enough for the test for this model to be run. Could you please add changes to test_diffusion.py
, test_exporters_cli.py
and test_quantization.py
similar to how it was done in this PR for example #1106?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @IlyasMoutawwakil my patch depends on the fix for diffusers lib, could you help to check ?
huggingface/diffusers#11875
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to wait for diffusers to do an entire release to test this. You can do the same as sana by using DiffusionPipeline instead of AutoPipelineForxxx https://github.com/huggingface/optimum-intel/blob/main/tests/openvino/test_diffusion.py#L146 for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to wait for diffusers to do an entire release to test this. You can do the same as sana by using DiffusionPipeline instead of AutoPipelineForxxx https://github.com/huggingface/optimum-intel/blob/main/tests/openvino/test_diffusion.py#L146 for now
yes, but how about in CLI export test case ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cli export test should pass as it uses the correct class name https://github.com/huggingface/optimum/blob/ec756fdd00543d3a93458fafbcdf5abbb17b61ba/optimum/exporters/tasks.py#L2159 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cli export test should pass as it uses the correct class name https://github.com/huggingface/optimum/blob/ec756fdd00543d3a93458fafbcdf5abbb17b61ba/optimum/exporters/tasks.py#L2159 🙂
- CLI export should not work without my patch on diffusers
- another question is if there is a method to update the version of diffusers in pytest?
E ImportError: cannot import name 'FluxKontextPipeline' from 'diffusers'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- no it should work without it. your patch is only rleevant to the AutoPipelineForxxx class, not the DiffusionPipeline class.
- update it to what version ? I just checked the latest diffusers and this model is not even released in diffusers yet https://github.com/huggingface/diffusers/blob/v0.34.0/src/diffusers/pipelines/flux/pipeline_flux_kontext.py
what's exactly the motive for adding this model anyway ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So your suggestion is adding the model after 0.34.0 version of diffuser released, am i right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or install diffusers from source.. for testing sake.
but bear in mind that python packages can't be released with a "git+https...." dependency, so we will have to wait for a diffusers release if you want this in the next optimum-intel release.
Depends on this PR for Diffusers