Skip to content

Inpainting #19

Open
Open
@MushroomFleet

Description

@MushroomFleet

at this section in the example notebook:

`batch_size = 4
url = "https://cdn.discordapp.com/attachments/1121232062708457508/1204787053892603914/cat_dog.png?ex=65d60061&is=65c38b61&hm=37c3d179a39b1eca4b8894e3c239930cedcbb965da00ae2209cca45f883f86f4&"
images = resize_image(download_image(url)).unsqueeze(0).expand(batch_size, -1, -1, -1)

batch = {'images': images}

mask = None

mask = torch.ones(batch_size, 1, images.size(2), images.size(3)).bool()

outpaint = False
threshold = 0.2

with torch.no_grad(), torch.cuda.amp.autocast(dtype=torch.bfloat16):
cnet, cnet_input = core.get_cnet(batch, models, extras, mask=mask, outpaint=outpaint, threshold=threshold)
cnet_uncond = cnet

show_images(batch['images'])
show_images(cnet_input)`

i received this error:
`---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in <cell line: 13>()
12
13 with torch.no_grad(), torch.cuda.amp.autocast(dtype=torch.bfloat16):
---> 14 cnet, cnet_input = core.get_cnet(batch, models, extras, mask=mask, outpaint=outpaint, threshold=threshold)
15 cnet_uncond = cnet
16

/content/StableCascade/train/train_c_controlnet.py in get_cnet(self, batch, models, extras, cnet_input, **kwargs)
141 with torch.no_grad():
142 if cnet_input is None:
--> 143 cnet_input = extras.controlnet_filter(images, **kwargs)
144 if isinstance(cnet_input, tuple):
145 cnet_input, cnet_input_preview = cnet_input

TypeError: SREffnetFilter.call() got an unexpected keyword argument 'mask'`

and am unable to generate the masks for the next steps.
how should i fix this?

thanks for providing the notebooks, my text2image/image2image colab version runs great. I'm trying to build out the remaining features.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions