[enhancement]: Requesting addition of flash-attn and sage/sage2-attn optimizations in InvokeAI
メンテナーはふだん 8 日以内に返信
@dunkeroni がすでに取り組んでいます。
2026年8月24日 から。
評価
この issue はまだ評価されていません。
説明
Is there an existing issue for this?
- I have searched the existing issues
Contact Details
No response
What should this feature add?
I ran a trial of Wan2.2-A14B using i2v lighting workflow, it took 11.5 minutes for graph execution. Details of trial - Model (downloaded from CivitAI) DaSiWa-i2v-Q5 GGUF (high and low), 720p resolution, 5s, 81 frames @16fps, 4-steps with lighting LoRAs (high and low) at strength 1.0, single image start frame. The graph execution took long time, perhaps running on SDPA attention. It might be possible to improve the graph execution time with Flash Attention or Sage/Sage2 Attention implementation in InvokeAI. I request implementation of the same if feasible.
Alternatives
N/A
Additional Content
Console log:
Started Invoke process with PID 27144
[2026-08-23 06:08:20,064]::[InvokeAI]::INFO --> PyTorch CUDA memory allocator: cudaMallocAsync
[2026-08-23 06:08:26,423]::[InvokeAI]::INFO --> Using torch device: NVIDIA GeForce RTX 5090 Laptop GPU
[2026-08-23 06:08:27,459]::[InvokeAI]::INFO --> cuDNN version: 90701
Siglip2ImageProcessorFast is deprecated. The Fast suffix for image processors has been removed; use
Siglip2ImageProcessor instead.
[2026-08-23 06:08:35,952]::[InvokeAI]::INFO --> Patchmatch initialized
[2026-08-23 06:08:37,157]::[InvokeAI]::INFO --> InvokeAI version 6.14.0-rc2
[2026-08-23 06:08:37,157]::[InvokeAI]::INFO --> Root directory = C:\Users\vidz3\Invoke
[2026-08-23 06:08:37,158]::[InvokeAI]::INFO --> Initializing database at C:\Users\vidz3\Invoke\database
s\invokeai.db
[2026-08-23 06:08:37,180]::[InvokeAI]::INFO --> JWT secret loaded from database
[2026-08-23 06:08:37,184]::[ModelManagerService]::INFO --> [MODEL CACHE] Calculated model RAM cache siz
e: 21390.56 MB. Heuristics applied: [1, 2].
[2026-08-23 06:08:37,184]::[ModelManagerService]::INFO --> Model cache global RAM budget: 20.89 GB acro
ss 1 device cache(s).
[2026-08-23 06:08:37,198]::[ModelInstallService]::INFO --> Restoring incomplete installs
[2026-08-23 06:08:37,198]::[ModelInstallService]::INFO --> Finished restoring incomplete installs
[2026-08-23 06:08:37,838]::[InvokeAI]::INFO --> Cleaned database (freed 0.09MB)
[2026-08-23 06:08:37,838]::[InvokeAI]::INFO --> Invoke running on http://127.0.0.1:9090 (Press CTRL+C t
o quit)
[2026-08-23 06:09:59,428]::[InvokeAI]::INFO --> Executing queue item 2010, session 796aa17e-e97c-4612-8
50d-54d84f113a8f on cuda:0
[2026-08-23 06:09:59,832]::[ModelManagerService]::INFO --> [MODEL CACHE] Loaded model '70f2ccdf-91eb-41
fc-b36e-1e350e7c5966:vae' (AutoencoderKLWan) onto cuda device #0 in 0.15s. Total model size: 242.03MB,
VRAM: 242.03MB (100.0%)
[2026-08-23 06:10:13,312]::[ModelManagerService]::INFO --> [MODEL CACHE] Loaded model '4f01ee84-34c9-4e
7c-8f24-c746308fa918:tokenizer' (T5Tokenizer) onto cuda device #0 in 0.00s. Total model size: 0.24MB, V
RAM: 0.00MB (0.0%)
Loading weights: 100%|███████████████████████████████████████████| 242/242 [00:00<00:00, 14263.93it/s]
[2026-08-23 06:10:19,770]::[ModelManagerService]::INFO --> [MODEL CACHE] Loaded model '4f01ee84-34c9-4e
7c-8f24-c746308fa918:text_encoder' (UMT5EncoderModel) onto cuda device #0 in 6.09s. Total model size: 1
2838.48MB, VRAM: 12838.48MB (100.0%)
[2026-08-23 06:10:20,018]::[ModelManagerService]::INFO --> [MODEL CACHE] Loaded model '4f01ee84-34c9-4e
7c-8f24-c746308fa918:tokenizer' (T5Tokenizer) onto cuda device #0 in 0.00s. Total model size: 0.24MB, V
RAM: 0.00MB (0.0%)
[2026-08-23 06:10:20,026]::[ModelManagerService]::INFO --> [MODEL CACHE] Loaded model '4f01ee84-34c9-4e
7c-8f24-c746308fa918:text_encoder' (UMT5EncoderModel) onto cuda device #0 in 0.01s. Total model size: 1
2838.48MB, VRAM: 12838.48MB (100.0%)
Denoising Wan 2.2 video (81 frames): 0%| | 0/4 [00:00<?, ?it/s][
2026-08-23 06:10:30,514]::[ModelManagerService]::INFO --> [MODEL CACHE] Loaded model 'c87d7a59-aea7-493
9-8f9e-7f7be3c05bd2:transformer' (WanTransformer3DModel) onto cuda device #0 in 1.41s. Total model size
: 10290.63MB, VRAM: 10290.63MB (100.0%)
Denoising Wan 2.2 video (81 frames): 50%|██████████████▌ | 2/4 [05:09<05:08, 154.24s/it][
2026-08-23 06:15:42,365]::[ModelManagerService]::INFO --> [MODEL CACHE] Loaded model '7c63bf92-c992-4f0
7-8292-35787fb8d95c:transformer' (WanTransformer3DModel) onto cuda device #0 in 1.66s. Total model size
: 10290.63MB, VRAM: 10290.63MB (100.0%)
Denoising Wan 2.2 video (81 frames): 100%|█████████████████████████████| 4/4 [10:21<00:00, 155.27s/it]
[2026-08-23 06:20:41,703]::[ModelManagerService]::INFO --> [MODEL CACHE] Loaded model '70f2ccdf-91eb-41
fc-b36e-1e350e7c5966:vae' (AutoencoderKLWan) onto cuda device #0 in 0.05s. Total model size: 242.03MB,
VRAM: 242.03MB (100.0%)
[2026-08-23 06:20:41,704]::[InvokeAI]::INFO --> Running Wan VAE decode: 21 latent frames -> 81 pixel fr
ames at 720x1088
[2026-08-23 06:21:09,711]::[InvokeAI]::INFO --> Encoding MP4: 81 frames @ 16 fps (5.06s) at 720x1088 vi
a libx264
[2026-08-23 06:21:11,320]::[InvokeAI]::INFO --> MP4 encode complete: 3548.3 KB
[2026-08-23 06:21:11,326]::[InvokeAI]::INFO --> Video file written: C:\Users\vidz3\Invoke\outputs\video
s\277164cf-9df7-48d6-bfda-1ef76e897c0f.mp4
[2026-08-23 06:21:12,156]::[InvokeAI]::INFO --> Thumbnail written: C:\Users\vidz3\Invoke\outputs\videos
\thumbnails\277164cf-9df7-48d6-bfda-1ef76e897c0f.webp
[2026-08-23 06:21:12,158]::[InvokeAI]::INFO --> Sidecar written: C:\Users\vidz3\Invoke\outputs\videos\s
idecars\277164cf-9df7-48d6-bfda-1ef76e897c0f.json
[2026-08-23 06:21:12,159]::[InvokeAI]::INFO --> Saved video: 277164cf-9df7-48d6-bfda-1ef76e897c0f.mp4
[2026-08-23 06:21:12,355]::[InvokeAI]::INFO --> Graph stats: 796aa17e-e97c-4612-850d-54d84f113a8f
Node Calls Seconds VRAM Change
rand_int 1 0.004s +0.000G
image 1 0.026s +0.000G
integer 1 0.001s +0.000G
wan_i2v_ideal_dimensions 1 0.001s +0.000G
wan_model_loader 1 0.002s +0.000G
wan_lora_loader 2 0.001s +0.000G
wan_ref_image_encoder 1 12.850s +0.236G
wan_text_encoder 2 7.827s +12.546G
wan_video_denoise 1 621.122s -1.581G
wan_l2v 1 30.889s +0.236G
TOTAL GRAPH EXECUTION TIME: 672.722s
TOTAL GRAPH WALL TIME: 672.725s
RAM used by InvokeAI process: 13.27G (+12.359G)
RAM used to load models: 34.02G
VRAM in use: 11.437G
RAM cache statistics:
Model cache hits: 10
Model cache misses: 16
Models cached: 4
Models cleared from cache: 1
Cache high water mark: 20.67/20.89G
Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)>
Traceback (most recent call last):
File "C:\Users\vidz3\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\events
.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\vidz3\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\proact
or_events.py", line 165, in _call_connection_lost
self._sock.shutdown(socket.SHUT_RDWR)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)>
Traceback (most recent call last):
File "C:\Users\vidz3\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\events
.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\vidz3\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\proact
or_events.py", line 165, in _call_connection_lost
self._sock.shutdown(socket.SHUT_RDWR)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)>
Traceback (most recent call last):
File "C:\Users\vidz3\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\events
.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\vidz3\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\proact
or_events.py", line 165, in _call_connection_lost
self._sock.shutdown(socket.SHUT_RDWR)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)>
Traceback (most recent call last):
File "C:\Users\vidz3\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\events
.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\vidz3\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\proact
or_events.py", line 165, in _call_connection_lost
self._sock.shutdown(socket.SHUT_RDWR)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)>
Traceback (most recent call last):
File "C:\Users\vidz3\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\events
.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\vidz3\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\proact
or_events.py", line 165, in _call_connection_lost
self._sock.shutdown(socket.SHUT_RDWR)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)>
Traceback (most recent call last):
File "C:\Users\vidz3\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\events
.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\vidz3\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\proact
or_events.py", line 165, in _call_connection_lost
self._sock.shutdown(socket.SHUT_RDWR)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)>
Traceback (most recent call last):
File "C:\Users\vidz3\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\events
.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\vidz3\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\proact
or_events.py", line 165, in _call_connection_lost
self._sock.shutdown(socket.SHUT_RDWR)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)>
Traceback (most recent call last):
File "C:\Users\vidz3\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\events
.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\vidz3\AppData\Roaming\uv\python\cpython-3.12.12-windows-x86_64-none\Lib\asyncio\proact
or_events.py", line 165, in _call_connection_lost
self._sock.shutdown(socket.SHUT_RDWR)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
Shutting down...
Invoke shut down normally
- 主要言語
- Python
- スター
- 28.3k
- フォーク
- 3k
- 平均マージ
- 9日 22時間
- マージ済み PR(30日)
- 12
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
invoke-ai/InvokeAI のほかの issue
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 8 日以内に返信
-
[bug]: 6.14.1 regression with `pytorch_cuda_alloc_conf: backend:cudaMallocAsync` — Z-Image bf16 + LoRA takes ~30 min whenever the transformer is (re)loaded (VRAM overflows into Windows shared memory)対応中かも @lstein が 4 日前に担当しました。 オープン
invoke-ai/InvokeAI#9597 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 8 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
invoke-ai/InvokeAI#9594 · コメント 2 件 · リアクション 7 件 ·
メンテナーはふだん 8 日以内に返信
-
[bug]: Error generating simple image on NVIDIA using FLUX.2 Klein 4B対応中かも @Pfannkuchensack が 8 日前に担当しました。 オープンbug
invoke-ai/InvokeAI#9593 · コメント 14 件 · 担当者 1 名 ·
メンテナーはふだん 8 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
invoke-ai/InvokeAI#9586 · コメント 1 件 ·
メンテナーはふだん 8 日以内に返信
invoke-ai/InvokeAI の issue をすべて見る
似ている issue
-
ACK_WAITING HELP_WANTED UPDATE_CS
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OWASP/CheatSheetSeries#2458 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
BasedHardware/omi#19711 ·
メンテナーはふだん 1 日以内に返信
-
Qwen3_5MoeModel no longer returns router_logits, breaking aux loss with output_router_logits=Trueオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
huggingface/transformers#49172 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
vllm-project/vllm-metal#885 ·
メンテナーはふだん 1 日以内に返信