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

TypeError: 'type' object is not subscriptable #253

@Warvito

Description

@Warvito

After adding the notations, started to get this error

Traceback (most recent call last):
  File "/project/src/python/training/train_aekl.py", line 8, in <module>
    from generative.networks.nets import AutoencoderKL
  File "/usr/local/lib/python3.8/dist-packages/generative/networks/nets/__init__.py", line 18, in <module>
    from .vqvae import VQVAE
  File "/usr/local/lib/python3.8/dist-packages/generative/networks/nets/vqvae.py", line 22, in <module>
    from generative.networks.layers.vector_quantizer import EMAQuantizer, VectorQuantizer
  File "/usr/local/lib/python3.8/dist-packages/generative/networks/layers/__init__.py", line 12, in <module>
    from .vector_quantizer import EMAQuantizer, VectorQuantizer
  File "/usr/local/lib/python3.8/dist-packages/generative/networks/layers/vector_quantizer.py", line 20, in <module>
    class EMAQuantizer(nn.Module):
  File "/usr/local/lib/python3.8/dist-packages/generative/networks/layers/vector_quantizer.py", line 87, in EMAQuantizer
    def quantize(self, inputs: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
TypeError: 'type' object is not subscriptable

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions