Traceback (most recent call last): File “D:\one-click-installers-main\text-generation-webui\server.py”, line 68, in load_model_wrapper shared.model, shared.tokenizer = load_model(shared.model_name, loader) File “D:\one-click-installers-main\text-generation-webui\modules\models.py”, line 78, in load_model output = load_func_maploader File “D:\one-click-installers-main\text-generation-webui\modules\models.py”, line 218, in huggingface_loader model = LoaderClass.from_pretrained(checkpoint, **params) File “D:\one-click-installers-main\installer_files\env\lib\site-packages\transformers\models\auto\auto_factory.py”, line 456, in from_pretrained config, kwargs = AutoConfig.from_pretrained( File “D:\one-click-installers-main\installer_files\env\lib\site-packages\transformers\models\auto\configuration_auto.py”, line 947, in from_pretrained trust_remote_code = resolve_trust_remote_code( File “D:\one-click-installers-main\installer_files\env\lib\site-packages\transformers\dynamic_module_utils.py”, line 553, in resolve_trust_remote_code raise ValueError( ValueError: Loading models\chatglm2-6b-int4 requires you to execute the configuration file in that repo on your local machine. Make sure you have read the code there to avoid malicious use, then set the option to remove this error.trust_remote_code=True
这个错误提示表明加载模型时出现了问题。它指出需要在本地执行模型配置文件来解决此错误。您可以尝试按照以下步骤操作:
- 确保您已经将模型的配置文件(chatglm2-6b-int4)下载到本地。
- 在本地运行配置文件并阅读其中的代码,确保没有恶意用途。
- 设置
trust_remote_code=True
,以允许加载模型时跳过这个错误。
如果您仍然遇到问题,建议您检查文件路径是否正确,并确保您具有足够的权限来读取和执行相关文件。如果问题仍然存在,请提供更多的上下文或错误信息,以便我可以更好地帮助您解决问题。
Traceback (most recent call last): File “D:\one-click-installers-main\text-generation-webui\server.py”, line 76, in load_model_wrapper shared.model, shared.tokenizer = load_model(shared.model_name) File “D:\one-click-installers-main\text-generation-webui\modules\models.py”, line 69, in load_model if shared.args.loader is not None: AttributeError: ‘Namespace’ object has no attribute ‘loader’
这个错误是由于在加载模型时出现了问题。根据错误信息,看起来是在加载模型时对shared.args.loader
属性进行了访问,但是shared.args
对象没有loader
属性。这可能是因为在加载模型之前,没有正确设置loader
参数。
你可以检查一下代码中的相关部分,确保正确设置了loader
参数。如果需要进一步帮助,请提供相关的代码片段,我将尽力帮助你解决问题。
2023-07-16 18:16:54,805 - roop - INFO - roop v0.0.2 Error loading script: swapper.py Traceback (most recent call last): File "D:\sd-webui-aki-v4\modules\scripts.py", line 256, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "D:\sd-webui-aki-v4\modules\script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "D:\sd-webui-aki-v4\extensions\sd-webui-roop\scripts\swapper.py", line 12, in <module> import insightface ModuleNotFoundError: No module named 'insightface'
It seems that there is still an error loading the script "swapper.py" due to the missing module "insightface". The error indicates that the "insightface" module is not installed in your environment.
You can try installing the "insightface" module using the following command:
pip install insightface
Make sure you have Python and pip installed on your system. After installing the module, try running the script again, and the error should be resolved.
If you already installed the "insightface" module and are still encountering this error, please ensure that you have installed it in the correct Python environment or virtual environment that you are using for your application.