Skip to content

Fix deepcache for svd #438

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

Merged
merged 8 commits into from
Dec 20, 2023
Merged

Fix deepcache for svd #438

merged 8 commits into from
Dec 20, 2023

Conversation

lixiang007666
Copy link
Contributor

@lixiang007666 lixiang007666 commented Dec 19, 2023

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

yuanms2 commented Dec 20, 2023

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

@lixiang007666
Copy link
Contributor Author

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

我后面本地看下。

@lixiang007666
Copy link
Contributor Author

issue comment 更新了。

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

nyukers commented Oct 15, 2024

Can I use onediif for CogVideo workflows?

@lixiang007666
Copy link
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
Copy link

nyukers commented Oct 16, 2024

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