ModuleNotFoundError: No module named 'inference.utils'
Try to run the notebook for Image to Image, but can't able to locate from inference.utils import * from core.utils import load_or_fail from train import WurstCoreC, WurstCoreB
can't able to locate any of these module inference.utils, core, train
ModuleNotFoundError: No module named 'inference.utils' ModuleNotFoundError: No module named 'core' ModuleNotFoundError: No module named 'train'
Add the root of the project to your path.
import sys
sys.path.append('./)
And where it says os.chdir('..'), change that to the root of the project too. For instance, if you have the repo for the project in a folder called Projects on your home drive:
os.chdir('~/Projects/StableCascade')
You won't be at risk of changing your current working directory further up the tree each time you run the script if you make that change.
Also getting this error when try to load code from notebook for super resolution: ModuleNotFoundError Traceback (most recent call last) Cell In[1], line 8 5 from tqdm import tqdm 7 os.chdir('..') ----> 8 from inference.utils import * 9 from core.utils import load_or_fail 10 from train import ControlNetCore, WurstCoreB
ModuleNotFoundError: No module named 'inference.utils' please advice! I am using Windows.