mira-space / Mira

GNU General Public License v3.0
298 stars 9 forks source link

No module named 'mira' #8

Open SHYuanBest opened 2 months ago

SHYuanBest commented 2 months ago

inference.py 19 from models.samplers.ddim import DDIMSampler

ddim.py 7 from mira.models.utils_diffusion import make_ddim_sampling_parameters, make_ddim_timesteps

ModuleNotFoundError: No module named 'mira'

SHYuanBest commented 2 months ago

ddp_wrapper.py 40 inference_api = importlib.import_module(args.module, package=None)

init.py 127 import_module return _bootstrap._gcd_import(name[level:], package, level)

1014 _gcd_import 991 _find_and_load 975 _find_and_load_unlocked 671 _load_unlocked 783 exec_module 219 _call_with_frames_removed inference.py 19 from models.samplers.ddim import DDIMSampler ddim.py 7 from mira.models.utils_diffusion import make_ddim_sampling_parameters, make_ddim_timesteps ModuleNotFoundError: No module named 'mira'
MqLeet commented 3 weeks ago

This is an error about environment path, just add

sys.path.insert(1, os.path.join(sys.path[0], '..', '..', '..'))

before

from mira.models.samplers.ddim import DDIMSampler

will fix this bug.