MetaPrompt
详情
下载文件 (1)
模型描述
https://github.com/orion4d/Orion4D_MetaPrompt
Orion4D MetaPrompt Custom Nodes for ComfyUI
An advanced, high-productivity prompt engineering suite for ComfyUI. This package introduces modal web interfaces (APIs) built directly into ComfyUI to seamlessly combine structured text lists, manual text blocks, and local LLM features via Ollama (both text enrichment and vision capabilities) without cluttering your node graph. It also includes List Constructor, a standalone browser utility for building, cleaning, organizing, and exporting prompt lists before using them inside MetaPrompt workflows.
🚀 Features Overview
🧠 MetaPrompt Node: A dynamic prompt builder that reads text lists (
.txt/.csv) and manual chunks. Features separate text separators, independent randomization seeds, and a fully reactive embedded.txt/.csvdirectory browser within a popup modal window.🧠 MetaPrompt Ollama Node: Inherits the core block prompt builder and injects a runtime prompt enhancement step utilizing your local Ollama models (
/api/chator/api/generate). Perfect for automatically upgrading sparse concept ideas into highly detailed generation prompts.🖼️ ImageToPrompt Ollama Node: A dedicated local vision captioning node. Connect a standard ComfyUI
IMAGEtensor input or configure a continuous batch folder scan to leverage local visual large language models (VLLMs) for generating precise descriptive prompts.🧰 List Constructor Utility: A standalone web utility for creating, labeling, cleaning, sorting, copying, importing, and exporting prompt lists (
.txt,.csv, and reusable.jsconfigurations).
🛠️ Installation
Method 1: Via ComfyUI Manager (Recommended)
Open the ComfyUI Manager inside your ComfyUI interface.
Search for
Orion4D MetaPrompt.Click Install, then restart ComfyUI.
Method 2: Manual Installation
Clone this repository directly into your ComfyUI custom_nodes directory:
cd /path/to/ComfyUI/custom_nodes/
git clone https://github.com/orion4d/Orion4D_MetaPrompt.gitRestart your ComfyUI server after cloning.
💡 Prerequisite for LLM Features: To use the Ollama nodes, ensure you have Ollama installed locally and running (ollama serve). Make sure to pull the models you wish to use (e.g., ollama pull qwen3-vl:4b, ollama pull gemma4:12b).
🌐 Standalone Utility: List Constructor
List Constructor is a companion browser utility designed to prepare clean prompt lists before using them in MetaPrompt or any other prompt-generation workflow. It is especially useful for building reusable .txt / .csv list files, organizing prompt fragments by category, and quickly cleaning large batches of text entries.
🔗 Live utility: Open List Constructor
📦 Repository: Orion4D_MetaPrompt on GitHub
Key Features
Label-based organization: Create, rename, color-code, and manage custom labels for prompt entries.
Fast list editing: Add single notes, paste raw multiline text, remove duplicates, remove empty entries, and apply prefix/suffix operations.
Text cleanup tools: Search and replace text across all entries, sort alphabetically, or sort by label.
Clipboard workflow: Copy the current list directly to the clipboard for quick reuse.
Export options: Export the full list as
.txt, export only selected labels, or import existing.txt/.csvlists.Reusable configurations: Save and reload complete List Constructor sessions as
.jsconfiguration files, including title, labels, colors, and note contents.
Recommended Workflow
Open the standalone List Constructor utility.
Paste or create your prompt fragments, keywords, style blocks, subject lists, or category lists.
Clean and organize them using labels, sorting, duplicate removal, prefix/suffix, or search/replace.
Export the result as
.txt/.csv, then load it inside the MetaPrompt node directory browser.
📖 Deep Node Reference
1. 🧠 MetaPrompt
Designed to eliminate spaghetti workflows caused by hundreds of combined primitive strings or random selectors.
Modal UI UI Interface: Click "Open APP" on the node to open a full-screen environment.
Dynamic Chaining: Add as many blocks as you want. Arrange them using the drag-and-drop handles (
⠿).Advanced Seed Rules: Control how elements are picked from text lists on each queue run:
Manual / Select: Stays locked onto the line you manually choose or edit.Randomize: Pick a random line every queue using an independent seed.Increment / Decrement: Sequentially cycle through lines step-by-step.
Path Safety: Configurable security settings allow you to map custom external paths alongside the built-in
{COMFY}and{CUSTOM}tokens.
2. 🧠 MetaPrompt Ollama
Combines structured list generation with advanced LLM prompt expansion.
Prompt Upgrading: Takes the assembled output from your lists/text blocks and passes it through an instruction layer to expand detail, lighting, camera angles, and art styles.
Smart Retry & Fallbacks: If local generation occasionally returns an empty response or an exact copy of the source text, the node automatically retries without a seed or safely falls back to the raw source prompt to prevent breaking your generation pipeline.
Global Presets: Save and recall specific Ollama system parameters, model mappings, and engineering instructions onto your disk inside
ollama_presets/.
3. 🖼️ ImageToPrompt Ollama
A dedicated single-image/batch folder visual interrogator optimized for modern local VLLMs.
Dual Input Pipeline:
Connected Input: Connect any upstream ComfyUI Image tensor.
Batch Folder Input: Specify a folder path (supports
{COMFY}and{CUSTOM}path shortcuts). The node scans, filters extensions (.png,.jpg,.webp,.bmp), and processes images sequentially.
Consolidated Optimization: Automatically handles non-standard color channels, pastes transparent alpha backgrounds onto clean white canvas surfaces, and performs smart downsizing safely before encoding to base64—preventing massive HTTP memory overhead leaks on local infrastructure.
API Targets: Auto-detects endpoint routing, testing
/api/generatefirst since local vision weights perform significantly more reliably here compared to chat formatting wrappers.
🔒 Security & Path Resolving
To prevent workflows from breaking across different host operating systems or running environments, all folder structures use safe token wrappers:
{COMFY}: Points directly to your rootComfyUI/base operating path.{CUSTOM}: Points to an additional arbitrary outside directory mapped inside the Global settings layout in the APP menu.
Paths are thoroughly checked using an explicit folder containment algorithm (_is_safe_path) before any data transactions take place, protecting your native file system layout from unauthorized breakout injections.




















