Skip to content

Stable diffusion inpainting new version faces a bug #1070

@FBehrad

Description

@FBehrad

Describe the bug

I used to use stable diffusion inpainting legacy. When I used num_images_per_prompt = 2, the model generated two similar images, while I expected to get two different outputs.
Then, I cloned the new version of the stable diffusion inpainting to tackle this problem. However, it does not work.
The problem is in line 354:

if num_channels_latents + num_channels_mask + num_channels_masked_image != self.unet.config.in_channels:
            raise ValueError(
                f"Incorrect configuration settings! The config of `pipeline.unet`: {self.unet.config} expects"
                f" {self.unet.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
                f" `num_channels_mask`: {num_channels_mask} + `num_channels_masked_image`: {num_channels_masked_image}"
                f" = {num_channels_latents+num_channels_masked_image+num_channels_mask}. Please verify the config of"
                " `pipeline.unet` or your `mask_image` or `image` input."
            )

My parameters:
The number of input channels in unet = 4
num_channels_latents = 4
num_channels_mask = 1
num_channels_masked_image = 4

What is the problem?

Reproduction

No response

Logs

No response

System Info

  • diffusers version: 0.6.0
  • Platform: Windows-10-10.0.19044-SP0
  • Python version: 3.8.10
  • PyTorch version (GPU?): 1.12.1+cu113 (True)
  • Huggingface_hub version: 0.10.1
  • Transformers version: 4.23.1
  • Using GPU in script?:
  • Using distributed or parallel set-up in script?:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions