Comfy-Org / Comfy-Org/ComfyUI

Title: Native Normalized Attention Guidance node is ~2× slower than Kijai implementation

Open
#12,559 0 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

Native NAG performance should be comparable to (or faster than) Kijai’s implementation under equivalent conditions.

### Actual Behavior

Native NAG shows a consistent ~2× slowdown (total runtime and/or per-step time) compared to Kijai’s NAG.

### Steps to Reproduce

Steps to reproduce
1. Load the same checkpoint/model and VAE.
2. Use the same prompt/negative, seed.
3. Use identical sampler + scheduler, steps, CFG=1, batch size, and resolution.
4. Run the workflow with Kijai NAG enabled; record total time and/or per-step timing.
5. Swap to native NAG (keep all settings the same); record timing.
6. Compare results.

### Debug Logs

```powershell
100%|██████████| 4/4 [00:01<00:00, 2.89it/s] //kijai
100%|██████████| 4/4 [00:02<00:00, 1.84it/s] //native
```

### Other

The new native Normalized Attention Guidance (NAG) node in ComfyUI runs about 2× slower than the existing Kijai NAG implementation, using the same workflow and identical generation settings.

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.