pythonmachine-learninghuggingfacestable-diffusion

cannot import name 'randn_tensor' from 'diffusers.utils'


enter image description here

I was using this autotrain collab and when i labbelled and put my images into images folder and tried to run it , It says this error how do i solve this ?

to reproduce :

  1. click link of ipynb

  2. make a new folder name images

  3. add some images and replace the prompt to something which describes your images

  4. go to runtime and run all

ipynb link


Solution

  • This is happening due to the newer version of diffusers library. At the very start, run pip install diffusers==0.20.2 and then execute the cells.