-
Notifications
You must be signed in to change notification settings - Fork 114
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
Suport compile svd #399
base: main
Are you sure you want to change the base?
Suport compile svd #399
Conversation
Co-authored-by: FengWen <109639975+ccssu@users.noreply.github.com>
from omegaconf import OmegaConf, ListConfig | ||
|
||
@torch2oflow.register | ||
def _(mod: ListConfig, verbose=False) -> ListConfig: |
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.
确实可以解决问题。
另外,是否可以考虑把这段代码用 try 包起来?这样即使有的业务场景没有安装 omegaconf,也能正常运行。
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.
嗯,这个注册可以写到 register 里面。
各自的库各自注册。
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.
好的 我后面refine下。
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.
我理解 ListConfig 也算是一种 type,是不是和其他 type(如 List,tuple)一样都放在builtin_transform.py里一起比较好。
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.
tuple 这些是标准库中的,任何环境下都可用。但是 ListConfig 来自 omegaconf,这个包并不是每个业务环境都具备的。
@torch2oflow.register | ||
def _(mod: ListConfig, verbose=False) -> ListConfig: | ||
converted_list = [torch2oflow(item, verbose) for item in mod] | ||
return OmegaConf.create(converted_list) |
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.
这个改到对应的库去了么。
比如在 diffusers/comfy 里自己注册
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.
diffusers和comfy暂时没有这个需要的。
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.
diffusers和comfy暂时没有这个需要的。
svd 应该是个独立的目录 stability generative models,改到那里去吧
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.
sdwebui插件有
This PR is done: