升级pip或者pytorch时候有个警示

DEPRECATION: torchsde 0.2.5 has a non-standard dependency specifier numpy>=1.19.*; python_version >= "3.7". pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of torchsde or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063

解决办法是修改一行代码:

打开你的python安装目录,用记事本打开METADATA这个文件。

  • webui在的文件位置 .\stable-diffusion-webui\venv\Lib\site-packages\torchsde-0.2.5.dist-info\METADATA
  • comfyUI是你指定的python环境文件夹里,比如conda安装的python是在 ~/miniconda3/lib/python3.11/site-packages/torchsde-0.2.5.dist-info/METADATA

打开METADATA 找到第18行

Requires-Dist: numpy (>=1.19.*) ; python_version >= "3.7"

改为

Requires-Dist: numpy (>=1.19) ; python_version >= "3.7"

改完是这个样子:

升级pip或者pytorch时候有个警示 torchsde 0.2.5有问题,改一个文件解决

保存

重启webui或comfyUI,下次升级torch之类的就不会有这个警示了。