Python 3.10.10 | packaged by conda-forge | (main, Mar 24 2023, 20:00:38) [MSC v.1934 64 bit (AMD64)]
Commit hash:
Installing requirements for Web UI
Installing requirement for sd-webui-controlnet
Launching Web UI with arguments:
D:\Anaconda3\envs\xd\lib\site-packages\torchvision\transforms\functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be removed in 0.17. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional.
warnings.warn(
Traceback (most recent call last):
File "d:\cvcompte\painting-gallery\stable-diffusion2-webui-master\launch.py", line 361, in
start()
File "d:\cvcompte\painting-gallery\stable-diffusion2-webui-master\launch.py", line 352, in start
import webui
File "d:\cvcompte\painting-gallery\stable-diffusion2-webui-master\webui.py", line 15, in
from modules import import_hook, errors, extra_networks, ui_extra_networks_checkpoints
File "d:\cvcompte\painting-gallery\stable-diffusion2-webui-master\modules\ui_extra_networks_checkpoints.py", line 6, in from modules import shared, ui_extra_networks, sd_models
File "D:\cvcompte\painting-gallery\stable-diffusion2-webui-master\modules\sd_models.py", line 17, in
from modules.sd_hijack_inpainting import do_inpainting_hijack
File "D:\cvcompte\painting-gallery\stable-diffusion2-webui-master\modules\sd_hijack_inpainting.py", line 7, in
import ldm.models.diffusion.ddpm
File "D:\cvcompte\painting-gallery\stable-diffusion2-webui-master\repositories\stable-diffusion-stability-ai\ldm\models\diffusion\ddpm.py", line 12, in
import pytorch_lightning as pl
File "D:\Anaconda3\envs\xd\lib\site-packages\pytorch_lightning__init.py", line 34, in
from pytorch_lightning.callbacks import Callback # noqa: E402
File "D:\Anaconda3\envs\xd\lib\site-packages\pytorch_lightning\callbacks\init.py", line 25, in
from pytorch_lightning.callbacks.progress import ProgressBarBase, RichProgressBar, TQDMProgressBar
File "D:\Anaconda3\envs\xd\lib\site-packages\pytorch_lightning\callbacks\progress\init__.py", line 22, in
from pytorch_lightning.callbacks.progress.rich_progress import RichProgressBar # noqa: F401
File "D:\Anaconda3\envs\xd\lib\site-packages\pytorch_lightning\callbacks\progress\rich_progress.py", line 20, in
from torchmetrics.utilities.imports import _compare_version
ImportError: cannot import name '_compare_version' from 'torchmetrics.utilities.imports' (D:\Anaconda3\envs\xd\lib\site-packages\torchmetrics\utilities\imports.py)
楼主你好,看了你的报错信息可以看出torch和torchvision的版本兼容性问题导致了错误的发生,是由于模块pytorch_lightning中的torchmetrics库无法导入torchmetrics.utilities.imports模块下的_compare_version函数。
你可以直接尝试更新torch和torchvision的版本,你可以使用pip或conda命令来更新这两个库,比如:
conda update torch torchvision
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
人工智能平台 PAI(Platform for AI,原机器学习平台PAI)是面向开发者和企业的机器学习/深度学习工程平台,提供包含数据标注、模型构建、模型训练、模型部署、推理优化在内的AI开发全链路服务,内置140+种优化算法,具备丰富的行业场景插件,为用户提供低门槛、高性能的云原生AI工程化能力。