Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cifar10 example error #4

Open
qiuyang163 opened this issue Oct 25, 2023 · 3 comments
Open

cifar10 example error #4

qiuyang163 opened this issue Oct 25, 2023 · 3 comments

Comments

@qiuyang163
Copy link

run
bash scripts/prune_ddpm_cifar10.sh 0.3
then I got error:
image
I seems that q、k、v in_features is not equal to out_features
image
@VainF

@VainF
Copy link
Owner

VainF commented Oct 25, 2023

Hi @qiuyang163, thanks for reaching out. The script works on my side.

      (attn): ModuleList()
      (upsample): Upsample(
        (conv): Conv2d(179, 192, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      )
    )
  )
  (norm_out): GroupNorm(32, 96, eps=1e-06, affine=True)
  (conv_out): Conv2d(96, 3, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
)
#Params: 35.7463 M => 19.8512 M
#MACs: 6.0655 G => 3.3928 G
Saving pruned model as run/finetune_simple_v2/cifar10_ours_T=0.05.pth/logs/post_training/pruned_model.pth

My env: pytorch==1.13.1, torch_pruning==1.3.1.

BTW, the in_features of qkv does not need to be equal to the out_features.

@qiuyang163
Copy link
Author

qiuyang163 commented Oct 25, 2023

Hi @qiuyang163, thanks for reaching out. The script works on my side.

      (attn): ModuleList()
      (upsample): Upsample(
        (conv): Conv2d(179, 192, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      )
    )
  )
  (norm_out): GroupNorm(32, 96, eps=1e-06, affine=True)
  (conv_out): Conv2d(96, 3, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
)
#Params: 35.7463 M => 19.8512 M
#MACs: 6.0655 G => 3.3928 G
Saving pruned model as run/finetune_simple_v2/cifar10_ours_T=0.05.pth/logs/post_training/pruned_model.pth

My env: pytorch==1.13.1, torch_pruning==1.3.1

yes,I got it,I succed in torch==1.13.1. But if I update to torch2.0, it failed
The reason is when use torch 2.0, diffusers lib will use attn_processor2.0 instead of attn_processor
Tks for reply

@VainF
Copy link
Owner

VainF commented Oct 25, 2023

Thank you, will fix it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants