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

TypeError: unsupported operand type(s) for *: 'EncoderOutput' and 'float' #155

Open
Pevernow opened this issue Jan 19, 2025 · 2 comments
Open
Labels
Answered Answered the question bug Something isn't working fixed fix a bug

Comments

@Pevernow
Copy link
Contributor

Pevernow commented Jan 19, 2025

Image
Use train.py to train with the above configuration

 Traceback (most recent call last):
[rank0]:   File "/home/linjl/zzc/Sana/train_scripts/train.py", line 1017, in <module>
[rank0]:     main()
[rank0]:   File "/home/linjl/anaconda3/envs/sana/lib/python3.10/site-packages/pyrallis/argparsing.py", line 158, in wrapper_inner
[rank0]:     response = fn(cfg, *args, **kwargs)
[rank0]:   File "/home/linjl/zzc/Sana/train_scripts/train.py", line 1002, in main
[rank0]:     train(
[rank0]:   File "/home/linjl/zzc/Sana/train_scripts/train.py", line 319, in train
[rank0]:     z = vae_encode(
[rank0]:   File "/home/linjl/zzc/Sana/diffusion/model/builder.py", line 117, in vae_encode
[rank0]:     z = z * scaling_factor
[rank0]: TypeError: unsupported operand type(s) for *: 'EncoderOutput' and 'float'
[rank2]: Traceback (most recent call last):
[rank2]:   File "/home/linjl/zzc/Sana/train_scripts/train.py", line 1017, in <module>
[rank2]:     main()
[rank2]:   File "/home/linjl/anaconda3/envs/sana/lib/python3.10/site-packages/pyrallis/argparsing.py", line 158, in wrapper_inner
[rank2]:     response = fn(cfg, *args, **kwargs)
[rank2]:   File "/home/linjl/zzc/Sana/train_scripts/train.py", line 1002, in main
[rank2]:     train(
[rank2]:   File "/home/linjl/zzc/Sana/train_scripts/train.py", line 319, in train
[rank2]:     z = vae_encode(
[rank2]:   File "/home/linjl/zzc/Sana/diffusion/model/builder.py", line 117, in vae_encode
[rank2]:     z = z * scaling_factor
[rank2]: TypeError: unsupported operand type(s) for *: 'EncoderOutput' and 'float'
[rank1]: Traceback (most recent call last):
[rank1]:   File "/home/linjl/zzc/Sana/train_scripts/train.py", line 1017, in <module>
[rank1]:     main()
[rank1]:   File "/home/linjl/anaconda3/envs/sana/lib/python3.10/site-packages/pyrallis/argparsing.py", line 158, in wrapper_inner
[rank1]:     response = fn(cfg, *args, **kwargs)
[rank1]:   File "/home/linjl/zzc/Sana/train_scripts/train.py", line 1002, in main
[rank1]:     train(
[rank1]:   File "/home/linjl/zzc/Sana/train_scripts/train.py", line 319, in train
[rank1]:     z = vae_encode(
[rank1]:   File "/home/linjl/zzc/Sana/diffusion/model/builder.py", line 117, in vae_encode
[rank1]:     z = z * scaling_factor
[rank1]: TypeError: unsupported operand type(s) for *: 'EncoderOutput' and 'float'
@lawrence-cj
Copy link
Collaborator

Thanks for noticing. Will fix very soon.

@lawrence-cj lawrence-cj added bug Something isn't working Answered Answered the question labels Jan 20, 2025
@lawrence-cj
Copy link
Collaborator

lawrence-cj commented Jan 20, 2025

This PR will fix the problem.

#158

@lawrence-cj lawrence-cj added the fixed fix a bug label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Answered Answered the question bug Something isn't working fixed fix a bug
Projects
None yet
Development

No branches or pull requests

2 participants