详细错误
Traceback (most recent call last):File "D:\Classification\Diff-Plugin-main\demo.py", line 10, in <module>from modules import TPBNet, SCBNet, PromptTunnerModelFile "D:\Classification\Diff-Plugin-main\modules\__init__.py", line 2, in <module>from .SCB import SCBNetFile "D:\Classification\Diff-Plugin-main\modules\SCB.py", line 27, in <module>from diffusers.models.unet_2d_blocks import (
ModuleNotFoundError: No module named 'diffusers.models.unet_2d_blocks'
解决方法
版本更新了,调用方式发生了改变,将导入包的地方改为:
from diffusers.models.unets.unet_2d_blocks import (CrossAttnDownBlock2D,DownBlock2D,get_down_block,
)
from diffusers.models.unets.unet_2d_condition import UNet2DConditionModel