Comfy-Org / Comfy-Org/ComfyUI

Black output when using NVIDIA PixelDiT on AMD

Open
#14,379 6 comments 1 reaction 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

ComfyUI returning upscaled version of this image.

Image

### Actual Behavior

ComfyUI returns black image.

Image

### Steps to Reproduce

[utility_pid_latent_upscale_dit.json](https://github.com/user-attachments/files/28766779/utility_pid_latent_upscale_dit.json)

### Debug Logs

```powershell
[INFO] setup plugin alembic.autogenerate.schemas
[INFO] setup plugin alembic.autogenerate.tables
[INFO] setup plugin alembic.autogenerate.types
[INFO] setup plugin alembic.autogenerate.constraints
[INFO] setup plugin alembic.autogenerate.defaults
[INFO] setup plugin alembic.autogenerate.comments
[INFO] Adding extra search path checkpoints /mnt/ai/image-gen/models
[INFO] Adding extra search path gguf /mnt/ai/image-gen/gguf
[INFO] Adding extra search path inpaint /mnt/ai/image-gen/inpaint
[INFO] Adding extra search path configs /mnt/ai/image-gen/models
[INFO] Adding extra search path clip /mnt/ai/image-gen/text-encoders
[INFO] Adding extra search path vae /mnt/ai/image-gen/vae
[INFO] Adding extra search path loras /mnt/ai/image-gen/lora
[INFO] Adding extra search path upscale_models /mnt/ai/image-gen/upscale
[INFO] Adding extra search path upscale_models /mnt/ai/image-gen/upscale/ESRGAN
[INFO] Adding extra search path upscale_models /mnt/ai/image-gen/upscale/RealESRGAN
[INFO] Adding extra search path upscale_models /mnt/ai/image-gen/upscale/SwinIR
[INFO] Adding extra search path latent_upscale_models /mnt/ai/image-gen/latent_upscale_models
[INFO] Adding extra search path embeddings /mnt/ai/image-gen/embeddings
[INFO] Adding extra search path hypernetworks /mnt/ai/image-gen/hypernetworks
[INFO] Adding extra search path controlnet /mnt/ai/image-gen/control-net
[INFO] Adding extra search path unet /mnt/ai/image-gen/unet
[INFO] Adding extra search path style_models /mnt/ai/image-gen/style_models
[INFO] Adding extra search path model_patches /mnt/ai/image-gen/model_patches
[INFO] Adding extra search path clip_vision /mnt/ai/image-gen/clip_vision
[INFO] Adding extra search path ipadapter /mnt/ai/image-gen/ipadapter
[INFO] Adding extra search path diffusion_models /mnt/ai/image-gen/diffusion_models
[INFO] Adding extra search path checkpoints /mnt/ai/music-gen/models
[INFO] Adding extra search path configs /mnt/ai/music-gen/models
[INFO] Adding extra search path clip /mnt/ai/music-gen/text-encoders
[INFO] Adding extra search path unet /mnt/ai/music-gen/unet
[INFO] Adding extra search path vae /mnt/ai/music-gen/vae
[INFO] Adding extra search path loras /mnt/ai/music-gen/lora
[INFO] Found comfy_kitchen backend eager: {'available': True, 'disabled': False, 'unavailable_reason': None, 'capabilities': ['apply_rope', 'apply_rope1', 'apply_rope_split_half', 'apply_rope_split_half1', 'dequantize_mxfp8', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'gemv_awq_w4a16', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'quantize_svdquant_w4a4', 'scaled_mm_mxfp8', 'scaled_mm_nvfp4', 'scaled_mm_svdquant_w4a4', 'stochastic_rounding_fp8']}
[INFO] Found comfy_kitchen backend cuda: {'available': True, 'disabled': True, 'unavailable_reason': None, 'capabilities': ['apply_rope', 'apply_rope1', 'apply_rope_split_half', 'apply_rope_split_half1', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'gemv_awq_w4a16', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'quantize_svdquant_w4a4', 'scaled_mm_svdquant_w4a4', 'stochastic_rounding_fp8']}
[INFO] Found comfy_kitchen backend triton: {'available': True, 'disabled': True, 'unavailable_reason': None, 'capabilities': ['apply_rope', 'apply_rope1', 'apply_rope_split_half', 'apply_rope_split_half1', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8']}
[INFO] Checkpoint files will always be loaded safely.
[INFO] Total VRAM 30576 MB, total RAM 65536 MB
[INFO] pytorch version: 2.12.0+rocm7.2
[INFO] Set: torch.backends.cudnn.enabled = False for better AMD performance.
[INFO] AMD arch: gfx1201
[INFO] ROCm version: (7, 2)
[INFO] Set vram state to: NORMAL_VRAM
[INFO] Device: cuda:0 AMD Radeon AI PRO R9700 : native
[INFO] Using async weight offloading with 2 streams
[INFO] Enabled pinned memory 58982.0
/home/soft/ComfyUI/venv/lib/python3.12/site-packages/flash_attn/flash_attn_interface.py:17: UserWarning: flash_attn_2_cuda (which has ROCm/HIP kernels) not found, falling back to Triton implementation
warnings.warn("flash_attn_2_cuda (which has ROCm/HIP kernels) not found, falling back to Triton implementation")
[aiter] import [module_aiter_enum] under /home/soft/ComfyUI/venv/lib/python3.12/site-packages/aiter/jit/module_aiter_enum.so
[INFO] import [module_aiter_enum] under /home/soft/ComfyUI/venv/lib/python3.12/site-packages/aiter/jit/module_aiter_enum.so
[INFO] Using pytorch attention
[INFO] Python version: 3.12.3 (main, Mar 23 2026, 19:04:32) [GCC 13.3.0]
[INFO] ComfyUI version: 0.24.0
[INFO] comfy-aimdo version: 0.4.9
[INFO] comfy-kitchen version: 0.2.10
[INFO] comfyui-frontend-package version: 1.45.15
[INFO] comfyui-workflow-templates version: 0.9.98
[INFO] comfyui-embedded-docs version: 0.5.3
[INFO] comfy-kitchen version: 0.2.10
[INFO] comfy-aimdo version: 0.4.9
[INFO] [Prompt Server] web root: /home/soft/ComfyUI/venv/lib/python3.12/site-packages/comfyui_frontend_package/static
[INFO] Asset seeder disabled
[INFO] Skipping loading of custom nodes
[INFO] Context impl SQLiteImpl.
[INFO] Will assume non-transactional DDL.
[INFO] Using RAM pressure cache.
[INFO] Starting server

[INFO] To see the GUI go to: http://0.0.0.0:8188
[INFO] got prompt
[INFO] VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
[INFO] Using split attention in VAE
[INFO] Using split attention in VAE
[INFO] VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
[INFO] model weight dtype torch.bfloat16, manual cast: None
[INFO] model_type FLOW
[INFO] Found quantization metadata version 1
[INFO] Using MixedPrecisionOps for text encoder
[INFO] Requested to load PixelDiTTE_
[INFO] loaded completely; 2493.47 MB loaded, full load: True
[INFO] CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cuda:0, dtype: torch.float16
[INFO] Found quantization metadata version 1
[INFO] Using MixedPrecisionOps for text encoder
[INFO] CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16
[INFO] Requested to load ZImageTEModel_
[INFO] loaded completely; 26286.25 MB usable, 5371.00 MB loaded, full load: True
[INFO] model weight dtype torch.bfloat16, manual cast: None
[INFO] model_type FLOW
[INFO] Requested to load Lumina2
[INFO] loaded completely; 20855.76 MB usable, 11739.54 MB loaded, full load: True
100%|██████████| 8/8 [00:01<00:00, 4.00it/s]
[INFO] Requested to load AutoencodingEngine
[INFO] loaded completely; 6780.42 MB usable, 159.87 MB loaded, full load: True
[INFO] Requested to load PiD
[INFO] Unloaded partially: 60.85 MB freed, 99.02 MB remains loaded, 13.50 MB buffer reserved, lowvram patches: 0
[INFO] loaded completely; 6232.92 MB usable, 2597.59 MB loaded, full load: True
100%|██████████| 4/4 [00:04<00:00, 1.04s/it]
[INFO] Requested to load PixelspaceConversionVAE
[INFO] loaded completely; 0.00 MB loaded, full load: True
/home/soft/ComfyUI/nodes.py:1657: RuntimeWarning: invalid value encountered in cast
img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8))
[INFO] Prompt executed in 18.67 seconds
```

### Other

I run ComfyUI on Ubuntu 24 with following options:
```
--supports-fp8-compute --disable-api-nodes --use-pytorch-cross-attention --disable-all-custom-nodes
```
I've updated to the newest version (git pull).
I have R9700 (AMD GPU). I'm using the official build of pytorch (2.12.0+rocm7.2).

I also tried `--fp32-vae`, but it made no difference. All test were made with the official ZIP+PID template. PID was downloaded from Comfy HuggingFace repo. I've tried both resolutions and both fp16 and mxfp8. Using flash attention made no difference. I'm not using any other optimizations (no tunableop or miopen).

If I retry generation, I still get black image.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.