XiangLi1999 / Diffusion-LM

Diffusion-LM
Apache License 2.0
1.02k stars 133 forks source link

Error when running training script on Google Colab #57

Closed ostov-larion closed 1 year ago

ostov-larion commented 1 year ago
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'
lihkinVerma commented 1 year ago

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')

ostov-larion commented 1 year ago

Thanks.