- Home
- Skills
- Image & Video
- ComfyUI Media Engine Skill
Works with the AI Agents you already use
ComfyUI Media Engine Skill
Install, configure, and automate ComfyUI for image, video, and audio generation via API and custom workflows.
$5
ComfyUI Media Engine Skill
Example session with this skill installed
Create a JSON workflow for a basic Stable Diffusion XL image generation task and provide the Python code to submit it to a local ComfyUI API on port 8188.
- Read your context and instructions
- Compiled the comfyui media engine
The following deliverable includes a standard SDXL API-format JSON and a Python script for job submission.
ComfyUI API Workflow
{
"3": {
"class_type": "KSampler",
"inputs": {
"cfg": 8,
"denoise": 1,
"latent_image": ["5", 0],
"model": ["4", 0],
"negative": ["7", 0],
"positive": ["6", 0],
"sampler_name": "euler",
"scheduler": "normal",
"seed": 8566357,
"steps": 20
}
},
"4": {
"class_type": "CheckpointLoaderSimple",
"inputs": {
"ckpt_name": "sd_xl_base_1.0.safetensors"
}
},
"5": {
"class_type": "EmptyLatentImage",
"inputs": {
"batch_size": 1,
"height": 1024,
"width": 1024
}
},
"6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": ["4", 1],
"text": "cinematic shot, mountain landscape, sunset, 8k"
}
},
"7": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": ["4", 1],
"text": "blurry, low quality, distorted"
}
},
"8": {
"class_type": "VAEDecode",
"inputs": {
"samples": ["3", 0],
"vae": ["4", 2]
}
},
"9": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "api_gen",
"images": ["8", 0]
}
}
}
import json
import urllib.request
def queue_prompt(prompt):
p = {"prompt": prompt}
data = json.dumps(p).encode('utf-8')
req = urllib.request.Request("http://127.0.0.1:8188/prompt", data=data)
with urllib.request.urlopen(req) as response:
return json.loads(response.read())
# Example usage with the JSON above
with open('workflow_api.json', 'r') as f:
workflow = json.load(f)
result = queue_prompt(workflow)
print(f"Prompt queued: {result['prompt_id']}")
Next steps
- Ensure
sd_xl_base_1.0.safetensorsis in themodels/checkpointsfolder. - Start ComfyUI with the
--listen 127.0.0.1flag. - Verify the port matches your instance if not using 8188.
Connects securely to your tools. The creator never sees your data.
About this skill
Managing a ComfyUI environment for local or remote AI media generation is often a brittle process of dependency hell, missing nodes, and VRAM management. This skill provides a structured approach for technical assistants to install, configure, and automate ComfyUI across image, video, and audio pipelines. It bridges the gap between raw Python environments and production-ready API workflows.
What it does
- Environment management handles OS-specific installation, Python virtual environments, and hardware-specific launch commands.
- Model orchestration manages checkpoints, VAEs, LoRAs, and motion models within the correct folder structures.
- Dependency resolution audits custom nodes, installs required Python packages, and manages version compatibility.
- Workflow engineering generates and validates ComfyUI JSON files for both UI and API consumption.
- API automation handles job queuing, status monitoring, and output retrieval through the ComfyUI server.
How it works
- Discover the hardware, VRAM, and existing installation paths to establish a baseline.
- Setup the server using platform-specific commands and isolated environments.
- Configure required models and custom nodes based on the target media type.
- Deploy a validated JSON workflow to the API or UI for generation.
Frameworks & tools
This skill works with ComfyUI, Python, CUDA/ROCm, and standard AI media formats. It interfaces with the ComfyUI API, ComfyUI Manager, and various custom node ecosystems for Stable Diffusion and motion models.
Why this beats prompting it yourself
Generic prompts often hallucinate node names, download links, and JSON structures that don't match the actual ComfyUI environment. This skill enforces a diagnostic-first workflow that verifies hardware constraints and node schemas before suggesting code. It prevents broken environments by prioritizing isolated dependencies and verified repository instructions.
Use cases
- Automate high-resolution image generation pipelines via API.
- Set up a video generation environment using AnimateDiff or SVD.
- Troubleshooting CUDA memory errors or missing custom node dependencies.
- Migrating a manual UI workflow into a headless API script.
Known limitations
Does not bypass license requirements for restricted models. Performance is strictly limited by the user's available GPU VRAM and disk space. API features require a running ComfyUI server instance.
Requires an existing or new Python environment. Hardware-dependent for VRAM and CUDA. Cannot bypass model licenses. API features require a reachable server.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 28 days ago
Requires
Permissions
No special permissions declared or detected