MiniMax H3 で SLA Attention を利用して動画を生成する

ぐあもん
質問: SLA Attention
MiniMax H3でさらに高速化できるSLA Attention という方式が登場したと聞きました。どのように導入するのでしょうか?

MiniMax H3 でSLA Attention の導入手順を紹介します。

SLA Attention とは

SLA Attention(Sparse-Linear Attention)は、Attentionで計算する対象を削減して推論を高速化する技術です。 通常のAttentionでは各トークン間の関係を広範囲に計算しますが、SLAでは重要度の高い部分を選択し、影響の小さいAttention計算を省略します。特に動画生成ではトークン数が非常に多くなるため、大きな高速化が期待できます。

Sage Attention との関係

排他的な技術ではなく、SLAによって計算対象を絞り込み、その計算にSageAttentionを利用することもできます。

SOL-Attn との関係

どちらもSparse Attentionの仕組みのため、競合する処理となるため共存はしないほうが良いです。

SLA Attention ノード のインストール

SLA Attentionのノードをインストールします。
次のコマンドを実行します。

cd (ComfyUIの配置ディレクトリ)\ComfyUI\custom_nodes
git clone https://github.com/PlagueKind/ComfyUI-PlagueKind-Nodes.git


ComfyUIを起動します。インストールができると、ノードの一覧に"H3 SLA Attention"のノードが追加されます。

MiniMax H3 で SLA Attention を利用して動画を生成する:画像1

ワークフロー

ワークフローは以下となります。

ワークフローでは、モデルから Sage Attention, First Block Cache, SLA Attention の順番に接続します。

Model
 ↓
Sage Attention
 ↓
First Block Cache
 ↓
SLA Attention
 ├→ Guider
 └→ Scheduler


以下はSage Attention, First Block Cache と併用した場合のワークフローです。

MiniMax H3 で SLA Attention を利用して動画を生成する:画像2

t2v

MiniMax H3 で SLA Attention を利用して動画を生成する:画像3

i2v

MiniMax H3 で SLA Attention を利用して動画を生成する:画像4

r2v

MiniMax H3 で SLA Attention を利用して動画を生成する:画像5

生成速度の違い

SOL-Attn, SLA Attention, 利用しない場合の生成速度差を比較します。
Sage Attention, First Block Cahce は利用します。

  • 生成動画の長さ: 4秒
  • 解像度: 16:9
  • Sage Attention: あり
  • First Block Cahce: あり

t2vでの生成時間です。プロンプトは以下を利用しています。

プロンプト
integrated_multimodal_description: [Shot 1] 2D-animated Japanese anime style with thick ink outlines, flat cel shading, and hand-drawn impact lines, a low-angle medium-wide shot frames a towering moss-covered stone golem with glowing amber cracks across its chest as it drives its massive right fist down toward a young female swordswoman in dark leather armor over a pale blue tabard, her long silver ponytail streaming behind her. She pushes off the cracked flagstones and rolls to her right as the fist smashes into the ground, throwing up chunks of rock and a burst of dust. The camera pushes in with small amplitude at fast speed and shakes strongly on the impact as she rises out of the roll and slashes her single-edged longsword upward across the golem's forearm, leaving a bright white blade trail and a spray of stone chips and orange sparks. The shot ends with her landing in a low stance, sword held back and level, as the golem's head turns toward her.

overall_soundscape: A deep grinding rumble of shifting stone builds as the golem's fist drives down, ending in a heavy concussive impact with rubble scattering across the flagstones. Boots scrape and fabric snaps during the dodge, followed by a sharp metallic ring as the blade bites into stone and a short exhaled breath from the swordswoman.

non_diegetic_music: Fast tremolo strings and staccato brass at a rapid tempo, punctuated by a single taiko strike landing on the fist impact and a cymbal swell that cuts off abruptly at the end.


生成時間は初回はモデルのロードがあるため2回目以降の生成時間の平均値を掲載しています。

設定 0.4M Pixel 生成時間[秒] 1.4M Pixel 生成時間[秒]
SOL-Attn, SLA Attention なし 28.7 201.2
SOL-Attn あり 38.3 131.8
SLA Attention あり 25.4 106.3


解像度が低い場合には差があまり出ない結果となりました。解像度が上がるとSOL-Attn,SLA Attentionの効果が出てきます。 SOT-Attn と SLA Attentionでは、SLA Attentionのほうが効果が大きいようです。

生成結果

生成結果の動画は以下です。1.5M Pixelの動画を3つずつ掲載しています。
SLA Attentionは微妙にサウンドと映像がずれるケースがあったり、形状がわずかに崩れたりします。また、ほかの生成結果より動きが俊敏な印象があります。 SOL-Attn はSLA Attentionと比較すると若干品質が良いです。 また、SOL-Attn, SLA Attention 両方利用しない生成結果はサウンドの品質が良い点や構図がダイナミックな点(プロンプト影響やたまたまの可能性もあります)が良いです。

AuthorPortraitAlt
著者
iPentecのメインデザイナー
イタリア好き。Webページ、Webクリエイティブのデザインを担当。PhotoshopやIllustratorの作業もする。 最近は生成AIの画像生成の沼に沈んでいる。
作成日: 2026-08-22