Skip to content

Issue with InstantIR_Loader: Shape Mismatch in conv_in.weight #16

@alrimadubled

Description

@alrimadubled

When attempting to use the InstantIR_Loader, an error occurs due to a shape mismatch in conv_in.weight. The loader is expecting the shape tensor(..., device='meta', size=(320, 4, 3, 3)), but it receives torch.Size([320, 9, 3, 3]).

The error message suggests that if the intention is to overwrite the randomly initialized weights, it is necessary to pass both low_cpu_mem_usage=False and ignore_mismatched_sizes=True.

Error Message:Cannot load because conv_in.weight expected shape tensor(..., device='meta', size=(320, 4, 3, 3)), but got torch.Size([320, 9, 3, 3]). If you want to instead overwrite randomly initialized weights, please make sure to pass both low_cpu_mem_usage=False and ignore_mismatched_sizes=True. For more information, see also: huggingface/diffusers#1619 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions