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

Suport compile svd #399

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Suport compile svd #399

wants to merge 5 commits into from

Conversation

lixiang007666
Copy link
Contributor

@lixiang007666 lixiang007666 commented Dec 4, 2023

This PR is done:

  • Support for compiling Stable Video Diffusion.

Co-authored-by: FengWen <109639975+ccssu@users.noreply.github.com>
from omegaconf import OmegaConf, ListConfig

@torch2oflow.register
def _(mod: ListConfig, verbose=False) -> ListConfig:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确实可以解决问题。
另外,是否可以考虑把这段代码用 try 包起来?这样即使有的业务场景没有安装 omegaconf,也能正常运行。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯,这个注册可以写到 register 里面。

各自的库各自注册。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的 我后面refine下。

Copy link
Contributor Author

@lixiang007666 lixiang007666 Dec 6, 2023

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里一起比较好。

Copy link
Contributor

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个改到对应的库去了么。

比如在 diffusers/comfy 里自己注册

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diffusers和comfy暂时没有这个需要的。

Copy link
Collaborator

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,改到那里去吧

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sdwebui插件有

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.

4 participants