openai / consistency_models

Official repo for consistency models.
MIT License
6.08k stars 411 forks source link

ModuleNotFoundError: No module named 'cm' #52

Open michaeltan53 opened 10 months ago

michaeltan53 commented 10 months ago

ModuleNotFoundError: No module named 'cm'

How to solve this problem when importing classes from cm package? Does it mean that the project have to be built first?

levisocool commented 10 months ago

The 'cm' module is already in the directory of 'consistency_models-main'. If your current directory where you run *.py (or other program) is not the same path as ‘cm’, then your "ModuleNotFoundError: No module named 'cm'" will occour.

Ontheroad123 commented 8 months ago

The 'cm' module is already in the directory of 'consistency_models-main'. If your current directory where you run *.py (or other program) is not the same path as ‘cm’, then your "ModuleNotFoundError: No module named 'cm'" will occour. 图片 i run ./scripts/cm_train.py,but still meet same error.

Ontheroad123 commented 8 months ago

The 'cm' module is already in the directory of 'consistency_models-main'. If your current directory where you run *.py (or other program) is not the same path as ‘cm’, then your "ModuleNotFoundError: No module named 'cm'" will occour. 图片 i run ./scripts/cm_train.py,but still meet same error.

I haver solve this problem, run 'python cm_train.py' and add 'sys.path.append('../')' in cm_train.py