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
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/onediff/infer_compiler/transform/builtin_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,17 @@ def _(mod: torch.dtype, verbose=False) -> flow.dtype:
def _(mod: list, verbose=False) -> list:
return [torch2oflow(m, verbose) for m in mod]

try:
from omegaconf import OmegaConf, ListConfig
omegaconf_available = True
except ImportError:
omegaconf_available = False

if omegaconf_available:
@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插件有


@torch2oflow.register
def _(mod: tuple, verbose=False) -> tuple:
Expand Down
Loading