borisdayma / dalle-mini

DALL·E Mini - Generate images from a text prompt
https://www.craiyon.com
Apache License 2.0
14.75k stars 1.21k forks source link

import error in inference pipeline notebook #319

Open ranpin opened 1 year ago

ranpin commented 1 year ago

hello, when i use the inference pipeline notebook given by the readme.md, i meet the following error. I didnot change anything but just run the codes one by one, how can i deal with the problem?

image

WangTiantian139 commented 1 year ago

The file structure of the lib transformers has changed in recent updates, so the python interpreter can not find the class to be imported named FlaxSampleOutput. I have fixed the error by changing the module transformers.generation_flax_utils into transformers.generation.flax_utils.

- 33 from transformers.generation_flax_utils import FlaxSampleOutput
+ 33 from transformers.generation.flax_utils import FlaxSampleOutput

You can find the file at %your_python_path%/lib/python3.9/site-packages/dalle_mini/model/modeling.py. Please replace %your_python_path% into the path in your environment.

borisdayma commented 1 year ago

Thanks for flagging it. I had fixed in the repo but forgot to upload the updated version to pypi. Now it should work fine.

sajeedmehrab commented 1 year ago

image

borisdayma commented 1 year ago

This was a different issue that happened shortly after 😅 Should be fixed. I pinned transformers version.