limuloo / MIGC

[CVPR 2024 Highlight] "MIGC: Multi-Instance Generation Controller for Text-to-Image Synthesis" (Official Implementation)
Other
428 stars 20 forks source link

Supporting new diffusers #4

Open TonyLianLong opened 3 months ago

TonyLianLong commented 3 months ago

Thanks for the great work! However, the pipeline does not seem to support the latest diffusers. When I use diffusers v0.25.0, I got:

  File "/home_dir/miniconda3/envs/env_name/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/home_dir/miniconda3/envs/env_name/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home_dir/MIGC/migc_gui/app.py", line 82, in process_request
    pipe = offlinePipelineSetupWithSafeTensor(sd_safetensors_path=sd_safetensors_path)
  File "/home_dir/MIGC/migc/migc_utils.py", line 174, in offlinePipelineSetupWithSafeTensor
    pipe = StableDiffusionMIGCPipeline.from_single_file(sd_safetensors_path,
  File "/home_dir/miniconda3/envs/env_name/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
    return fn(*args, **kwargs)
  File "/home_dir/miniconda3/envs/env_name/lib/python3.10/site-packages/diffusers/loaders/single_file.py", line 263, in from_single_file
    pipe = download_from_original_stable_diffusion_ckpt(
  File "/home_dir/miniconda3/envs/env_name/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py", line 1687, in download_from_original_stable_diffusion_ckpt
    pipe = pipeline_class(
  File "/home_dir/MIGC/migc/migc_pipeline.py", line 241, in __init__
    super().__init__(
  File "/home_dir/miniconda3/envs/env_name/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py", line 237, in __init__
    self.register_modules(
  File "/home_dir/miniconda3/envs/env_name/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 571, in register_modules
    library = not_compiled_module.__module__.split(".")[0]
AttributeError: 'bool' object has no attribute '__module__'

This is similar to the following error: https://github.com/huggingface/diffusers/issues/6094

The solution is discussed here: https://github.com/huggingface/diffusers/pull/5993#issuecomment-1833261167

Are you interested in solving this and making MIGC compatible with the updated diffusers?

limuloo commented 3 months ago

@TonyLianLong Thank you for your attention and recognition of our work! Following your suggestions, we have made modifications to the relevant code. Currently, MIGC is compatible with diffusers v0.25.0. 😄 If you have any further questions or issues, please feel free to contact me here.

akk-123 commented 3 months ago

@limuloo can you support migc with controlnet?

limuloo commented 3 months ago

@akk-123 Thank you for your suggestion. We also think that combining MIGC and ControlNet will bring even better applications. However, we are currently expanding MIGC in other dimensions. Plans to integrate ControlNet with MIGC may be slightly delayed. Anyway, stay tuned!

akk-123 commented 3 months ago

Thank you, look forward to your updates, can you let me know your follow-up update plans?

limuloo commented 3 months ago

@akk-123 (1) The control forms of MIGC will become more diverse. (2) Give MIGC stronger control capabilities. (3) Enhance MIGC’s image editing capabilities. Stay tuned!