Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Trouble with AutoencoderKL #484

Open
khanhhoaa19 opened this issue Apr 9, 2024 · 6 comments
Open

Trouble with AutoencoderKL #484

khanhhoaa19 opened this issue Apr 9, 2024 · 6 comments

Comments

@khanhhoaa19
Copy link

Hi I have a trouble when import AutoencoderKL from generative
image

@marksgraham
Copy link
Collaborator

Please try updating monai-generative to the latest version

@khanhhoaa19
Copy link
Author

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

@marksgraham
Copy link
Collaborator

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?

@khanhhoaa19
Copy link
Author

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'

@marksgraham
Copy link
Collaborator

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

@virginiafdez
Copy link
Contributor

Has this issue been resolved with the last suggestion?

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

No branches or pull requests

3 participants