Replies: 1 comment 1 reply
-
下载的模型损坏了,建议删除原来的模型,再手动下载:https://lama-cleaner-docs.vercel.app/install/download_model_manually |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
┌─────────────────────────────── Traceback (most recent call last) ────────────────────────────────┐
│ D:\idm\压缩\lama-cleaner-win-v2\lama-cleaner\installer\lib\runpy.py:196 in _run_module_as_main │
│ │
│ 193 │ main_globals = sys.modules["main"].dict │
│ 194 │ if alter_argv: │
│ 195 │ │ sys.argv[0] = mod_spec.origin │
│ > 196 │ return _run_code(code, main_globals, None, │
│ 197 │ │ │ │ │ "main", mod_spec) │
│ 198 │
│ 199 def run_module(mod_name, init_globals=None, │
│ │
│ D:\idm\压缩\lama-cleaner-win-v2\lama-cleaner\installer\lib\runpy.py:86 in _run_code │
│ │
│ 83 │ │ │ │ │ loader = loader, │
│ 84 │ │ │ │ │ package = pkg_name, │
│ 85 │ │ │ │ │ spec = mod_spec) │
│ > 86 │ exec(code, run_globals) │
│ 87 │ return run_globals │
│ 88 │
│ 89 def run_module_code(code, init_globals=None, │
│ │
│ D:\idm\压缩\lama-cleaner-win-v2\lama-cleaner\installer\Scripts\lama-cleaner.exe_main.py:7 in │
│ │
│ │
│ [Errno 2] No such file or directory: │
│ 'D:\idm\压缩\lama-cleaner-win-v2\lama-cleaner\installer\Scripts\lama-cleaner.exe\_main │
│ .py' │
│ │
│ D:\idm\压缩\lama-cleaner-win-v2\lama-cleaner\installer\lib\site-packages\lama_cleaner_init.p │
│ y:11 in entry_point │
│ │
│ 8 │ # To make os.environ["XDG_CACHE_HOME"] = args.model_cache_dir works for diffusers │
│ 9 │ # https://github.com/huggingface/diffusers/blob/be99201a567c1ccd841dc16fb24e88f7f239 │
│ 10 │ from lama_cleaner.server import main │
│ > 11 │ main(args) │
│ 12 │
│ │
│ D:\idm\压缩\lama-cleaner-win-v2\lama-cleaner\installer\lib\site-packages\lama_cleaner\server.py: │
│ 390 in main │
│ │
│ 387 │ else: │
│ 388 │ │ input_image_path = args.input │
│ 389 │ │
│ > 390 │ model = ModelManager( │
│ 391 │ │ name=args.model, │
│ 392 │ │ device=device, │
│ 393 │ │ no_half=args.no_half, │
│ │
│ D:\idm\压缩\lama-cleaner-win-v2\lama-cleaner\installer\lib\site-packages\lama_cleaner\model_mana │
│ er.py:24 in init │
│ │
│ 21 │ │ self.name = name │
│ 22 │ │ self.device = device │
│ 23 │ │ self.kwargs = kwargs │
│ > 24 │ │ self.model = self.init_model(name, device, **kwargs) │
│ 25 │ │
│ 26 │ def init_model(self, name: str, device, **kwargs): │
│ 27 │ │ if name in models: │
│ │
│ D:\idm\压缩\lama-cleaner-win-v2\lama-cleaner\installer\lib\site-packages\lama_cleaner\model_mana │
│ er.py:28 in init_model │
│ │
│ 25 │ │
│ 26 │ def init_model(self, name: str, device, **kwargs): │
│ 27 │ │ if name in models: │
│ > 28 │ │ │ model = models[name](device, **kwargs) │
│ 29 │ │ else: │
│ 30 │ │ │ raise NotImplementedError(f"Not supported model: {name}") │
│ 31 │ │ return model │
│ │
│ D:\idm\压缩\lama-cleaner-win-v2\lama-cleaner\installer\lib\site-packages\lama_cleaner\model\base │
│ .py:25 in init │
│ │
│ 22 │ │ │ device: │
│ 23 │ │ """ │
│ 24 │ │ self.device = device │
│ > 25 │ │ self.init_model(device, **kwargs) │
│ 26 │ │
│ 27 │ @abc.abstractmethod │
│ 28 │ def init_model(self, device, **kwargs): │
│ │
│ D:\idm\压缩\lama-cleaner-win-v2\lama-cleaner\installer\lib\site-packages\lama_cleaner\model\lama │
│ .py:31 in init_model │
│ │
│ 28 │ │ else: │
│ 29 │ │ │ model_path = download_model(LAMA_MODEL_URL) │
│ 30 │ │ logger.info(f"Load LaMa model from: {model_path}") │
│ > 31 │ │ model = torch.jit.load(model_path, map_location="cpu") │
│ 32 │ │ model = model.to(device) │
│ 33 │ │ model.eval() │
│ 34 │ │ self.model = model │
│ │
│ D:\idm\压缩\lama-cleaner-win-v2\lama-cleaner\installer\lib\site-packages\torch\jit_serializatio │
│ .py:162 in load │
│ │
│ 159 │ │
│ 160 │ cu = torch._C.CompilationUnit() │
│ 161 │ if isinstance(f, str) or isinstance(f, pathlib.Path): │
│ > 162 │ │ cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files) │
│ 163 │ else: │
│ 164 │ │ cpp_module = torch._C.import_ir_module_from_buffer( │
│ 165 │ │ │ cu, f.read(), map_location, _extra_files │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
RuntimeError: Unrecognized data format
请按任意键继续. . .
Beta Was this translation helpful? Give feedback.
All reactions