-
Notifications
You must be signed in to change notification settings - Fork 109
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
fix compatibility with peft and diffusers 0.26.1 #626
Conversation
chengzeyi
commented
Feb 5, 2024
•
edited
Loading
edited
- Fix converter warning for LoraCompatibleLinear.
- Fix import error for diffusers==0.26.1 which causes patch failure.
- Change default log level to warning to make mistakes more noticeable.
- Check if libs are available before apply patches.
return flow.nn.Linear | ||
# Workaround for Linear and LoRACompatibleLinear. | ||
if inspect.isclass(obj): | ||
return obj |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个问题已经在 #621 中修复
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@strint 不行的,我这里转LoraCompatibleLinear还是会有问题,diffusers==0.25.1也会
不过也不是不能跑。而是会打很多warning出来,因为转失败了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ccssu 来看看,感觉是两个问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
很多warning出来具体是? 我用 python examples/text_to_image_sdxl_lora.py
diffusers.version='0.25.1' 测试没有很多warning出来
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
现在main分支上的没有warning是因为onediff里把log level设置成error了,这反而造成出现很多问题不好定位,比如和新版本的diffusers的兼容性问题,这次也把这个修了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
顺便建议把onediffx的diffusers的版本要求放宽一点,现在diffusers更新的还是比较快的,已经到0.26了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好像是没有修复,我是今天刚拉的?难道是main分支今天有变动?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯是的,今天的改动,我刚刚 Update Branch,可以试试把 if inspect.isclass(obj): 注释掉实验下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯是的,今天的改动,我刚刚 Update Branch,可以试试把 if inspect.isclass(obj): 注释掉实验下
👍刚才试了一下已经修复了,所以已经把这段删掉了
@@ -37,7 +37,7 @@ def configure_logging(self, name, level, log_dir=None, file_name=None): | |||
|
|||
# Create a console formatter and add it to a console handler | |||
console_formatter = ColorFormatter( | |||
fmt="%(levelname)s [%(asctime)s] - %(message)s", datefmt="%Y-%m-%d %H:%M:%S" | |||
fmt="%(levelname)s [%(asctime)s] %(filename)s:%(lineno)d - %(message)s", datefmt="%Y-%m-%d %H:%M:%S" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filename
为None 应该没必要加
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有看打印出来的日志,filename不为none,还是有意义的
CI 挂了,不知道是啥原因,神奇 |
哦,好像CI挂了和我这个PR没啥关系,所有PR都挂了😄 |
是的,报错是因为 oneflow 那边一个修复还没编译出来 |
does this mean we can use peft and multiple LoRAs (for slow inference mode)? |
@isidentical for peft, you can try this example #530 PR 530 is not related to this PR. This is the original version of peft load. @marigoold is working on a fast load on peft. |
also before I forget, onediffx is still uninstalled with diffusers==0.26.1 even with this PR:
|
@chengzeyi need to make a test with onediffx |
已修改 |
@chengzeyi can you do 0.26.2 (latest version)? Instead of 0.26.1 |
Changed but I hope the requirement could be loosened. |