Files
polymath-wtf de2e3e0161 example
Added images and improved formatting in README.
2025-12-28 05:23:09 +02:00

2.5 KiB

ComfyUI-Polymath-Vibenodes

Custom Vibe

Polymath JSON Prompt

A custom ComfyUI node that lets you make auto json prompts with a simple placeholder templating syntax, while automatically creating dynamic input ports for any referenced placeholders.

Why

Чтобы автоматизировать json промпты, работая с n8n и создавая dataset for lora with qwen-edit in one click

polymath json node panda example panda salto

Node

  • Name: Polymath JSON Prompt
  • Category: Polymath
  • Output: STRING (pretty-printed valid JSON)

Placeholder syntax

Use placeholders without quotes:

{
  "scene": {{ $json['scene'].prompt }},
  "identity": {{ $json['identity'].prompt }}
}

Rules:

  • Placeholders are matched by the pattern:

    {{ $json['KEY'].prompt }}

  • KEY becomes a dynamic input port on the node.

  • The incoming value is treated as a string, JSON-escaped, and inserted into the template.

  • The final rendered result is validated with json.loads(). If it is not valid JSON, the node throws an error.

Example template

{
  "scene": {{ $json['scene'].prompt }},
  "character": [
    {
      "identity": {{ $json['identity'].prompt }},
      "pose": {{ $json['pose'].prompt }},
      "dress": {{ $json['dress'].prompt }},
      "emotion": {{ $json['emotion'].prompt }},
      "action": {{ $json['action'].prompt }}
    }
  ],
  "style": "...",
  "lighting": "...",
  "mood": "...",
  "camera": {
    "angle": "high angle",
    "distance": "medium shot",
    "focus": "Sharp focus on ... in frame",
    "lens-mm": 85,
    "f-number": "f/5.6",
    "ISO": 200
  }
}

Install

  1. Manual git clone into ComfyUI/custom_nodes:

    git clone https://github.com/polymath-wtf/ComfyUI-Polymath-Vibenodes.git
    
  2. Restart UI.

Development notes

  • First VibeNode&VibeCode, Enjoy
  • Backend is implemented using the ComfyUI V3 API (comfy_api.latest.IO). v3? wtf? idk