Skip to content

User profile management for ComfyUI with custom folders and file encryption

License

Notifications You must be signed in to change notification settings

femanzo/comfyui-user-profiles

Repository files navigation

ComfyUI User Profiles

A ComfyUI extension that adds user profile management with separate input/output folders and optional file encryption.

Features

  • Multiple Profiles: Create and manage multiple user profiles
  • Custom Folders: Each profile can have its own input and output directories
  • Password Protection: Secure profiles with password authentication
  • File Encryption: Optionally encrypt your input/output folders when logged out (AES-256)
  • Manual Encryption Control: Files are only encrypted when you choose to logout or safe exit
  • Progress Feedback: Visual progress bar during encryption/decryption
  • Native UI Integration: Profile selector button in ComfyUI's toolbar

Compatibility

This extension is tested on ComfyUI Portable / Desktop for Windows. It may work on other platforms but is not guaranteed.

Installation

Method 1: ComfyUI Manager (Recommended)

  1. Open ComfyUI Manager
  2. Search for "User Profiles"
  3. Click Install

Method 2: Git Clone

cd ComfyUI/custom_nodes
git clone https://github.com/femanzo/comfyui-user-profiles.git
cd comfyui-user-profiles
pip install -r requirements.txt

Method 3: Manual Installation

  1. Download this repository as a ZIP file
  2. Extract to ComfyUI/custom_nodes/comfyui-user-profiles
  3. Install dependencies:
    pip install cryptography
  4. Restart ComfyUI

Usage

Creating a Profile

  1. Click the profile button in the toolbar (or the floating button)
  2. Click "Create New Profile"
  3. Enter a profile name
  4. (Optional) Set a password
  5. (Optional) Set custom input/output folders
  6. (Optional) Enable folder encryption
  7. Click "Create Profile"

Logging In

  1. Select a profile from the dropdown
  2. Enter password if required
  3. Click "Login"

Folder Encryption

When enabled, your input and output folders can be encrypted to protect your files. Encryption is manual - files remain unencrypted while you work and are only encrypted when you explicitly choose to do so.

To encrypt your files:

  • Click "Logout" in the profile menu - encrypts files and logs you out
  • Click "Safe Exit (Encrypt & Close)" - encrypts files, then you can close ComfyUI

Files are automatically decrypted when you log in.

Important: If you close ComfyUI without logging out or using Safe Exit, your files will remain unencrypted. This is by design to give you full control over when encryption happens.

Safe Exit

For profiles with encryption enabled, the Safe Exit (Encrypt & Close) button provides a convenient way to encrypt and close:

  1. Click the profile button in the toolbar
  2. Click "Safe Exit (Encrypt & Close)"
  3. Watch the encryption progress
  4. Close the window when prompted

Note: Encryption requires a password. Without the password, encrypted files cannot be recovered.

Configuration

Profiles are stored in:

ComfyUI/user/user_profiles/profiles.json

Security Notes

  • Passwords are hashed using SHA-256 with a unique salt per profile
  • File encryption uses Fernet (AES-128-CBC) with PBKDF2 key derivation
  • Encryption keys are derived from your password - do not forget your password
  • The cryptography library is required for encryption features

Screenshots

Login Screen

Login Screen

Profile Management

Profile Management

Requirements

  • ComfyUI (latest version recommended)
  • Python 3.10+
  • cryptography library (for encryption features)

Troubleshooting

Profiles not loading after restart

  • Check that profiles.json exists in ComfyUI/user/user_profiles/
  • Check ComfyUI logs for any error messages

Encryption not working

  • Ensure cryptography is installed: pip install cryptography
  • Make sure you have a password set on the profile
  • Check that the input/output folders exist and are accessible

Extension not loading

  • Verify the extension is in ComfyUI/custom_nodes/comfyui-user-profiles/
  • Check for Python import errors in the console
  • Ensure all files are present (__init__.py, profile_manager.py, encryption.py)

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Commit Convention

This project uses Conventional Commits for automatic versioning and changelog generation.

Commit types:

  • feat: - New feature (bumps minor version)
  • fix: - Bug fix (bumps patch version)
  • docs: - Documentation only
  • style: - Code style changes
  • refactor: - Code refactoring
  • perf: - Performance improvement
  • test: - Adding tests
  • chore: - Maintenance tasks

Examples:

feat: add profile export/import functionality
fix: prevent config loss on crash
docs: update installation instructions

Changelog

See CHANGELOG.md for a detailed history of changes.

About

User profile management for ComfyUI with custom folders and file encryption

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published