Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

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

@hanshounsu

Description

@hanshounsu

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..!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions