Comfy UI
Action ID: comfy_ui
Description
Run any ComfyUI workflow.
Connection
PixelML Connection
The PixelML connection to call PixelML API.
True
pixelml
Input Parameters
workflow_json
string
-
Default SDXL workflow
Your ComfyUI workflow in API format JSON. Export from ComfyUI using 'Save (API format)'
Output Parameters
outputs
array
Array of image URLs generated by the ComfyUI workflow
How It Works
This node executes custom ComfyUI workflows through the PixelML API, allowing you to leverage ComfyUI's powerful node-based image generation capabilities within your AgenticFlow workflows. You provide your ComfyUI workflow in API JSON format (exported from ComfyUI), and the node processes it remotely, returning URLs to the generated images for further use in your workflow pipeline.
Usage Examples
Example 1: Basic Text-to-Image Generation
Input:
workflow_json: {
"3": {
"inputs": {
"seed": 42,
"steps": 20,
"cfg": 7.0,
"sampler_name": "euler",
"scheduler": "normal",
"denoise": 1,
"model": ["4", 0],
"positive": ["6", 0],
"negative": ["7", 0],
"latent_image": ["5", 0]
},
"class_type": "KSampler"
},
"10": {
"inputs": {
"name": "prompt",
"value": "professional portrait of a business woman in modern office, natural lighting"
},
"class_type": "StringInput_PixelML"
}
// ... additional nodes
}Output:
outputs: [
"https://storage.pixelml.com/outputs/comfyui_12345_0.png"
]Example 2: Batch Image Generation
Input:
workflow_json: {
"5": {
"inputs": {
"width": 512,
"height": 768,
"batch_size": 4
},
"class_type": "EmptyLatentImage"
},
"10": {
"inputs": {
"name": "prompt",
"value": "fantasy landscape with mountains and rivers, concept art style"
},
"class_type": "StringInput_PixelML"
}
// ... additional nodes
}Output:
outputs: [
"https://storage.pixelml.com/outputs/comfyui_67890_0.png",
"https://storage.pixelml.com/outputs/comfyui_67890_1.png",
"https://storage.pixelml.com/outputs/comfyui_67890_2.png",
"https://storage.pixelml.com/outputs/comfyui_67890_3.png"
]Example 3: Image-to-Image with ControlNet
Input:
workflow_json: {
"12": {
"inputs": {
"image": "https://example.com/input-sketch.png",
"control_net": "control_v11p_sd15_canny"
},
"class_type": "ControlNetLoader"
},
"10": {
"inputs": {
"name": "prompt",
"value": "realistic photo based on sketch, professional photography"
},
"class_type": "StringInput_PixelML"
}
// ... additional nodes
}Output:
outputs: [
"https://storage.pixelml.com/outputs/comfyui_24680_0.png"
]Common Use Cases
Custom AI Image Generation: Execute complex ComfyUI workflows with custom models, LoRAs, and processing chains
Automated Content Creation: Generate product images, marketing visuals, or social media content at scale
Image Processing Pipelines: Apply sophisticated image transformations like upscaling, inpainting, or style transfer
Batch Image Production: Generate multiple variations of images with different seeds or parameters in one workflow run
ControlNet Integration: Use advanced conditioning methods like pose, depth, or canny edge detection for precise image generation
Custom Model Workflows: Leverage specialized fine-tuned models or custom trained checkpoints not available in standard tools
Complex Multi-Stage Generation: Chain multiple generation steps, refinements, and post-processing in a single workflow
Error Handling
Invalid JSON Format
workflow_json is not valid JSON
Ensure the workflow is properly formatted JSON from ComfyUI's API export
Missing Required Nodes
Workflow missing essential nodes like SaveImage
Include all necessary nodes; ensure at least one SaveImage node exists
Invalid Node Configuration
Node inputs reference non-existent nodes or outputs
Verify all node connections and references are correct in the workflow
Model Not Found
Referenced checkpoint or model doesn't exist on server
Use models available in the PixelML environment or check model names
Insufficient Resources
Workflow requires more GPU memory than available
Reduce batch size, image resolution, or simplify the workflow
Connection Timeout
PixelML API connection failed or timed out
Check your PixelML connection settings and network connectivity
Execution Failed
ComfyUI workflow execution encountered an error
Review the workflow for errors; test locally in ComfyUI first
Notes
PixelML Connection Required: This node requires a valid PixelML connection to execute ComfyUI workflows remotely.
API Format Only: You must export your workflow using ComfyUI's 'Save (API format)' option, not the regular workflow format.
StringInput_PixelML Nodes: Use StringInput_PixelML nodes in your workflow to make it dynamic and accept parameters from AgenticFlow.
Model Availability: Only models and custom nodes available in the PixelML environment can be used; not all local custom nodes may be supported.
Output Image Storage: Generated images are temporarily stored and accessible via URLs; download or save them for long-term use.
Workflow Complexity: Complex workflows with many nodes may take longer to execute; consider execution time in your workflow design.
Testing: Always test your ComfyUI workflow locally before integrating it into AgenticFlow to ensure it works correctly.
Batch Processing: The outputs array will contain multiple URLs if your workflow generates multiple images via batch_size or multiple SaveImage nodes.
Last updated
Was this helpful?