XiangLi1999/Diffusion-LM

Error when running training script on Google Colab

ostov-larion opened this issue · 2 comments

Traceback (most recent call last):
  File "scripts/train.py", line 8, in <module>
    from improved_diffusion import dist_util, logger
ModuleNotFoundError: No module named 'improved_diffusion'

Make sure improved_diffusion folder is in system path for it to be accessible.
To check system path in python use:-

import sys
print(sys.path) # Put it before line 8 in script/train.py file

if the printed results have improved_difffusion folder path then it should work, probably that is missing while running on colab.
You can use following command before line 8 to add that to sys path

sys.path.insert(0, '//Diffusion-LM-main/improved-diffusion')

Thanks.