Skip to content

Addresses #3/#26, fixes dependencies - #36

Open
JohnnyStreet wants to merge 2 commits into
megvii-research:mainfrom
monofy-org:main
Open

Addresses #3/#26, fixes dependencies#36
JohnnyStreet wants to merge 2 commits into
megvii-research:mainfrom
monofy-org:main

Conversation

@JohnnyStreet

Copy link
Copy Markdown

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

aimerib commented Dec 8, 2024

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants