Skip to content
Automation
Command

/recipe

Run a multi-step generation recipe (portrait, hires-fix, style-transfer, etc.)

From plugin
comfyui-mcp
88411 skills4 agents11 commands1 MCP
> /plugin marketplace add artokun/comfyui-mcp
> /plugin install comfy@comfyui-mcp

Command definition

recipe.md
description: Run a multi-step generation recipe (portrait, hires-fix, style-transfer, etc.)
argument-hint: "Recipe name and prompt (e.g. 'portrait a woman with red hair')"

/comfy-recipe — Multi-Step Generation Recipes

The user wants to run a predefined multi-step image generation pipeline. Each recipe chains several workflows together, passing the output of one step as input to the next.

Instructions

1. **Parse the arguments.** The argument is: $ARGUMENTS

If no argument was provided, list the available recipes and ask the user to choose one.

Extract:

  • **Recipe name**: the first word (e.g., `portrait`, `hires-fix`, `product-shot`, `style-transfer`)
  • **Prompt**: everything after the recipe name

2. **Available recipes:**

  • `portrait`: generate a portrait and upscale it
  • `product-shot`: generate a product image with clean background
  • `hires-fix`: generate at low resolution, then upscale with img2img for more detail
  • `style-transfer`: apply a style prompt to an existing image via img2img
  • `morph`: generate two frames and create a smooth morph video between them

3. **Check available models.** Call `list_local_models` with `model_type: "checkpoints"` to find a checkpoint. Also check `model_type: "upscale_models"` for upscale recipes. If models are missing, download appropriate ones before proceeding.

4. **Execute the recipe.** For each step, create the workflow, run it, and chain the output.

Portrait Recipe

  • **Step 1: Generate.** `create_workflow` with `txt2img`, prompt from user, 1024x1024, 25 steps, cfg 7
  • **Step 2: Upscale.** `create_workflow` with `upscale`, using the output image from Step 1, 2x upscale
  • Final output: 2048x2048 upscaled portrait

Product-Shot Recipe

  • **Step 1: Generate.** `create_workflow` with `txt2img`, prompt from user (append "product photography, clean white background, studio lighting" to the prompt), 1024x1024, 25 steps, cfg 7
  • **Step 2: Remove background.** If a background removal node is available, create a workflow to remove the background. Otherwise, skip this step and note it for the user.
  • Final output: product image (with or without background removal)

Hires-Fix Recipe

  • **Step 1: Low-res generation.** `create_workflow` with `txt2img`, prompt from user, 512x768 (or 768x512 for landscape), 20 steps, cfg 7
  • **Step 2: Upscale with img2img.** `create_workflow` with `img2img`, using Step 1 output, target 1024x1536 (or 1536x1024), denoise 0.4-0.5, same prompt, 20 steps
  • Final output: high-resolution image with more detail than direct high-res generation

Style-Transfer Recipe

  • **Step 1: Load source image.** Ask the user for a source image path. Use `upload_image (action:"image")` to make it available.
  • **Step 2: img2img with style.** `create_workflow` with `img2img`, source image from Step 1, style prompt from user, denoise 0.5-0.7 (higher = more stylized, lower = more faithful to original), 25 steps
  • Final output: source image with the requested style applied

Morph Recipe

  • This recipe generates two frames and creates a smooth morph video transitioning between them using WAN 2.2 First-Last-Frame with dual Hi-Lo architecture.
  • **Requires the `wan-flf-video` and `qwen-image-edit` skills.** Load them before executing.

**Frame preparation, anchor frame strategy:**

  • Identify which frame is the "anchor", meaning the one with the more complex composition (e.g., a person standing vs. a small animal). Generate the anchor first, then use Qwen Edit to create the second frame from it. This preserves proportions and scene consistency.
  • If the user provides two existing images, skip generation and go straight to Step 3.
  • **Step 1: Generate anchor frame.** Use Z-Image Turbo (or user's preferred model) to generate the primary frame. Use portrait orientation (832x1472) for standing subjects, landscape (1664x928) for wide scenes. Clear VRAM after.
  • **Step 2: Edit to create second frame.** Upload the anchor frame with `upload_image (action:"image")`. Use Qwen Image Edit (lightning 4-step) to transform it into the second frame. Prompt should describe the desired change while specifying relative size/position (e.g., "Replace the woman with a small cat sitting at the bottom of the image"). Clear VRAM after.
  • **Step 3: Generate morph video.** Upload both frames with `upload_image (action:"image")`. Build the WAN 2.2 dual Hi-Lo FLF workflow per the `wan-flf-video` skill:
  • Two UNETs (Remix NSFW Hi+Lo with built-in lightning, or GGUF Q8 with lightning LoRAs)
  • `ModelSamplingSD3` shift=5 on both
  • `ImageResizeKJv2` to 480x720 (portrait) or 832x480 (landscape)
  • `WanFirstLastFrameToVideo` → dual `KSamplerAdvanced` (Hi: steps 0→2, Lo: steps 2→4, uni_pc/beta)
  • Optional: Apply morph LoRA (`wan2.2_i2v_magical_morph_{highnoise,lownoise}.safetensors`) to Hi/Lo Common stacks at strength 0.7-1.0 for smooth morphing instead of dissolve
  • `VHS_VideoCombine` at 16fps, h264-mp4
  • **Step 4 (optional): Upscale.** Use `VRAM_Debug` to free VRAM, then `SeedVR2VideoUpscaler` to upscale to 1080p.

**Prompt tips for morph videos:**

  • Describe the motion/transformation, not just start and end states
  • **AVOID** "magical", "enchanted", "mystical"; they cause literal sparkle effects
  • **USE** clean motion language: "smoothly transforms", "seamlessly reshapes", "gradually morphs"
  • Include scale cues when subjects differ in size: "grows into", "expands upward"
  • Always include a full negative prompt (see `wan-flf-video` skill)

**Timing reference** (RTX 4090): Z-Image ~35s → Qwen Edit ~78s → WAN FLF 81 frames ~139s = ~4 minutes total

5. **Show progress.** After each step completes:

  • Report what was done and whether it succeeded
  • Show the intermediate image if available
  • Proceed to the next step

6. **Present the final result.** Show the final output image and a summary of all steps taken, inc

Read more
@artokun
Ships withcomfyui-mcp

<img src="docs/images/demo-poster.jpg" width="760" alt="The Agent panel driving ComfyUI end to end. Click to watch the demo"> The Agent panel driving ComfyUI end to end. It reads what is installed locally, wires the graph, frees VRAM, and runs the render.

88442 skills4 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
884
Star history of artokun/comfyui-mcp on GitHub, a chart by star-history.com

Other commands on comfyui-mcp.

More commands from other plugins.

plan

plan

Command

Plan n8n Linear ticket implementation

n8n2w209k
@n8n-io@n8n-ioInstall Command
setup

setup

Command

One-time setup after installing ARIS as a Claude Code plugin — registers the Codex reviewer MCP server from the plugin directory…

aris2w18k
@wanshuiyin@wanshuiyinInstall Command
agent
Auto-invoked

agent

Command

name: sc:agent description: SC Agent — session controller that orchestrates investigation, implementation, and review category:…

@galaxy-dawn@galaxy-dawnInstall Command