Comfy-Org / Comfy-Org/ComfyUI

WinError 4551 - Windows Application Control blocks PyTorch DLLs (c10_cuda.dll, shm.dll)

Open
#15,117 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

## Description
ComfyUI fails to start on Windows with **WinError 4551** — Windows Application Control blocks PyTorch CUDA DLLs from loading.

## Error
```
OSError: [WinError 4551] An Application Control policy has blocked this file.
Error loading "...\python_embeded\Lib\site-packages\torch\lib\c10_cuda.dll"
```
Also occurs with `shm.dll`.

## Steps to Reproduce
1. Download the latest ComfyUI standalone Windows build (NVIDIA version)
2. Run `python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build`
3. ComfyUI crashes immediately with WinError 4551

## Expected Behavior
ComfyUI should start normally without Windows blocking PyTorch DLLs.

## Actual Behavior
Windows Application Control blocks `c10_cuda.dll` and `shm.dll` from loading.

## Workaround
Disable Smart App Control on Windows.

## System Info
- Windows 11
- NVIDIA RTX 3060
- ComfyUI standalone Windows build
- PyTorch 2.13.0+cu130

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build on Windows 11, then investigate how the standalone build packages and loads torch\lib\c10_cuda.dll and shm.dll. Done means the NVIDIA standalone build starts without WinError 4551 while preserving the documented workaround for systems where Windows Application Control still blocks the DLLs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
build-system, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.