Skip to content

AMD graphics cards are forced to switch to FP16 precision mode when using FP8 models. #11519

Description

@PLASSICAxu

Custom Node Testing

Expected Behavior

Use the FP8 model at FP8 precision
model weight dtype torch.float8_e4m3fn, manual cast: None

Actual Behavior

Models with FP8 precision are forced to load and compute at FP16 precision.
model weight dtype torch.float8_e4m3fn, manual cast: torch.bfloat16

Steps to Reproduce

model using FP8 can be reproduced; here I use Qwen's official image edit workflow.

Image

Debug Logs

(.venv) (base) PS E:\ComfyUI-master> python main.py --use-pytorch-cross-attention --disable-all-custom-nodes                                                           
Checkpoint files will always be loaded safely.
Total VRAM 16304 MB, total RAM 32599 MB
pytorch version: 2.9.0+rocmsdk20251116
Set: torch.backends.cudnn.enabled = False for better AMD performance.
AMD arch: gfx1201
ROCm version: (7, 1)
Set vram state to: NORMAL_VRAM
Device: cuda:0 AMD Radeon RX 9070 XT : native
Enabled pinned memory 14669.0
Using pytorch attention
Python version: 3.12.9 (tags/v3.12.9:fdb8142, Feb  4 2025, 15:27:58) [MSC v.1942 64 bit (AMD64)]
ComfyUI version: 0.6.0
ComfyUI frontend version: 1.34.9
[Prompt Server] web root: E:\ComfyUI-master\.venv\Lib\site-packages\comfyui_frontend_package\static
Total VRAM 16304 MB, total RAM 32599 MB
pytorch version: 2.9.0+rocmsdk20251116
Set: torch.backends.cudnn.enabled = False for better AMD performance.
AMD arch: gfx1201
ROCm version: (7, 1)
Set vram state to: NORMAL_VRAM
Device: cuda:0 AMD Radeon RX 9070 XT : native
Enabled pinned memory 14669.0
Skipping loading of custom nodes
Context impl SQLiteImpl.
Will assume non-transactional DDL.
No target revision found.
Starting server

To see the GUI go to: http://127.0.0.1:8188
got prompt
Using split attention in VAE
Using split attention in VAE
VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
Requested to load WanVAE
loaded completely; 12472.04 MB usable, 242.03 MB loaded, full load: True
Found quantization metadata version 1
Using MixedPrecisionOps for text encoder
CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16
Requested to load QwenImageTEModel_
loaded completely; 14165.88 MB usable, 7910.29 MB loaded, full load: True
model weight dtype torch.float8_e4m3fn, manual cast: torch.bfloat16
model_type FLUX
Requested to load QwenImage
Interrupting prompt 44a39768-fd55-43e3-8319-771d3839678e
loaded partially; 14136.05 MB usable, 14026.95 MB loaded, 5457.00 MB offloaded, 108.01 MB buffer reserved, lowvram patches: 0

Other

I know the author previously added FP8 support for AMD graphics cards based on the GFX 1201 architecture, but it doesn't seem to be working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Potential BugUser is reporting a bug. This should be tested.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions