Skip to content

checkpoint error #5

Description

@DDgogogo

The checkpoints you provided mismatch the model, can you help me?

Traceback (most recent call last):
  File "DiffusionBridge/sample.py", line 206, in <module>
    main()
  File "DiffusionBridge/sample.py", line 53, in main
    model.load_state_dict(torch.load(args.model_path, map_location="cpu"))
  File "/root/anaconda3/envs/ddbm/lib/python3.12/site-packages/torch/nn/modules/module.py", line 2153, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for UNetModel:
        size mismatch for input_blocks.5.1.qkv.weight: copying a param with shape torch.Size([1152, 384, 1, 1]) from checkpoint, the shape in current model is torch.Size([1152, 384, 1]).
        size mismatch for input_blocks.5.1.proj_out.weight: copying a param with shape torch.Size([384, 384, 1, 1]) from checkpoint, the shape in current model is torch.Size([384, 384, 1]).
        size mismatch for input_blocks.6.1.qkv.weight: copying a param with shape torch.Size([1152, 384, 1, 1]) from checkpoint, the shape in current model is torch.Size([1152, 384, 1]).
        size mismatch for input_blocks.6.1.proj_out.weight: copying a param with shape torch.Size([384, 384, 1, 1]) from checkpoint, the shape in current model is torch.Size([384, 384, 1]).
        size mismatch for input_blocks.7.1.qkv.weight: copying a param with shape torch.Size([1152, 384, 1, 1]) from checkpoint, the shape in current model is torch.Size([1152, 384, 1]).
        size mismatch for input_blocks.7.1.proj_out.weight: copying a param with shape torch.Size([384, 384, 1, 1]) from checkpoint, the shape in current model is torch.Size([384, 384, 1]).
        size mismatch for input_blocks.9.1.qkv.weight: copying a param with shape torch.Size([1728, 576, 1, 1]) from checkpoint, the shape in current model is torch.Size([1728, 576, 1]).
        size mismatch for input_blocks.9.1.proj_out.weight: copying a param with shape torch.Size([576, 576, 1, 1]) from checkpoint, the shape in current model is torch.Size([576, 576, 1]).
        size mismatch for input_blocks.10.1.qkv.weight: copying a param with shape torch.Size([1728, 576, 1, 1]) from checkpoint, the shape in current model is torch.Size([1728, 576, 1]).
        size mismatch for input_blocks.10.1.proj_out.weight: copying a param with shape torch.Size([576, 576, 1, 1]) from checkpoint, the shape in current model is torch.Size([576, 576, 1]).
        size mismatch for input_blocks.11.1.qkv.weight: copying a param with shape torch.Size([1728, 576, 1, 1]) from checkpoint, the shape in current model is torch.Size([1728, 576, 1]).
        size mismatch for input_blocks.11.1.proj_out.weight: copying a param with shape torch.Size([576, 576, 1, 1]) from checkpoint, the shape in current model is torch.Size([576, 576, 1]).
        size mismatch for input_blocks.13.1.qkv.weight: copying a param with shape torch.Size([2304, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([2304, 768, 1]).
        size mismatch for input_blocks.13.1.proj_out.weight: copying a param with shape torch.Size([768, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([768, 768, 1]).
        size mismatch for input_blocks.14.1.qkv.weight: copying a param with shape torch.Size([2304, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([2304, 768, 1]).
        size mismatch for input_blocks.14.1.proj_out.weight: copying a param with shape torch.Size([768, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([768, 768, 1]).
        size mismatch for input_blocks.15.1.qkv.weight: copying a param with shape torch.Size([2304, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([2304, 768, 1]).
        size mismatch for input_blocks.15.1.proj_out.weight: copying a param with shape torch.Size([768, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([768, 768, 1]).
        size mismatch for middle_block.1.qkv.weight: copying a param with shape torch.Size([2304, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([2304, 768, 1]).
        size mismatch for middle_block.1.proj_out.weight: copying a param with shape torch.Size([768, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([768, 768, 1]).
        size mismatch for output_blocks.0.1.qkv.weight: copying a param with shape torch.Size([2304, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([2304, 768, 1]).
        size mismatch for output_blocks.0.1.proj_out.weight: copying a param with shape torch.Size([768, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([768, 768, 1]).
        size mismatch for output_blocks.1.1.qkv.weight: copying a param with shape torch.Size([2304, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([2304, 768, 1]).
        size mismatch for output_blocks.1.1.proj_out.weight: copying a param with shape torch.Size([768, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([768, 768, 1]).
        size mismatch for output_blocks.2.1.qkv.weight: copying a param with shape torch.Size([2304, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([2304, 768, 1]).
        size mismatch for output_blocks.2.1.proj_out.weight: copying a param with shape torch.Size([768, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([768, 768, 1]).
        size mismatch for output_blocks.3.1.qkv.weight: copying a param with shape torch.Size([2304, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([2304, 768, 1]).
        size mismatch for output_blocks.3.1.proj_out.weight: copying a param with shape torch.Size([768, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([768, 768, 1]).
        size mismatch for output_blocks.4.1.qkv.weight: copying a param with shape torch.Size([1728, 576, 1, 1]) from checkpoint, the shape in current model is torch.Size([1728, 576, 1]).
        size mismatch for output_blocks.4.1.proj_out.weight: copying a param with shape torch.Size([576, 576, 1, 1]) from checkpoint, the shape in current model is torch.Size([576, 576, 1]).
        size mismatch for output_blocks.5.1.qkv.weight: copying a param with shape torch.Size([1728, 576, 1, 1]) from checkpoint, the shape in current model is torch.Size([1728, 576, 1]).
        size mismatch for output_blocks.5.1.proj_out.weight: copying a param with shape torch.Size([576, 576, 1, 1]) from checkpoint, the shape in current model is torch.Size([576, 576, 1]).
        size mismatch for output_blocks.6.1.qkv.weight: copying a param with shape torch.Size([1728, 576, 1, 1]) from checkpoint, the shape in current model is torch.Size([1728, 576, 1]).
        size mismatch for output_blocks.6.1.proj_out.weight: copying a param with shape torch.Size([576, 576, 1, 1]) from checkpoint, the shape in current model is torch.Size([576, 576, 1]).
        size mismatch for output_blocks.7.1.qkv.weight: copying a param with shape torch.Size([1728, 576, 1, 1]) from checkpoint, the shape in current model is torch.Size([1728, 576, 1]).
        size mismatch for output_blocks.7.1.proj_out.weight: copying a param with shape torch.Size([576, 576, 1, 1]) from checkpoint, the shape in current model is torch.Size([576, 576, 1]).
        size mismatch for output_blocks.8.1.qkv.weight: copying a param with shape torch.Size([1152, 384, 1, 1]) from checkpoint, the shape in current model is torch.Size([1152, 384, 1]).
        size mismatch for output_blocks.8.1.proj_out.weight: copying a param with shape torch.Size([384, 384, 1, 1]) from checkpoint, the shape in current model is torch.Size([384, 384, 1]).
        size mismatch for output_blocks.9.1.qkv.weight: copying a param with shape torch.Size([1152, 384, 1, 1]) from checkpoint, the shape in current model is torch.Size([1152, 384, 1]).
        size mismatch for output_blocks.9.1.proj_out.weight: copying a param with shape torch.Size([384, 384, 1, 1]) from checkpoint, the shape in current model is torch.Size([384, 384, 1]).
        size mismatch for output_blocks.10.1.qkv.weight: copying a param with shape torch.Size([1152, 384, 1, 1]) from checkpoint, the shape in current model is torch.Size([1152, 384, 1]).
        size mismatch for output_blocks.10.1.proj_out.weight: copying a param with shape torch.Size([384, 384, 1, 1]) from checkpoint, the shape in current model is torch.Size([384, 384, 1]).
        size mismatch for output_blocks.11.1.qkv.weight: copying a param with shape torch.Size([1152, 384, 1, 1]) from checkpoint, the shape in current model is torch.Size([1152, 384, 1]).
        size mismatch for output_blocks.11.1.proj_out.weight: copying a param with shape torch.Size([384, 384, 1, 1]) from checkpoint, the shape in current model is torch.Size([384, 384, 1]).

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