Nodes/ComfyUI-WorkflowGenerator/2. NodeValidator (Optional)
ComfyUI Node

2. NodeValidator (Optional)

Step 2 (Optional) - Validates and corrects node names. Uses semantic search and optionally an LLM to fix invalid node references. Recommended to ensure workflow generation succeeds if Step 1 produces errors.

By DanielPFlorian·Created 9 months ago·Updated 9 months ago· 34
2. NodeValidator (Optional)
    • workflow_edges (refined)
    • llm_prompts (debug)
    • candidate_nodes (debug)
    instruction
    workflow_edges
    use_llm_refinementfalse
    refine_model_pathQwen2.5-7B-Instruct-q8_0.gguf
    embedding_model_pathparaphrase-multilingual-MiniLM-L12-v2
    catalog_directorycatalog
    dtypeauto
    device_preferenceauto
    attn_implementationauto
    auto_gpu_layerstrue
    n_gpu_layers-1
    max_new_tokens4096
    context_size4096
    use_mmaptrue
    use_mlockfalse
    n_batch512
    n_threadsAuto
    temperature0.95
    top_k5
    top_p0.70
    seed0
    CategoryWorkflowGenerator

    Inputs (21)

    NameTypeDefaultDescription
    instructionSTRINGOptional context for LLM refinement. Connect 'instruction' output from Step 1 or add your own instructions to guide refinement.
    workflow_edgesSTRINGInput diagram from Step 1 (WorkflowGenerator).
    use_llm_refinementBOOLEANfalseEnable LLM-based correction for better accuracy (slower). False uses only semantic search.
    refine_model_pathCOMBOQwen2.5-7B-Instruct-q8_0.ggufLLM model for refinement (if enabled).
    embedding_model_pathCOMBOparaphrase-multilingual-MiniLM-L12-v2Embedding model for semantic search.
    catalog_directorySTRINGcatalogDirectory containing node catalog files.
    dtypeCOMBOautoData type for refinement model (HuggingFace).
    device_preferenceCOMBOautoDevice preference for refinement model.
    attn_implementationCOMBOautoAttention implementation (HuggingFace).
    auto_gpu_layersBOOLEANtrueAuto-calculate GPU layers based on available VRAM (prevents OOM errors) (GGUF).
    n_gpu_layersINT-1-1–1000Number of GPU layers (GGUF). -1 for all.
    max_new_tokensINT40961–16384Max tokens for refinement.
    context_sizeINT4096512–32768Context window size (GGUF).
    use_mmapBOOLEANtrueUse memory-mapped loading (GGUF).
    use_mlockBOOLEANfalseLock memory to prevent swapping (GGUF).
    n_batchINT51232–2048Batch size for prompt processing (GGUF).
    n_threadsCOMBOAutoCPU threads for inference (GGUF).
    temperatureFLOAT0.950–2Sampling temperature.
    top_kINT51–20Number of similar nodes to consider.
    top_pFLOAT0.700–1Top-p sampling.
    seedINT00–4294967295Random seed.

    Outputs (3)

    NameTypeDescription
    workflow_edges (refined)STRINGRefined workflow diagram with corrected names.
    llm_prompts (debug)STRINGPrompts sent to LLM (debug).
    candidate_nodes (debug)STRINGCandidate nodes found (debug).