Visit ComfyUI Online for ready-to-use ComfyUI environment
Execute custom code and shell commands in ComfyUI with Terminal node for automation and control.
The Terminal node is a versatile utility within the ComfyUI framework designed to execute arbitrary code or shell commands directly from the user interface. This node is particularly useful for advanced users who need to perform custom operations or integrate external scripts and commands into their workflow. By leveraging the Terminal node, you can dynamically execute Python code or shell commands, providing a powerful tool for automation, debugging, and extending the functionality of your AI art projects. The node's primary goal is to offer flexibility and control, enabling you to perform complex tasks without leaving the ComfyUI environment.
The text
parameter is a multiline string input that allows you to specify the code or shell command you wish to execute. This parameter is highly flexible, accepting both Python code and shell commands. If the input text is enclosed in double quotes, it will be treated as a shell command and executed accordingly. Otherwise, it will be interpreted as Python code and executed within the current environment. This parameter empowers you to perform a wide range of operations, from simple print statements to complex script executions, directly from the node interface.
The image
output parameter returns a placeholder image tensor with dimensions (1, 128, 128, 4). This output is primarily a formality to comply with the node's expected return type and does not represent the actual result of the executed code or command. Instead, the true output of the Terminal node is the side effect of the executed code or command, such as printed output, file creation, or other actions performed by the script.
text
parameter contains a syntax error.© Copyright 2024 RunComfy. All Rights Reserved.