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: object of type 'itertools.pairwise' has no len() #286

Open
mjleone opened this issue Apr 18, 2024 · 0 comments
Open

TypeError: object of type 'itertools.pairwise' has no len() #286

mjleone opened this issue Apr 18, 2024 · 0 comments

Comments

@mjleone
Copy link

mjleone commented Apr 18, 2024

Hello,

Happy to try out DNA-Diffusion in my lab. I found that when I run train.py (accelerate launch train.py), I have an error in unet.py:
At the line num_resolutions = len(in_out)

I get this error:
TypeError: object of type 'itertools.pairwise' has no len()

I tried the workaround:
in_out = tuple(in_out)

How did this run as itertools.pairwise, is it a different version of itertools? I have python 3.10

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

1 participant