Skip to content

Fix deepcache for svd - #438

Merged
lixiangcog merged 8 commits into
mainfrom
Fix_deepcache_for_svd
Dec 20, 2023
Merged

lixiangcog merged 8 commits into
mainfrom
Fix_deepcache_for_svd

Conversation

@lixiangcog

@lixiangcog lixiangcog commented Dec 19, 2023 •

Copy link
Copy Markdown
Contributor

ComfyUI Node and Example

Node name:

  • ModuleDeepCacheSpeedup
  • SVDSpeedup

Example workflow:

svd-deepcache-onediff

Single test of SVD DeepCache:

svd-deepcache

Depending on the new oneflow community edition

cuda 11.8: python3 -m pip install --pre oneflow -f https://oneflow-pro.oss-cn-beijing.aliyuncs.com/branch/community/cu118

cuda12.1: python3 -m pip install --pre oneflow -f https://oneflow-pro.oss-cn-beijing.aliyuncs.com/branch/community/cu121

cuda12.2: python3 -m pip install --pre oneflow -f https://oneflow-pro.oss-cn-beijing.aliyuncs.com/branch/community/cu122

SVD UNet iter speed

A100

  • Size: 1024 * 576 * 25
SVD with Pytorch SVD Speedup with OneDiff SVD DeepCache Speedup with OneDiff
0.65 it/s (1x) 1.00 it/s (1.54x) 1.54 it/s (2.37x)

The above tests are based on the community version of OneFlow.

Result

fig-svd

When using the SVDSpeedup node of onediff, the video quality is lossless. When using the ModuleDeepCacheSpeedup node, there is a slight loss in quality, but the speed increases by more than double.

Thanks to @Dango233 from Stability AI. He inspired us to try our acceleration node(DeepCache with OneDiff compilation) on SVD.

@yuanms2

yuanms2 commented Dec 20, 2023

Copy link
Copy Markdown
Collaborator

不加onediff, PyTorch SVD + DeepCache的效果怎样

@lixiangcog

Copy link
Copy Markdown
Contributor Author

不加onediff, PyTorch SVD + DeepCache的效果怎样

我后面本地看下。

@lixiangcog

Copy link
Copy Markdown
Contributor Author

issue comment 更新了。

@lixiangcog
lixiangcog merged commit 7df78ba into main Dec 20, 2023
@lixiangcog
lixiangcog deleted the Fix_deepcache_for_svd branch December 20, 2023 09:30
@nyukers

nyukers commented Oct 15, 2024

Copy link
Copy Markdown

Can I use onediif for CogVideo workflows?

@lixiangcog

Copy link
Copy Markdown
Contributor Author

@nyukers

The acceleration of CogVideo can be achieved using the generalized acceleration of OneDiff. For acceleration nodes, please refer to: https://github.com/siliconflow/onediff/tree/main/onediff_comfy_nodes.

@nyukers

nyukers commented Oct 16, 2024

Copy link
Copy Markdown

Ok, is it working under Windows?

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