[Intel XPU] Incorrect free VRAM calculation causes KSampler to hang at 0%
- 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 should account for the current device-wide free VRAM on Intel XPU when deciding how much of a model can remain on the GPU.
After consecutive generations and switching from Flux 2 Klein 9B FP8 to Krea 2 FP8, ComfyUI should offload enough model weights to RAM for KSampler to start normally instead of filling VRAM and remaining at 0/8.
### Actual Behavior
I performed a new clean baseline test on an Intel Arc B580 12 GB.
ComfyUI was launched with only:
--enable-manager --disable-all-custom-nodes
Flux 2 Klein 9B FP8 completed successfully twice. I then switched to Krea 2 FP8.
ComfyUI loaded Krea 2 as follows:
9955.64 MB usable
9847.64 MB loaded
2683.68 MB offloaded
108.00 MB buffer reserved
VRAM became fully occupied, and KSampler remained at 0/8 for 2 minutes and 33 seconds until I interrupted the prompt manually.
The long model-loading time is caused by the models being stored on a slow SATA II SSD. This is separate from the reported problem: the failure occurs after Krea 2 has loaded, when KSampler should begin its first step.
### Steps to Reproduce
Use an Intel Arc B580 12 GB with native PyTorch XPU.
Start ComfyUI with only:
--enable-manager --disable-all-custom-nodes
Run Flux 2 Klein 9B FP8 twice.
Switch to Krea 2 FP8.
Start a generation.
Observe that VRAM becomes fully occupied and KSampler remains at 0/8 instead of starting.
Interrupt the prompt manually if it does not progress.
### 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
[WARNING] Could not autodetect AIMDO implementation, assuming Nvidia
[INFO] Adding extra search path checkpoints D:\Comfy-Desktop\ComfyUI-Shared\models\checkpoints
[INFO] Adding extra search path classifiers D:\Comfy-Desktop\ComfyUI-Shared\models\classifiers
[INFO] Adding extra search path clip_vision D:\Comfy-Desktop\ComfyUI-Shared\models\clip_vision
[INFO] Adding extra search path configs D:\Comfy-Desktop\ComfyUI-Shared\models\configs
[INFO] Adding extra search path controlnet D:\Comfy-Desktop\ComfyUI-Shared\models\controlnet
[INFO] Adding extra search path controlnet D:\Comfy-Desktop\ComfyUI-Shared\models\t2i_adapter
[INFO] Adding extra search path diffusers D:\Comfy-Desktop\ComfyUI-Shared\models\diffusers
[INFO] Adding extra search path diffusion_models D:\Comfy-Desktop\ComfyUI-Shared\models\diffusion_models
[INFO] Adding extra search path embeddings D:\Comfy-Desktop\ComfyUI-Shared\models\embeddings
[INFO] Adding extra search path gligen D:\Comfy-Desktop\ComfyUI-Shared\models\gligen
[INFO] Adding extra search path hypernetworks D:\Comfy-Desktop\ComfyUI-Shared\models\hypernetworks
[INFO] Adding extra search path latent_upscale_models D:\Comfy-Desktop\ComfyUI-Shared\models\latent_upscale_models
[INFO] Adding extra search path loras D:\Comfy-Desktop\ComfyUI-Shared\models\loras
[INFO] Adding extra search path model_patches D:\Comfy-Desktop\ComfyUI-Shared\models\model_patches
[INFO] Adding extra search path audio_encoders D:\Comfy-Desktop\ComfyUI-Shared\models\audio_encoders
[INFO] Adding extra search path photomaker D:\Comfy-Desktop\ComfyUI-Shared\models\photomaker
[INFO] Adding extra search path style_models D:\Comfy-Desktop\ComfyUI-Shared\models\style_models
[INFO] Adding extra search path text_encoders D:\Comfy-Desktop\ComfyUI-Shared\models\text_encoders
[INFO] Adding extra search path upscale_models D:\Comfy-Desktop\ComfyUI-Shared\models\upscale_models
[INFO] Adding extra search path background_removal D:\Comfy-Desktop\ComfyUI-Shared\models\background_removal
[INFO] Adding extra search path frame_interpolation D:\Comfy-Desktop\ComfyUI-Shared\models\frame_interpolation
[INFO] Adding extra search path geometry_estimation D:\Comfy-Desktop\ComfyUI-Shared\models\geometry_estimation
[INFO] Adding extra search path optical_flow D:\Comfy-Desktop\ComfyUI-Shared\models\optical_flow
[INFO] Adding extra search path detection D:\Comfy-Desktop\ComfyUI-Shared\models\detection
[INFO] Adding extra search path vae D:\Comfy-Desktop\ComfyUI-Shared\models\vae
[INFO] Adding extra search path vae_approx D:\Comfy-Desktop\ComfyUI-Shared\models\vae_approx
[INFO] Adding extra search path dinov3 D:\Comfy-Desktop\ComfyUI-Shared\models\dinov3
[INFO] Adding extra search path fonts D:\Comfy-Desktop\ComfyUI-Shared\models\fonts
[INFO] Adding extra search path rembg D:\Comfy-Desktop\ComfyUI-Shared\models\rembg
[INFO] Adding extra search path trellis2 D:\Comfy-Desktop\ComfyUI-Shared\models\trellis2
[INFO] Adding extra search path clip D:\Comfy-Desktop\ComfyUI-Shared\models\clip
[INFO] Adding extra search path unet D:\Comfy-Desktop\ComfyUI-Shared\models\unet
[INFO] Setting output directory to: D:\Comfy-Desktop\ComfyUI-Shared\output
[INFO] Setting input directory to: D:\Comfy-Desktop\ComfyUI-Shared\input
[START] Security scan
[DONE] Security scan
** ComfyUI startup time: 2026-08-06 12:06:42.624
** Platform: Windows
** Python version: 3.13.12 (main, Feb 12 2026, 00:38:53) [MSC v.1944 64 bit (AMD64)]
** Python executable: D:\Programs\AI\ComfyUI-Desktop\Installs\ComfyUI-XPU\ComfyUI\.venv\Scripts\python.exe
** ComfyUI Path: D:\Programs\AI\ComfyUI-Desktop\Installs\ComfyUI-XPU\ComfyUI
** ComfyUI Base Folder Path: D:\Programs\AI\ComfyUI-Desktop\Installs\ComfyUI-XPU\ComfyUI
** User directory: D:\Programs\AI\ComfyUI-Desktop\Installs\ComfyUI-XPU\ComfyUI\user
** ComfyUI-Manager config path: D:\Programs\AI\ComfyUI-Desktop\Installs\ComfyUI-XPU\ComfyUI\user\__manager\config.ini
** Log path: D:\Programs\AI\ComfyUI-Desktop\Installs\ComfyUI-XPU\ComfyUI\user\comfyui.log
[INFO] [PRE] ComfyUI-Manager
[INFO] Found comfy_kitchen backend triton: {'available': True, 'disabled': True, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope1_', 'apply_rope_', 'apply_rope_split_half', 'apply_rope_split_half1', 'apply_rope_split_half1_', 'apply_rope_split_half_', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'int8_linear', 'quantize_and_rotate_rowwise', 'quantize_int8_rowwise', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'rms_adaln', 'rms_rope', 'rms_rope1', 'rms_rope1_', 'rms_rope_', 'rms_rope_split_half', 'rms_rope_split_half1', 'rms_rope_split_half1_', 'rms_rope_split_half_']}
[INFO] Found comfy_kitchen backend cuda: {'available': False, 'disabled': True, 'unavailable_reason': 'CUDA not available on this system', 'capabilities': []}
[INFO] Found comfy_kitchen backend eager: {'available': True, 'disabled': False, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope1_', 'apply_rope_', 'apply_rope_split_half', 'apply_rope_split_half1', 'apply_rope_split_half1_', 'apply_rope_split_half_', 'convrot_w4a4_linear', 'dequantize_convrot_w4a4_weight', 'dequantize_int8_convrot_weight', 'dequantize_int8_convrot_weight_dtype', 'dequantize_int8_embedding', 'dequantize_int8_simple', 'dequantize_int8_simple_dtype', 'dequantize_mxfp8', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'gemv_awq_w4a16', 'int8_linear', 'prepare_int4_weight_for_int8_linear', 'quantize_and_rotate_rowwise', 'quantize_convrot_w4a4_weight', 'quantize_int8_convrot_weight', 'quantize_int8_rowwise', 'quantize_int8_tensorwise', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'quantize_svdquant_w4a4', 'rms_adaln', 'rms_rope', 'rms_rope1', 'rms_rope1_', 'rms_rope_', 'rms_rope_split_half', 'rms_rope_split_half1', 'rms_rope_split_half1_', 'rms_rope_split_half_', 'scaled_mm_mxfp8', 'scaled_mm_nvfp4', 'scaled_mm_svdquant_w4a4', 'stochastic_rounding_fp8']}
[INFO] Found comfy_kitchen backend hip: {'available': False, 'disabled': False, 'unavailable_reason': 'PyTorch ROCm/HIP runtime not available', 'capabilities': []}
[INFO] Checkpoint files will always be loaded safely.
[INFO] Total VRAM 11876 MB, total RAM 32592 MB
[INFO] pytorch version: 2.13.0+xpu
[INFO] Set vram state to: NORMAL_VRAM
[INFO] Device: xpu:0 Intel(R) Arc(TM) B580 Graphics
[INFO] Using pytorch attention
[INFO] Python version: 3.13.12 (main, Feb 12 2026, 00:38:53) [MSC v.1944 64 bit (AMD64)]
[INFO] ComfyUI version: 0.30.1
[INFO] comfy-aimdo version: 0.4.11
[INFO] comfy-kitchen version: 0.2.26
[INFO] comfyui-frontend-package version: 1.47.12
[INFO] comfyui-workflow-templates version: 0.11.27
[INFO] comfyui-embedded-docs version: 0.5.9
[INFO] comfy-kitchen version: 0.2.26
[INFO] comfy-aimdo version: 0.4.11
[INFO] [Prompt Server] web root: D:\Programs\AI\ComfyUI-Desktop\Installs\ComfyUI-XPU\ComfyUI\.venv\Lib\site-packages\comfyui_frontend_package\static
[INFO] Asset seeder disabled
[INFO] [START] ComfyUI-Manager
[ComfyUI-Manager] Using GitPython backend
[INFO] [ComfyUI-Manager] network_mode: public
[WARNING] [ComfyUI-Manager] The matrix sharing feature has been disabled because the `matrix-nio` dependency is not installed.
To use this feature, please run the following command:
D:\Programs\AI\ComfyUI-Desktop\Installs\ComfyUI-XPU\ComfyUI\.venv\Scripts\python.exe -m pip install matrix-nio
[INFO] No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
[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://127.0.0.1:8188
[INFO] [ComfyUI-Manager] The ComfyRegistry cache update is still in progress, so an outdated cache is being used.
FETCH DATA from: D:\Programs\AI\ComfyUI-Desktop\Installs\ComfyUI-XPU\ComfyUI\.venv\Lib\site-packages\comfyui_manager\custom-node-list.json [DONE]
[INFO] got prompt
[INFO] Using pytorch attention in VAE
[INFO] Using pytorch attention in VAE
[INFO] VAE load device: xpu:0, offload device: cpu, dtype: torch.bfloat16
[INFO] Found quantization metadata version 1
[INFO] Using MixedPrecisionOps for text encoder
[WARNING] Missing weight for layer model.lm_head
[INFO] CLIP/text encoder model load device: xpu:0, offload device: cpu, current: cpu, dtype: torch.float16
[INFO] Requested to load Flux2TEModel_
[INFO] loaded completely; 10456.44 MB usable, 8263.34 MB loaded, full load: True
[INFO] Found quantization metadata version 1
[INFO] Detected mixed precision quantization
[INFO] Using mixed precision operations
[INFO] Native ops: int8_tensorwise, convrot_w4a4 , emulated ops: float8_e4m3fn, nvfp4, float8_e5m2, mxfp8
[INFO] model weight dtype torch.bfloat16, manual cast: torch.bfloat16
[INFO] model_type FLUX
[INFO] Requested to load Flux2
[INFO] loaded partially; 8349.92 MB usable, 8196.02 MB loaded, 800.00 MB offloaded, 144.00 MB buffer reserved, lowvram patches: 0
100%|██████████| 4/4 [00:14<00:00, 3.64s/it]
[INFO] Requested to load AutoencoderKL
[INFO] Unloaded partially: 5460.02 MB freed, 2736.00 MB remains loaded, 432.00 MB buffer reserved, lowvram patches: 0
[INFO] loaded completely; 3655.85 MB usable, 160.31 MB loaded, full load: True
[INFO] Prompt executed in 93.68 seconds
[INFO] got prompt
[INFO] loaded partially; 8349.90 MB usable, 8196.02 MB loaded, 800.00 MB offloaded, 144.00 MB buffer reserved, lowvram patches: 0
100%|██████████| 4/4 [00:11<00:00, 2.94s/it]
[INFO] Requested to load AutoencoderKL
[INFO] Unloaded partially: 5460.02 MB freed, 2736.00 MB remains loaded, 432.00 MB buffer reserved, lowvram patches: 0
[INFO] loaded completely; 3655.85 MB usable, 160.31 MB loaded, full load: True
[INFO] Prompt executed in 17.29 seconds
[INFO] got prompt
[INFO] Using pytorch attention in VAE
[INFO] Using pytorch attention in VAE
[INFO] VAE load device: xpu:0, offload device: cpu, dtype: torch.bfloat16
[INFO] Found quantization metadata version 1
[INFO] Using MixedPrecisionOps for text encoder
[INFO] got prompt
[INFO] FETCH ComfyRegistry Data [DONE]
[INFO] [ComfyUI-Manager] default cache updated: https://api.comfy.org/nodes
FETCH DATA from: D:\Programs\AI\ComfyUI-Desktop\Installs\ComfyUI-XPU\ComfyUI\user\__manager\cache\1514988643_custom-node-list.json [DONE]
[INFO] [ComfyUI-Manager] All startup tasks have been completed.
[INFO] Requested to load Krea2TEModel_
[INFO] loaded completely; 4999.47 MB loaded, full load: True
[INFO] CLIP/text encoder model load device: xpu:0, offload device: cpu, current: xpu:0, dtype: torch.float16
[INFO] Found quantization metadata version 1
[INFO] Detected mixed precision quantization
[INFO] Using mixed precision operations
[INFO] Native ops: int8_tensorwise, convrot_w4a4 , emulated ops: float8_e4m3fn, nvfp4, float8_e5m2, mxfp8
[INFO] model weight dtype torch.bfloat16, manual cast: torch.bfloat16
[INFO] model_type FLUX
[INFO] Requested to load Krea2
[INFO] loaded partially; 9955.64 MB usable, 9847.64 MB loaded, 2683.68 MB offloaded, 108.00 MB buffer reserved, lowvram patches: 0
0%| | 0/8 [00:00
Contributor guide
Research direction
Reproduce the failure on an Intel Arc B580 with native PyTorch XPU using the listed launch flags and the Flux 2 Klein 9B FP8 to Krea 2 FP8 sequence. Start at the KSampler execution path and the model-loading VRAM calculation; done means device-wide free VRAM is accounted for and KSampler begins normally instead of remaining at 0/8.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- backend, machine-learning, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100