Update sdxl_prompt2prompt_mapper.py #569
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
当前从官方拉取的main分支,在windows10 1607版本 python3.9环境,使用源码安装方式之后,运行数据处理demo:python tools/process_data.py --config configs/demo/process.yaml时,会报错 AttributeError:module diffusers.models has no attribute attention,根据报错内容定位到源码,sdxl_prompt2prompt_mapper.py 704行 Attention 使用的是注意力机制相关的模块,所以需要显示导入,增加一行代码 from diffusers.models.attention import Attention,可成功解决问题