Project-MONAI / GenerativeModels

MONAI Generative Models makes it easy to train, evaluate, and deploy generative models and related applications
Apache License 2.0
625 stars 87 forks source link

Unused projection layer in AttentionBlock #503

Open ChristianHinge opened 2 months ago

ChristianHinge commented 2 months ago

After wrapping a MONAI AutoencoderKL model in pytorch lightning, I got an error regarding an unused parameter in the custom AttentionBlock implementation.

diffusion_model_unet.py and autoencoderkl.py line 233:

self.proj_attn = nn.Linear(num_channels, num_channels)

To me, it looks like this layers is completely unused. I cannot tell whether it is a mistake that this parameter is unsued, or if it should have never been defined in the first place.

virginiafdez commented 1 month ago

Hello,

Apologies for the delay. This repository is going to be archived, as it has all been integrated into MONAI Core (https://github.com/Project-MONAI/MONAI). I believe this issue has been addressed during the porting. Could you check by using the latest MONAI version incorporating the generative functions? If the issue persists there, please do open an Issue in MONAI Core and we will have a look as soon as possible.

Thank you very much!

Virginia