huggingface / huggingface/diffusers

Can diffusers support loading and running FLUX with fp8 ?

オープン
#11,580 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
stale
主要言語
Python
スター
34.5k
フォーク
7.3k
平均マージ
3日 3時間
マージ済み PR(30日)
91

説明

This is how I use diffusers to load flux model:
```
import torch
from diffusers import FluxPipeline
pipe = FluxPipeline.from_pretrained(
"/ckptstorage/repo/pretrained_weights/black-forest-labs/FLUX.1-dev",
torch_dtype=torch.float16,
)
device = torch.device(f"cuda:{device_number}" if torch.cuda.is_available() else "cpu")
pipe = pipe.to(device)
```
it consumes about 75 seconds on my computer with A800 GPU.
But I found in comfyui, it only need 22 seconds to load flux model, but it load the fp8 model.
Can diffusers load flux fp8 model ?
or is there any other speed up method ?

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

FluxPipeline.from_pretrained の例と torch_dtype=torch.float16 を使用したその読み込みパスから始め、次に ComfyUI から参照されている fp8 モデルの動作を調査します。diffusers が fp8 で FLUX を読み込んで実行できるか、または指定された A800 のシナリオで再現可能な別の読み込み高速化を提供できるかを判断してください。サポートされるアプローチとその測定結果が文書化または検証されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python, pytorch
領域
machine-learning
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。