LAION-AI / dalle2-laion

Pretrained Dalle2 from laion
499 stars 66 forks source link

Error has occurred in google colab notebook #29

Closed Ishihara-Masabumi closed 1 year ago

Ishihara-Masabumi commented 1 year ago

Hello,

Thanks for your valuable work! When I run notebook of dalle2-laion on google colab, the following error occurred.

AttributeError                            Traceback (most recent call last)
[<ipython-input-16-578a5f9162bc>](https://localhost:8080/#) in <module>
     86     img.save(f"./reranked_output/example_{index}.png")
     87 
---> 88 rerank_test(5, 50)

5 frames
[/usr/local/lib/python3.7/dist-packages/ftfy/__init__.py](https://localhost:8080/#) in fix_text(text, config, **kwargs)
    302     pos = 0
    303     while pos < len(text):
--> 304         textbreak = text.find("\n", pos) + 1
    305         if textbreak == 0:
    306             textbreak = len(text)

AttributeError: 'list' object has no attribute 'find'

If you has any idea, please let me know that.

Thank you.

shanmukhav-newzera commented 1 year ago

I am facing the same issue, There are some fixes here : https://stackoverflow.com/questions/23201351/list-object-has-no-attribute-find

But not sure editing the '/usr/local/lib/python3.7/dist-packages/ftfy/init.py' file resolves the error in google colab

nousr commented 1 year ago

the colab notebook has been removed from the readme as it is outdated. please use the inference pipeline locally on a machine with enough VRAM 👍

Ishihara-Masabumi commented 1 year ago

Thanks.