invoke-ai / invoke-ai/InvokeAI

[enhancement]: Lossless speed enhancement for Flux + SD3x

Open
#7,717 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
28.2k
Forks
3k
Avg merge
6d 5h
Merged PRs (30d)
19

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Contact Details

_No response_

### What should this feature add?

This FR follows up on #7592, in which I suggested that [ParaAttention](https://github.com/chengzeyi/ParaAttention) was incompatible with Invoke due to its restrictive license.

Two novel algorithms for DiT based models have recently become available for Diffusers, and are well worth considering for inclusion in Invoke:

- TeaCache for Flux ([pipeline](https://github.com/ali-vilab/TeaCache/blob/main/TeaCache4FLUX/teacache_flux.py))
- Microsoft RAS for SD3 ([quickstart](https://github.com/microsoft/ras?tab=readme-ov-file#quickstart))

MSRAS is MIT-licensed, and TeaCache has an Apache 2.0 license that [should be compatible](https://interoperable-europe.ec.europa.eu/licence/compatibility-check/Apache-2.0/MIT) with Invoke. MSRAS promises a speed-up of 1.6x with comparable generation quality ([demo](https://microsoft.github.io/RAS/)), while TeaCache supports a lossless speed-up of 1.4x ([samples](https://github.com/welltop-cn/ComfyUI-TeaCache?tab=readme-ov-file#result-comparison)).

Both of the linked repositories are based on Diffusers and should be comparatively easy to integrate.

### Alternatives

_No response_

### Additional Content

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.