GenerativeModels icon indicating copy to clipboard operation
GenerativeModels copied to clipboard

Trouble with AutoencoderKL

Open khanhhoaa19 opened this issue 1 year ago • 6 comments

Hi I have a trouble when import AutoencoderKL from generative image

khanhhoaa19 avatar Apr 09 '24 10:04 khanhhoaa19

Please try updating monai-generative to the latest version

marksgraham avatar Apr 09 '24 14:04 marksgraham

I am using the latest version (monai-generative version 0.2.3 and monai version 1.3.0) downloaded from PyPI, but I am still encountering the same error

khanhhoaa19 avatar Apr 10 '24 02:04 khanhhoaa19

What happens when you print model.use_checkpointing? Can you share a minimal version of your code that reproduces this problem that I could try to play with?

marksgraham avatar Apr 10 '24 08:04 marksgraham

When I call the generative-monai

from generative.losses import PatchAdversarialLoss, PerceptualLoss from generative.networks.nets import AutoencoderKL, PatchDiscriminator

The terminal encountered an error related to 'model.use_checkpointing'

khanhhoaa19 avatar Apr 11 '24 03:04 khanhhoaa19

This suggests a problem with your install to me. If i create a fresh environment and run pip install monai-generative then I can run no problem:

from generative.networks.nets import AutoencoderKL
net = AutoencoderKL(spatial_dims=2)
print(net.use_checkpointing)

I would recommend trying again in a fresh virtual environment

marksgraham avatar Apr 11 '24 09:04 marksgraham

Has this issue been resolved with the last suggestion?

virginiafdez avatar Jun 19 '24 09:06 virginiafdez