[diffusion] perf: improve black-forest-labs/FLUX.2-dev (#14040)

This commit is contained in:
Mick
2025-11-27 14:49:52 +08:00
committed by GitHub
parent 077ca70ee4
commit 6edffc6391
8 changed files with 278 additions and 318 deletions
@@ -228,6 +228,73 @@
"expected_avg_denoise_ms": 165.83,
"expected_median_denoise_ms": 169.33
},
"flux_2_image_t2i": {
"stages_ms": {
"InputValidationStage": 0.05,
"TextEncodingStage": 530.93,
"ImageVAEEncodingStage": 0.0,
"ConditioningStage": 0.02,
"LatentPreparationStage": 12.71,
"TimestepPreparationStage": 2.91,
"DenoisingStage": 26403.1,
"DecodingStage": 286.85
},
"denoise_step_ms": {
"0": 511.3,
"1": 132.57,
"2": 541.19,
"3": 518.93,
"4": 541.2,
"5": 520.28,
"6": 532.47,
"7": 525.68,
"8": 538.25,
"9": 525.84,
"10": 526.13,
"11": 525.67,
"12": 524.63,
"13": 530.57,
"14": 530.46,
"15": 529.94,
"16": 532.47,
"17": 527.88,
"18": 527.7,
"19": 525.08,
"20": 525.72,
"21": 529.3,
"22": 522.59,
"23": 529.75,
"24": 523.46,
"25": 528.72,
"26": 526.92,
"27": 528.62,
"28": 522.77,
"29": 528.35,
"30": 528.05,
"31": 528.89,
"32": 525.34,
"33": 530.36,
"34": 529.19,
"35": 526.92,
"36": 528.16,
"37": 525.03,
"38": 527.33,
"39": 527.96,
"40": 527.81,
"41": 524.79,
"42": 528.46,
"43": 532.49,
"44": 526.95,
"45": 533.14,
"46": 529.32,
"47": 528.51,
"48": 532.14,
"49": 529.29
},
"expected_e2e_ms": 27648.69,
"expected_avg_denoise_ms": 520.09,
"expected_median_denoise_ms": 528.0
},
"flux_image_t2i_2_gpus": {
"stages_ms": {
"InputValidationStage": 0.03,
@@ -242,19 +242,19 @@ ONE_GPU_CASES_A: list[DiffusionTestCase] = [
output_size="1024x1024",
),
),
# DiffusionTestCase(
# "flux_2_image_t2i",
# DiffusionServerArgs(
# model_path="black-forest-labs/FLUX.2-dev",
# modality="image",
# warmup_text=1,
# warmup_edit=0,
# ),
# DiffusionSamplingParams(
# prompt="A futuristic cityscape at sunset with flying cars",
# output_size="1024x1024",
# ),
# ),
DiffusionTestCase(
"flux_2_image_t2i",
DiffusionServerArgs(
model_path="black-forest-labs/FLUX.2-dev",
modality="image",
warmup_text=1,
warmup_edit=0,
),
DiffusionSamplingParams(
prompt="A futuristic cityscape at sunset with flying cars",
output_size="1024x1024",
),
),
# === Text and Image to Image (TI2I) ===
# TODO: Timeout with Torch2.9. Add back when it can pass CI
# DiffusionTestCase(