Open Gianluca124 opened 1 year ago
I have the same problem with original notebook.
Same
Same here
Fairly reckless temporary workaround: I patched modeling.py:526
to be:
mean_leaves = int(sum([module_sizes[n] for n in leaves]) / ( len(leaves) or 1) )
Now I am able to generate images with the sample notebook
Same here
Fairly reckless temporary workaround: I patched
modeling.py:526
to be:mean_leaves = int(sum([module_sizes[n] for n in leaves]) / ( len(leaves) or 1) )
Now I am able to generate images with the sample notebook
It works, thank you
Same here
Fairly reckless temporary workaround: I patched
modeling.py:526
to be:mean_leaves = int(sum([module_sizes[n] for n in leaves]) / ( len(leaves) or 1) )
Now I am able to generate images with the sample notebook
@adamdavidcole @Gianluca124 can you please help me with how to implement this patch in google colab ?
Same here Fairly reckless temporary workaround: I patched
modeling.py:526
to be:mean_leaves = int(sum([module_sizes[n] for n in leaves]) / ( len(leaves) or 1) )
Now I am able to generate images with the sample notebook@adamdavidcole @Gianluca124 can you please help me with how to implement this patch in google colab ?
In my case I forked the accelerate
repository here on GitHub, I made the modification and then loaded on Colab my repository with the correction suggested by @adamdavidcole
here
Can you please help me with how to fork the accelerate repository in colab environment with steps. Thank You.
here
Can you please help me with how to fork the accelerate repository in colab environment with steps. Thank You.
1) Go to https://github.com/huggingface/accelerate and fork the repository
2) Now go to the forked repository (it should be something like https://github.com/{your_username}/accelerate) and made the modification inside the https://github.com/{your_username}/accelerate/blob/main/src/accelerate/utils/modeling.py
script
3) In Colab, instead of installing the original accelerate package you use !pip install git+https://github.com/{your_username}/accelerate
The rest of the notebook stays the same
here
Can you please help me with how to fork the accelerate repository in colab environment with steps. Thank You.
- Go to https://github.com/huggingface/accelerate and fork the repository
- Now go to the forked repository (it should be something like https://github.com/{your_username}/accelerate) and made the modification inside the
https://github.com/{your_username}/accelerate/blob/main/src/accelerate/utils/modeling.py
script- In Colab, instead of installing the original accelerate package you use
!pip install git+https://github.com/{your_username}/accelerate
The rest of the notebook stays the same
Thanks alot will check this
Same here
Fairly reckless temporary workaround: I patched
modeling.py:526
to be:mean_leaves = int(sum([module_sizes[n] for n in leaves]) / ( len(leaves) or 1) )
Now I am able to generate images with the sample notebook
Thank you, it works
here
Can you please help me with how to fork the accelerate repository in colab environment with steps. Thank You.
- Go to https://github.com/huggingface/accelerate and fork the repository
- Now go to the forked repository (it should be something like https://github.com/{your_username}/accelerate) and made the modification inside the
https://github.com/{your_username}/accelerate/blob/main/src/accelerate/utils/modeling.py
script- In Colab, instead of installing the original accelerate package you use
!pip install git+https://github.com/{your_username}/accelerate
The rest of the notebook stays the same
Thanks alot @Gianluca124 @adamdavidcole I was able to run the code and generate images :)
It's works for me with this adjust. Thank you. But now is in line 536.
I was trying the Colab Notebook: in particular, I modified the script in order to generate an image for a list of prompts. At first everything went well, but then the runtime disconnected, probably because GPU usage limits have been exceeded (I have the free version of Colab). Since then, with the same exact code, I got a ZeroDivisionError when I try to generate the images, in particular when the Text Embedding model is loaded. The error is the following:
Has anyone idea how to fix this?