Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sdxl_prompt2prompt_mapper.py #569

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xiaokun-hadoop
Copy link

当前从官方拉取的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,可成功解决问题

Standardize the use of attention mechanism related modules
@HYLcool
Copy link
Collaborator

HYLcool commented Feb 7, 2025

你好 @xiaokun-hadoop ,感谢你对 Data-Juicer 的关注与使用!

我们在linux环境下没能复现你遇到的问题,并且我们暂时没有可用的windows环境,无法完全保证windows下的稳定性

不过我们发现diffusers这个依赖库在当前commit的确会成为minimal以来,从而运行demo的时候也会需要它,因此我们在PR #570 中对其进行了优化,避免了这个问题,你可以在该PR合并后再尝试下是否还会出现你遇到的问题~

@xiaokun-hadoop
Copy link
Author

@HYLcool 感谢回复,我这边尝试了PR #570 的优化方案,发现确实可以避免duffusers相关的问题。针对于单个问题而言,我这边的解决方案更加简洁,官方这边应该是还顺带解决了我这边没遇到的其它问题,期待Data-Juicer越来越好!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants