FLUX.3 Image Klein returns black images in FP16 on Quadro RTX 8000
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 28/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- ai, machine-learning
Hướng nghiên cứu
Start with the reproduction script, which runs Flux3DistilledAutoBlocks in FP16 with an FP32 VAE and reports non-finite values in the text context projection. Inspect the text encoder and feed-forward projection paths in the FLUX.3 modular pipeline to see where FP16 overflows. Done means the 512x512, four-step, seed-42 run gives finite outputs on a Turing GPU with a CUDA regression test added.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
FLUX.3 Image Klein distilled returned a completely black image with FP16 transformer and text encoder weights and an FP32 VAE on a Quadro RTX 8000. I reproduced it on Diffusers 0.44.0.dev0 at commit 2dfe4932476aca0837b7b09a36549232416282ed.
At 512×512, four steps, and seed 42, the first text context projection produced 5 non-finite FP16 values. All four denoiser outputs and the decoded FP32 image contained non-finite values.
Reproduction
Use an account with access to the FLUX.3 Image Klein checkpoint. I used checkpoint revision 337337621b8526e120f2275d250242f4a6bedd75. To run with a local snapshot of that revision, set FLUX3_MODEL to its directory. The script uses a complete caption directly, so it only loads the image generation components.
import os
import torch
from diffusers import FlowMatchEulerDiscreteScheduler
from diffusers.modular_pipelines.flux3 import Flux3DistilledAutoBlocks
CAPTION = (
"Full-color indoor photograph of a red ceramic teapot and a white ceramic cup on a wooden kitchen "
"table. The round teapot sits in the left center of the frame, with its curved handle on the left, "
"short spout pointing right, and a fitted red lid with a small round knob. The glossy glaze carries a "
"narrow reflection from a window on the left. To the right of the teapot, a plain white cup rests on "
"a matching saucer, its handle facing right. The tabletop has brown grain running horizontally across "
"the foreground. In the background, a cream kitchen wall and the edge of a wooden cabinet are out of "
"focus. Daylight enters from the left and casts soft shadows behind the cup and teapot. The camera "
"looks across the table from just above its surface, with the entire teapot and cup inside the frame. "
"The ceramic surfaces are sharply focused while the distant kitchen stays blurred."
)
model = os.environ.get("FLUX3_MODEL", "black-forest-labs/flux-3-image-klein")
blocks = Flux3DistilledAutoBlocks()
blocks.sub_blocks.pop("prompt_upsampler")
pipe = blocks.init_pipeline(model)
pipe.load_components(
names=["text_encoder", "tokenizer", "transformer", "vae"],
dtype={"default": torch.float16, "vae": torch.float32},
)
pipe.update_components(
scheduler=FlowMatchEulerDiscreteScheduler(
num_train_timesteps=1000, shift=16.0, use_dynamic_shifting=False
)
)
pipe.to("cuda")
image = pipe(
prompt=CAPTION,
width=512,
height=512,
num_inference_steps=4,
generator=torch.Generator(device="cuda").manual_seed(42),
output="images",
)[0]
print("RGB channel ranges:", image.getextrema())
Context
I am using FP16 to run FLUX.3 Image Klein on Turing hardware. I have a local fix that keeps the projection weights and matrix multiplication inputs in FP16 and emits the sensitive text and feed-forward projection results in FP32. With that change, the same input completed all four denoising steps and VAE decode with finite outputs.
Would you be open to a focused PR with this change and a CUDA regression test?
Logs
RuntimeWarning: invalid value encountered in cast
RGB channel ranges: ((0, 0), (0, 0), (0, 0))
System info
- GPU — NVIDIA Quadro RTX 8000 (Turing, SM 7.5, 48 GiB)
- Driver — 550.120
- Python — 3.12
- PyTorch — 2.12.0+cu126
- Transformers — 5.20.2
- Diffusers — 0.44.0.dev0 at
2dfe4932476aca0837b7b09a36549232416282ed
- Ngôn ngữ chính
- Python
- Star
- 35k
- Fork
- 7.5k
- Merge trung bình
- 2 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 58
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của huggingface/diffusers
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
huggingface/diffusers#15436 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
InpaintProcessor crashes when padding_mask_crop is set and a dimension is omittedCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
huggingface/diffusers#15433 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
LTXEulerAncestralRFScheduler skips signal scaling with s_noise=0Có thể đã có người làm @hparik11 đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
huggingface/diffusers#15423 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs: 13 docstrings document parameters their functions don't haveCó thể đã có người làm @M-Colley đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
huggingface/diffusers#15363 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`ZImageImg2ImgPipeline` / `ZImageInpaintPipeline`: explicit height/width different from the input image raises RuntimeErrorCó thể đã có người làm @chessing234 đã nhận 11 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
huggingface/diffusers#15337 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của huggingface/diffusers
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 79/100
developmentseed/titiler-covjson#164 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
awslabs/visual-asset-management-system#2164 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
MakazhanAlpamys/Soup#3589 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
channels status reports the wrong Enabled value for Feishu instances and default-enabled WebSocketĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày