Extensions/Node Encrypt
ComfyUI Extension

Node Encrypt

Encrypt sensitive node parameters in ComfyUI workflows. PBKDF2 + AES-256-GCM, password never leaves your browser.

By lvqunx·Created about a month ago·Updated about a month ago· 0
lvqunx/ComfyUI-NodeEncrypt
Nodes
On cloudLocal install
Stars0
Updatedabout a month ago
Readme

ComfyUI-NodeEncrypt

Encrypt sensitive node parameters in ComfyUI workflows. Widget values are encrypted in-browser and stored in the workflow JSON — the password never leaves your machine.

Features

  • Per-node encryption: Right-click any node → Encrypt Node. Its widgets are replaced by a lock overlay.
  • Group encryption: Right-click a group → Encrypt Group. All nodes inside the group are encrypted at once.
  • Multi-select encryption: Select multiple nodes, right-click the canvas → Encrypt Selected.
  • Decrypt on demand: Right-click an encrypted node → Decrypt Node. Enter the same password to restore values.
  • Survives save/load: Encrypted workflows can be saved, shared, and loaded. Only someone with the password can decrypt.

How it works

| Step | Detail | |------|--------| | Encryption | PBKDF2 (100 000 iterations) + AES-256-GCM via browser Web Crypto API | | Storage | __ENCRYPTED__:<base64(salt+iv+ciphertext)> in widgets_values[0] | | Security | Password is never sent to the server or stored anywhere |

Installation

  1. Clone into ComfyUI/custom_nodes/:
    cd ComfyUI/custom_nodes/
    git clone https://github.com/your-name/ComfyUI-NodeEncrypt
    
  2. Restart ComfyUI (or refresh the browser page).
  3. Right-click any node → Encrypt Node.

The plugin is also available through ComfyUI Manager.

Usage

Encrypt a single node

Right-click the node → 🔒 Encrypt Node → enter + confirm a password.

The node becomes locked with a dark overlay. To decrypt, right-click the overlay → 🔓 Decrypt Node → enter the password.

Encrypt a group

Right-click the group border → 🔒 Encrypt Group → enter a password. All nodes whose bounding box is fully inside the group are encrypted.

Encrypt multiple selected nodes

Select nodes (Ctrl+click / drag-select), right-click canvas → 🔒 Encrypt Selected.

Decrypt

Right-click any locked node → 🔓 Decrypt Node. If the password is wrong, the values stay encrypted.

Technical notes

  • The original node title is saved alongside encrypted values so it can be restored on decryption.
  • After decryption, values are re-populated in the node widgets and the overlay is removed.
  • Encrypted nodes export with full encryption metadata in the workflow JSON — no plaintext values leak.
  • Overlay uses a position: fixed DOM element that covers the node (including the title bar) at z-index: 99999.

Files

ComfyUI-NodeEncrypt/
├── __init__.py     # Plugin entry point (WEB_DIRECTORY = "js")
├── js/
│   └── node-encrypt.js   # All logic: encrypt, decrypt, overlay, menus
└── README.md

License

MIT