multi-backend stable diffusion image generation with session orchestration
Manages end-to-end image generation workflows by maintaining a central Generation Session object that coordinates parameters (prompts, dimensions, sampling steps), selection context from Photoshop, and communication with pluggable backends (Automatic1111, ComfyUI, Stable Horde). The session persists generation state and history across multiple requests, enabling iterative refinement without re-specifying parameters. Implements a backend abstraction layer that normalizes API differences across implementations, allowing users to switch backends without UI changes.
Unique: Implements a UXP-based plugin architecture that maintains a stateful Generation Session object bridging Photoshop's document context with multiple Stable Diffusion backends through a normalized API abstraction layer, enabling seamless backend switching without UI reconfiguration
vs alternatives: Tighter Photoshop integration than web-based Stable Diffusion UIs (no tab-switching) and more flexible backend support than Photoshop's native AI features (supports self-hosted Automatic1111, ComfyUI, and Stable Horde)
photoshop layer and selection-aware image inpainting and outpainting
Extracts active selection boundaries and layer information from Photoshop documents using the UXP API, converts selected regions to base64-encoded image data, and sends them to the backend as inpainting masks or reference images. Supports both inpainting (regenerating masked regions) and outpainting (extending canvas beyond original boundaries) by reading selection geometry and layer pixel data. After generation, automatically places results back into Photoshop as new layers, preserving layer hierarchy and blend modes.
Unique: Leverages Photoshop's native UXP API to read live selection geometry and layer pixel data, converting them to inpainting masks without requiring external image files or clipboard operations, enabling seamless inpainting workflows within the Photoshop canvas
vs alternatives: More integrated than standalone inpainting tools (no export/import cycle) and preserves Photoshop layer structure better than web-based inpainting UIs that return flat images
stable diffusion model and sampler selection with dynamic backend discovery
Queries the configured backend to dynamically discover available models and samplers, populating UI dropdowns with live options from the backend. Allows users to select which Stable Diffusion model to use (e.g., sd-v1-5, sd-xl, custom fine-tuned models) and which sampler/scheduler to apply (e.g., DPM++, Euler, Heun). Caches discovered models and samplers to avoid repeated API calls, with manual refresh option. Supports model switching without restarting the plugin, and automatically validates that selected model is available on the backend before generation.
Unique: Implements dynamic model and sampler discovery by querying backend APIs at runtime, populating UI dropdowns with live options and caching results to avoid repeated API calls, enabling seamless model switching without manual configuration
vs alternatives: More discoverable than manual model configuration (dropdown vs text input) and more flexible than hardcoded model lists, though requires backend API support for model enumeration
seed management and reproducible generation with history tracking
Manages random seed values for generation, allowing users to specify fixed seeds for reproducible results or use random seeds for variation. Tracks generation history including seed, prompt, parameters, and output image, enabling users to reproduce previous generations by selecting from history. Implements seed validation (ensuring seeds are within valid range) and provides UI controls for seed increment (generating variations with sequential seeds). Stores generation history in memory during session with optional export to JSON for external analysis.
Unique: Implements in-memory generation history tracking with seed-based reproducibility, allowing users to re-run previous generations by selecting from history and automatically re-using the same seed and parameters without manual re-entry
vs alternatives: More convenient than manual seed tracking (dropdown vs manual entry) and enables faster iteration than random seed generation, though history is ephemeral and requires manual export for persistence
controlnet-guided image generation with preset management
Integrates ControlNet conditioning by accepting control images (edge maps, depth maps, pose skeletons, etc.) and control strength parameters, forwarding them to backends that support ControlNet (Automatic1111 with ControlNet extension, ComfyUI with ControlNet nodes). Includes a preset system (stored in controlnet_preset.js) that defines common ControlNet configurations (Canny edges, depth estimation, OpenPose, etc.), allowing users to select presets from the UI rather than manually configuring control types. Automatically extracts control images from Photoshop selections or accepts external image uploads.
Unique: Implements a preset-based ControlNet configuration system (controlnet_preset.js) that abstracts backend-specific ControlNet node/extension differences, allowing users to select high-level control types (edges, depth, pose) from a dropdown without understanding underlying backend API differences
vs alternatives: Simpler ControlNet workflow than ComfyUI's node-based interface (presets vs manual node wiring) and more discoverable than Automatic1111's text-based ControlNet API (UI dropdown vs parameter strings)
segment anything model (sam) integration for automatic mask generation
Integrates SAM (Segment Anything Model) to automatically generate inpainting masks from user clicks or bounding boxes on the Photoshop canvas. When enabled, SAM processes the current image and generates precise segmentation masks for selected objects, which are then used as inpainting masks for subsequent generation. The plugin communicates with a backend SAM service (typically running as a separate Python service) to perform segmentation, then converts SAM output masks to Photoshop selections or inpainting masks.
Unique: Bridges Photoshop's canvas interaction (click-based object selection) with SAM's segmentation capabilities through a separate backend service, enabling one-click object masking without manual selection tool usage
vs alternatives: Faster object masking than manual Photoshop selection tools and more accurate than color-range selection for complex boundaries, though requires additional SAM service infrastructure vs built-in Photoshop selection tools
image-to-image transformation with style transfer and variation generation
Accepts uploaded or Photoshop-sourced images as input and performs image-to-image (img2img) transformations using a denoising strength parameter (0.0-1.0) that controls how much the output diverges from the input. Lower strength values preserve input image structure while applying style changes; higher values allow more creative variation. Supports style transfer (applying artistic styles while maintaining composition), variation generation (creating similar images with different details), and guided image editing (regenerating specific aspects while preserving others). Communicates with backend img2img endpoints that support denoising strength parameter.
Unique: Integrates img2img transformation directly into Photoshop's workflow by accepting Photoshop selections or layers as input images, eliminating export/import cycles and allowing iterative style exploration within the native editing environment
vs alternatives: More seamless than external style transfer tools (no export/import) and offers finer control over style strength via denoising parameter than Photoshop's native neural filters
one-button prompt generation from image context
Analyzes the current Photoshop image or selection and automatically generates descriptive text prompts using a vision model or heuristic analysis. This enables users to generate variations or transformations without manually writing detailed prompts. The feature extracts visual features (colors, objects, composition) from the image and constructs prompts that preserve these characteristics while allowing style or content modifications. Integrates with external vision APIs (e.g., CLIP interrogation, image captioning services) or uses local heuristics to generate prompts.
Unique: Implements one-click prompt generation from Photoshop images by integrating with vision models (CLIP interrogation or image captioning), reducing prompt engineering friction for non-technical users while maintaining image-to-image generation workflows
vs alternatives: Faster than manual prompt writing and more contextually relevant than generic prompt templates, though less precise than hand-crafted prompts for specific artistic directions
+4 more capabilities