Add ControlNet Pipeline#585
Conversation
libinta
left a comment
There was a problem hiding this comment.
can you rebase to latest?
e22fb1d to
56da112
Compare
Done |
cf5d5a4 to
e87c4ed
Compare
| from diffusers.utils.torch_utils import is_compiled_module | ||
| from ....utils import speed_metrics, HabanaProfile | ||
| from ..pipeline_utils import GaudiDiffusionPipeline | ||
|
|
There was a problem hiding this comment.
please use #611 as guideline to port this file. also move the pipeline_controlnet.py under pipelines
There was a problem hiding this comment.
Yes, there should be things that are not necessary anymore. I'm going to try to point them out below.
|
|
||
| # Workaround for Synapse 1.11 for full bf16 | ||
| if bf16_full_eval: | ||
| unet.conv_in.float() |
libinta
left a comment
There was a problem hiding this comment.
also, please check https://github.com/huggingface/optimum-habana/blob/main/tests/test_diffusers.py to add test case for regression protection
|
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. |
| from diffusers.utils.torch_utils import is_compiled_module | ||
| from ....utils import speed_metrics, HabanaProfile | ||
| from ..pipeline_utils import GaudiDiffusionPipeline | ||
|
|
There was a problem hiding this comment.
Yes, there should be things that are not necessary anymore. I'm going to try to point them out below.
200c908 to
e0dab26
Compare
|
@nngokhale Can you integrate the new ControlNet example into the existing Stable Diffusion example please? It will be much easier to maintain as there is a lot of duplicated code. |
|
Style fixed |
Added tests for ControlNet pipeline. |
|
All comments / issues have been resolved, please review. |
Fix scheduler.step call to latest
Add hpu graph for controlnet Fix Code style
regisss
left a comment
There was a problem hiding this comment.
I left a few comments.
Can you also run make style please?
Do you have any throughput number to share?
Resolved latest comments, ran 'make style'. Here are my throughput numbers: For 512x512, 1 prompt, 50 inf steps, 20 generations per prompt, 4 samples per batch, BF16 + HPU Graphs, on Gaudi2 HL-SMI: hl-1.13.0-rc-fw-47.0.0.0, Habana Driver: 1.13.0-ee32e42, Installed Habana Torch plug-in: 1.13.0.463, Installed Optimum-Habana: 1.10.0.dev0 GaudiStableDiffusionControlNetPipeline with lllyasviel/sd-controlnet-canny and runwayml/stable-diffusion-v1-5 For comparison |
What does this PR do?
Adds ControlNet pipeline.
The port is based on GaudiStableDiffusionPipeline.
Fixes # (issue)
Before submitting