Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Addresses #3/#26, fixes dependencies #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JohnnyStreet
Copy link

This addresses #3 and #26 by implementing vladmandic's suggestion for detecting inpainting (#3 (comment)), and by adding an optional parameter to support playground models.

It also addresses several typos and missing dependencies, and removes unused dependencies.

Update hidiffusion.py
@aimerib
Copy link

aimerib commented Dec 8, 2024

I just came here to drop a line that this PR would indeed fix the errors:

Traceback (most recent call last):
  File "/Users/aimeri/projects/personal/promptkouhai/chat/ui/windows/chat_window.py", line 1323, in generate_scene_image
    result = await self.generation_manager.generate(generation_params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/<redacted>.py", line 203, in generate
    images = await self.pipeline.generate(**generation_params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/<redacted>/sdxl_pipeline.py", line 157, in generate
    apply_hidiffusion(pipeline)
  File "/Users/<redacted>/lib/python3.12/site-packages/hidiffusion/hidiffusion.py", line 1961, in apply_hidiffusion
    'is_inpainting_task': 'inpainting' in model.name_or_path,
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

I just applied this patch manually to the file in the conda lib to test it a couple of weeks ago, and it worked so well I forget that I had done that until last night when I started a new conda env and forgot about this fix and my app broke completely. Took me two hours to remember that I had applied some patch at some point, so commenting here now to leave breadcrumbs for future me until this gets merged in.

Thank you @JohnnyStreet for this fix, and @ShenZhang-Shin and team for this library. My main usecase for it is to keep memory consumption under control for SDXL models on a mac, and without hidiffusion I would not be able to build my app.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants