MCPcopy Index your code

hub / github.com/DanielPFlorian/ComfyUI-WorkflowGenerator / functions

Functions100 in github.com/DanielPFlorian/ComfyUI-WorkflowGenerator

↓ 21 callersFunctioncheck_add
(val, name)
utils/node_utils.py:96
↓ 11 callersFunctionformat
Format node type by removing the last underscore and everything after it. Also handles node names with parentheses (e.g., "Node Name (author)
utils/process_utils.py:10
↓ 8 callersFunctionresolve_model_path
Resolve a model path relative to ComfyUI's model directories. Args: model_path: Model path (can be relative or absolute) mod
utils/model_manager.py:68
↓ 7 callersFunctionget_comfyui_base_path
Get the base path of the ComfyUI installation. Returns: Path to ComfyUI base directory or None if not found
utils/model_manager.py:28
↓ 6 callersMethodfetch_node_meta_info
Fetch metadata information for a node type. Args: node_type: Node type name Returns: Node metadata
generators/node_validator.py:121
↓ 6 callersFunctionget_model_full_path
Get full path to a model using ComfyUI's folder_paths. Args: model_name: Model name (e.g., "workflow-generator-q8_0.gguf" or "Qwen2.
utils/model_manager.py:455
↓ 5 callersMethoddefine_schema
(cls)
nodes/pipeline_node.py:51
↓ 5 callersMethodfind_most_similar
Find the k most similar nodes to the given node type using semantic search. Args: node_type: Node type name to search fo
generators/node_validator.py:153
↓ 4 callersMethodbuild_node_base_config
Build configuration for NodeBase. Args: catalog_directory: Directory containing node_list.json and node_info.json
config/config.py:274
↓ 4 callersFunctiondetect_model_format
Auto-detect model format from model name. Args: model_name: Model name (e.g., "workflow-generator-q8_0.gguf" or "Qwen2.5-7B-Instruct
utils/model_manager.py:439
↓ 4 callersFunctionregister_llm_folder_type
Register "llm" folder type in ComfyUI's folder_paths. This allows us to use folder_paths.get_filename_list("llm") and folder_paths.get_full_p
utils/model_manager.py:272
↓ 4 callersFunctionresolve_config_path
Resolve a configuration path relative to the custom node directory or ComfyUI root. Args: path: Path string (can be relative or abso
config/config.py:55
↓ 4 callersFunctionscan_directory
Recursively scan directory for .gguf files and HuggingFace model directories. Args: directory: Directory to scan
utils/model_manager.py:327
↓ 3 callersFunctionauto_detect_tokenizer_path
Automatically detect tokenizer path based on model path. For GGUF models: Tokenizer is typically in a directory with the same name as th
utils/model_manager.py:179
↓ 3 callersMethodbuild_node_validator_config
Build configuration for NodeValidator. Args: local: Whether to use local model model_format: Model format ("
config/config.py:197
↓ 3 callersMethodbuild_workflow_generator_config
Build configuration for WorkflowGenerator. Args: model_format: Model format ("gguf" or "huggingface") model_
config/config.py:116
↓ 3 callersFunctionfetch_node_input_names
Extract input names from node meta info. Args: meta_info: Node metadata dictionary containing 'inputs' key Returns: Lis
utils/process_utils.py:123
↓ 3 callersMethodfix_node_name
Fix node name using semantic search only (non-local mode). Args: desc: User description diagram: Workflow di
generators/node_validator.py:550
↓ 3 callersMethodfix_node_name_local
Fix node name using local language model. Args: desc: User description diagram: Workflow diagram
generators/node_validator.py:573
↓ 3 callersMethodgenerate
Generate workflow diagram from natural language prompt. Args: prompt: Natural language description of the desired workfl
generators/workflow_generator.py:109
↓ 3 callersFunctionget_custom_node_path
Get the path to the ComfyUI-WorkflowGenerator custom node directory. Returns: Path to custom node directory
config/config.py:39
↓ 3 callersFunctionget_llm_model_list
Get all models from ComfyUI/models/LLM/ (both .gguf files and directories). Recursively scans subdirectories for .gguf files. Returns onl
utils/model_manager.py:316
↓ 2 callersFunctioncheck_llm_lazy_status
Determine which lazy inputs need to be evaluated for LLM refinement. Handles both standard parameter names (NodeValidator) and prefixed names
utils/node_utils.py:59
↓ 2 callersMethodcleanup
Clean up model resources.
generators/workflow_generator.py:233
↓ 2 callersMethodcleanup
Clean up model resources.
generators/node_validator.py:737
↓ 2 callersFunctionextract_v1_node_info
Extract information from a V1 API node. Args: node_name: Node class name node_class: Node class object Returns:
cataloging/catalog.py:32
↓ 2 callersFunctionfetch_node_output_names
Extract output names from node meta info. Args: meta_info: Node metadata dictionary containing 'output_names' or 'outputs' key
utils/process_utils.py:146
↓ 2 callersFunctionget_device_for_model
Get device string for model loading. Args: device_preference: "auto", "cuda", or "cpu" Returns: Device string ("cuda" o
utils/model_loaders/device_utils.py:88
↓ 2 callersFunctionget_dtype_for_model
Get dtype for HuggingFace model loading. Args: dtype_preference: "auto", "fp16", "bf16", "fp32", or "fp8" device: Device str
utils/model_loaders/device_utils.py:120
↓ 2 callersFunctionget_embedding_models
Filter embedding models (SentenceTransformer/HuggingFace directories only). Excludes .gguf files as embedding models are typically HuggingFac
utils/model_manager.py:426
↓ 2 callersFunctionget_n_threads_options
Generate options for n_threads Combo input. Returns: List of strings ["All", "Auto"] + integer options up to CPU count
utils/node_utils.py:9
↓ 2 callersFunctionget_refine_agent_models
Filter models suitable for refine_agent (node validator). Includes both GGUF files and HuggingFace directories. Returns: List of
utils/model_manager.py:412
↓ 2 callersFunctionget_workflow_generator_models
Filter models suitable for workflow generator. Includes both GGUF files and HuggingFace directories. Returns: List of model name
utils/model_manager.py:398
↓ 2 callersMethodis_valid_comfy_node
Check if a node type is a valid ComfyUI node class name. This checks against ComfyUI's actual NODE_CLASS_MAPPINGS, not just the cata
generators/node_validator.py:197
↓ 2 callersFunctionload_model
Unified model loader that supports both GGUF and HuggingFace formats. Args: model_format: "gguf" or "huggingface" model_path
utils/model_loaders/device_utils.py:191
↓ 2 callersMethodnot_in_sql
Check if a node type exists in the node list. Args: node_type: Node type name to check Returns: Tru
generators/node_validator.py:185
↓ 2 callersMethodparse_diagram_to_workflow
Parse a workflow diagram into ComfyUI workflow JSON. Args: diagram: List of edges representing the workflow diagram
generators/workflow_builder.py:44
↓ 2 callersFunctionparse_n_threads
Parse n_threads Combo value to integer or None. Args: value: String from Combo input ("All", "Auto", or integer string) Returns
utils/node_utils.py:30
↓ 2 callersMethodrefine_diagram
Refine a workflow diagram by validating and correcting node names. Args: diagram: List of edges representing the workflo
generators/node_validator.py:351
↓ 2 callersFunctionsave_workflow_json
Save workflow JSON to a file with smart incrementing counter. Args: workflow_json: The workflow JSON string to save. filenam
utils/file_utils.py:6
↓ 1 callersMethodapply_layout
Calculate and apply positions to all nodes. Modifies the 'pos' attribute of nodes in-place.
utils/workflow_layout.py:31
↓ 1 callersFunctioncalculate_optimal_gpu_layers
Calculate optimal number of GPU layers based on available VRAM. Args: model_size_gb: Total model size in GB available_vram_g
utils/model_loaders/device_utils.py:20
↓ 1 callersFunctiondecode_edge
Decode an edge and create a link between source and destination nodes. Args: outputs: List of output dictionaries from source node
generators/workflow_builder.py:350
↓ 1 callersFunctiondel_digram_primitive
Remove primitive nodes from diagram. Args: digram: List of edges in the diagram, where each edge is [src_type, src_name, dst_type, d
utils/process_utils.py:35
↓ 1 callersFunctionextract_v3_node_info
Extract information from a V3 API node. Args: node_name: Node class name node_class: Node class object (io.ComfyNode) R
cataloging/catalog.py:114
↓ 1 callersMethodfetch_node_inputs
Fetch input information for a node type. Args: node_type: Node type name Returns: Tuple of (inputs
generators/workflow_builder.py:198
↓ 1 callersMethodfetch_node_outputs
Fetch output information for a node type. Args: node_type: Node type name Returns: List of output d
generators/workflow_builder.py:250
↓ 1 callersFunctionget_available_vram
Get available VRAM in GB using ComfyUI's memory management if available. Returns: Available VRAM in GB
utils/model_loaders/device_utils.py:63
↓ 1 callersFunctionget_node_candidate_inputs
Get candidate inputs that can be added dynamically. Args: input_types: Dictionary of input type definitions inputs: List of
generators/workflow_builder.py:319
↓ 1 callersMethodget_node_diagram_info
Get diagram information for a node type with enhanced metadata. Args: node_type: Node type name Returns:
generators/node_validator.py:217
↓ 1 callersFunctionget_output_info
Extract output name to index mapping from outputs list. Args: outputs: List of output dictionaries Returns: Dictionary
generators/workflow_builder.py:290
↓ 1 callersFunctionjson_format
Extract and parse JSON from encoded string. Args: encode: String containing JSON (possibly wrapped in markdown code blocks) or alrea
utils/process_utils.py:56
↓ 1 callersMethodpost_process
Post-process the model response into a valid diagram format. Args: response: Raw model response (string or list)
generators/workflow_generator.py:202
↓ 1 callersMethodprocess
Static convenience method
utils/workflow_layout.py:146
↓ 1 callersFunctionscan_nodes
Scan all available ComfyUI nodes (V1 and V3). Args: progress_callback: Optional callback function(current, total) to report progress
cataloging/catalog.py:221
↓ 1 callersFunctionupdate_node_catalog
Update the node catalog by scanning ComfyUI nodes. Args: node_list_path: Path to save node list JSON node_info_db_path: Path
cataloging/catalog.py:312
Method__del__
Cleanup method for VRAM management.
utils/model_loaders/gguf_loader.py:244
Method__del__
Cleanup method for VRAM management.
utils/model_loaders/huggingface_loader.py:233
Method__init__
Initialize layout engine. Args: nodes: List of node dictionaries links: List of link arrays [id, src_id, src
utils/workflow_layout.py:19
Method__init__
Initialize GGUF model wrapper. Args: model_path: Path to GGUF model file tokenizer_path: Path to HuggingFace
utils/model_loaders/gguf_loader.py:24
Method__init__
Initialize HuggingFace model wrapper. Args: model_path: Path to HuggingFace model directory tokenizer_path:
utils/model_loaders/huggingface_loader.py:22
Method__init__
Initialize WorkflowGenerator with model configuration. Args: cfg: Configuration object with workflow_generator settings
generators/workflow_generator.py:25
Method__init__
Initialize WorkflowBuilder. Args: node_base: NodeBase instance for node information
generators/workflow_builder.py:34
Method__init__
Initialize NodeBase with node database and optionally embedding model. Args: cfg: Configuration object with node_base se
generators/node_validator.py:44
Method__init__
Initialize NodeValidator. Args: node_base: NodeBase instance for node information cfg: Configuration object
generators/node_validator.py:266
Method__init__
Initialize ConfigBuilder. Args: base_config: Base configuration dictionary (default: DEFAULT_CONFIG)
config/config.py:103
Methodbuild_full_config
Build full configuration for all generators. Args: workflow_generator_kwargs: WorkflowGenerator configuration overrides
config/config.py:315
Methodcheck_lazy_status
Determine which lazy inputs need to be evaluated. Returns: List of input names that need to be evaluated. LL
nodes/node_validator_node.py:158
Methodcheck_lazy_status
Determine which lazy inputs need to be evaluated. Returns: List of input names that need to be evaluated. Re
nodes/pipeline_node.py:218
Functioncomfy_entrypoint
Entry point for ComfyUI to load the extension.
__init__.py:41
Methoddefine_schema
(cls)
nodes/update_catalog_node.py:33
Methoddefine_schema
(cls)
nodes/node_validator_node.py:38
Methoddefine_schema
(cls)
nodes/workflow_builder_node.py:42
Methoddefine_schema
(cls)
nodes/workflow_generator_node.py:36
Methodexecute
Execute node catalog update.
nodes/update_catalog_node.py:78
Methodexecute
Execute NodeValidator to validate and correct node names.
nodes/node_validator_node.py:211
Methodexecute
Execute complete ComfyUI-WorkflowGenerator pipeline.
nodes/pipeline_node.py:272
Methodexecute
Execute WorkflowBuilder to convert diagram to workflow. Uses internal caching to avoid rebuilding workflows when only save settings
nodes/workflow_builder_node.py:99
Methodexecute
Execute WorkflowGenerator to generate workflow diagram.
nodes/workflow_generator_node.py:135
Methodfingerprint_inputs
Fingerprint inputs to determine if node should re-execute. Returns: Hashable value that changes when node should re-exec
nodes/update_catalog_node.py:65
Methodfingerprint_inputs
Fingerprint inputs to determine if node should re-execute. Returns: Tuple of relevant inputs (no hashing needed - ComfyU
nodes/node_validator_node.py:196
Methodfingerprint_inputs
Fingerprint inputs to determine if node should re-execute. Returns: Tuple of relevant inputs (no hashing needed - ComfyU
nodes/pipeline_node.py:260
Methodfingerprint_inputs
Fingerprint inputs to determine if node should re-execute. Caching strategy: - Only includes inputs that affect the workflow
nodes/workflow_builder_node.py:77
Methodfingerprint_inputs
Fingerprint inputs to determine if node should re-execute. Returns: Tuple of relevant inputs (no hashing needed - ComfyU
nodes/workflow_generator_node.py:124
Methodgenerate
Generate text using GGUF model. Args: input_ids: Token IDs from HuggingFace tokenizer (tensor or list) max_n
utils/model_loaders/gguf_loader.py:201
Methodgenerate
Generate text using HuggingFace model. Args: input_ids: Token IDs tensor max_new_tokens: Maximum number of t
utils/model_loaders/huggingface_loader.py:182
Methodget_avg_parent_y
(nid)
utils/workflow_layout.py:107
Functionget_device_info
Get device information using ComfyUI's model management. Returns: Tuple of (device_string, cuda_available)
utils/model_manager.py:241
Methodget_node_list
Return list of ComfyUI-WorkflowGenerator node classes. Returns: List of node classes to register
__init__.py:25
Methodprogress_callback
(current, total)
nodes/update_catalog_node.py:106
Functiontest_node_validator_schema
Test that NodeValidator node has correct schema.
tests/test_nodes.py:19
Functiontest_pipeline_schema
Test that Pipeline node has correct schema.
tests/test_nodes.py:37
Functiontest_update_catalog_schema
Test that UpdateNodeCatalog node has correct schema.
tests/test_nodes.py:46
Functiontest_workflow_builder_schema
Test that WorkflowBuilder node has correct schema.
tests/test_nodes.py:28
Functiontest_workflow_generator_schema
Test that WorkflowGenerator node has correct schema.
tests/test_nodes.py:10
Methodvalidate_inputs
Validate inputs before execution. Returns: True if valid, or error message string if invalid
nodes/update_catalog_node.py:54
Methodvalidate_inputs
Validate constant inputs before execution. Note: Only constant inputs (widget values) are available here. Connected inputs (
nodes/node_validator_node.py:142
Methodvalidate_inputs
Validate constant inputs before execution. Note: Only constant inputs (widget values) are available here. Connected inputs a
nodes/pipeline_node.py:200
Methodvalidate_inputs
Validate constant inputs before execution. Note: Only constant inputs (widget values) are available here. Connected inputs (
nodes/workflow_builder_node.py:62
Methodvalidate_inputs
Validate constant inputs before execution. Note: Only constant inputs (widget values) are available here. Connected inputs a
nodes/workflow_generator_node.py:109