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

cannot import name 'optim' from 'flax' error #14

Open
hanshounsu opened this issue Jan 15, 2023 · 2 comments
Open

cannot import name 'optim' from 'flax' error #14

hanshounsu opened this issue Jan 15, 2023 · 2 comments

Comments

@hanshounsu
Copy link

Hello, I am currently trying the demo, synthesize_midi.ipynb, and when executing the below line

from music_spectrogram_diffusion.models.diffusion import models

the error from the title occurs:
ImportError: cannot import name 'optim' from 'flax' (/usr/local/lib/python3.8/dist-packages/flax/init.py)

I think the issue is due to update of t5x, and I'm struggling to solve the problem by myself. It would be grateful for some help..!

@cghawthorne
Copy link
Contributor

Yeah, I think we no longer need to pin T5X to an old version now that Colab supports Python 3.8, but I'm getting some weird TPU errors when I try to use the newer packages. I'll let you know if I get it figured out, but feel free to experiment with unpinning some of the packages in the meantime.

@cghawthorne
Copy link
Contributor

Reopening since this still isn't working (and I still haven't figured out a fix).

@cghawthorne cghawthorne reopened this Feb 1, 2023
@cghawthorne cghawthorne mentioned this issue Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants