Skip to content

Commit

Permalink
Add LoRA to Combine with DeepCache for Acceleration (#511)
Browse files Browse the repository at this point in the history
This PR is done:

- [x] Add workflow.
After testing multiple trained LoRAs, apply the most relatively
appropriate DeepCache hyperparameters.
- [x] Add README.



![image](https://github.com/siliconflow/onediff/assets/54010254/e71e6428-8cf1-4b21-b607-ce141f4712a8)

For the Aether Cloud style of LoRA, it can be downloaded from
https://civitai.com/models/141029/aether-cloud-lora-for-sdxl.
  • Loading branch information
lixiang007666 authored Jan 12, 2024
1 parent f1e18ef commit a385601
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions onediff_comfy_nodes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ Here are the example of applying DeepCache to SD and SVD models.

[Module DeepCache SpeedUp on SVD](workflows/svd-deepcache.png)

[Module DeepCache SpeedUp on LoRA](workflows/lora_deepcache/README.md)




Expand Down
22 changes: 22 additions & 0 deletions onediff_comfy_nodes/workflows/lora_deepcache/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## LoRA to Combine with DeepCache for Acceleration

We combined [OneDiff DeepCache](https://github.com/siliconflow/onediff/tree/main/onediff_comfy_nodes#deepcache) and LoRA, achieving more than a 2.7x acceleration for shapes of 1024*1024, workflow reference:
![](lora-deepcache.png)

For the Aether Cloud style of LoRA, it can be downloaded from https://civitai.com/models/141029/aether-cloud-lora-for-sdxl.


#### Performance of Community Edition:

Updated on Jan 11, 2024. Device: A100 GPU

| | LoRA | LoRA + DeepCache | Percentage improvement |
| -------------------------------------------------------------- | --------------- | ------------------ | ---------------------- |
| 512 * 1024 | 16.30 it/s | 39.57 it/s | 142.45% |
| 1024 * 1024 | 9.10 it/s | 25.19 it/s | 176.04% |

However, due to the characteristics of DeepCache, combining it with LoRA introduces some differences in the output:
![](compare.png)


Note: If your system or business requires more personalized support, please check: https://github.com/siliconflow/onediff?tab=readme-ov-file#onediff-enterprise-edition
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a385601

Please sign in to comment.