Generate AI images with ComfyUI workflows directly in VSCode. Enter text prompts, monitor real-time progress via WebSocket, and auto-save outputs to your workspace.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
A VSCode extension that enables seamless image generation using ComfyUI workflows directly within your development environment. Enter text prompts to create AI-generated images, preview them in real-time, and save outputs to your workspace. Ideal for developers integrating AI tools into their workflows.
Features
Prompt-Based Image Generation: Use simple text prompts to generate images via ComfyUI's Stable Diffusion workflows, with support for custom node configurations.
Real-Time Previews and Progress: WebSocket integration provides live updates on generation progress and intermediate image previews in a dedicated VSCode panel.
Automatic Workspace Saving: Generated images are saved directly to your open workspace folder with unique timestamps for easy organization.
Configurable Server Integration: Connect to local or hosted ComfyUI servers (e.g., via API keys), with customizable workflow templates for advanced users.
Multiple Commands: Generate, preview, or save images using dedicated VSCode commands, activated on demand.
Installation
From VSCode Marketplace (Recommended):
Open VSCode.
Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X on macOS).
Search for "ComfyUI Linker".
Click Install.
After installation, reload VSCode if prompted.
Usage
Prerequisites Setup:
Ensure a ComfyUI server is running (default: http://localhost:8188).
Set the serverUrl, apiKey, workflowTemplate, promptNodeId, promptInputKey value.
Open a workspace folder in VSCode where images will be saved.
Generate an Image:
Run the command ComfyUI Linker: Generate Image (via Command Palette: Ctrl+Shift+P or Cmd+Shift+P).
Enter your text prompt (e.g., "a beautiful landscape").
The extension will connect to the server, show progress in a preview panel, and save the image(s) to your workspace.
Images are saved as PNG files with prefixes like comfyui_saved_ or comfyui_preview_generated_.
For custom workflows, edit the comfyui.workflowTemplate in VSCode settings (JSON format).
Requirements
VSCode: Version 1.80.0 or higher.
ComfyUI Server: A running instance (local or remote) with Stable Diffusion models loaded. Install via ComfyUI GitHub.
Node.js: Not required for usage, but needed if building from source.
Open a workspace folder to enable image saving.
Contributing
Contributions are welcome! Please:
Fork the repository.
Create a feature branch (git checkout -b feature/amazing-feature).