TK 批量提示词注入:
The TK Prompt Batch node is designed to facilitate the management and execution of batch tasks within the ComfyUI framework. It allows you to handle multiple tasks simultaneously by organizing them into batches, which are then processed in a sequential manner. This node is particularly beneficial for users who need to automate the execution of multiple prompts, ensuring that each task is queued and executed efficiently. The node manages the state of each task, allowing for operations such as pausing, resuming, and retrying tasks. It also provides mechanisms to handle errors and interruptions gracefully, ensuring that the batch processing can continue smoothly even in the face of unexpected issues. By using the TK Prompt Batch node, you can streamline your workflow, reduce manual intervention, and improve the overall efficiency of your task execution process.
TK 批量提示词注入 Input Parameters:
mode
The mode parameter determines the operational mode of the batch processing. It can be set to different modes such as "single" or "batch" to control how tasks are queued and executed. The choice of mode impacts the node's execution by defining whether tasks are processed one at a time or in groups. This parameter is crucial for optimizing the node's performance based on the specific requirements of your task set.
enabled
The enabled parameter is a list of boolean values that specify which tasks within the batch are active. Each boolean value corresponds to a specific task, and setting it to True means the task is enabled and will be processed, while False will skip the task. This parameter allows for fine-grained control over which tasks are executed, providing flexibility in managing batch operations.
selected
The selected parameter indicates the index of the currently selected task within the batch. This parameter is used to focus on a specific task for operations such as editing or reviewing its details. It helps in navigating through the batch and making targeted adjustments to individual tasks.
names
The names parameter is a list of strings that represent the names or identifiers of the tasks within the batch. These names are used for easy reference and identification of tasks, making it simpler to manage and organize the batch. This parameter enhances the usability of the node by providing meaningful labels for each task.
TK 批量提示词注入 Output Parameters:
summary
The summary output parameter provides a comprehensive overview of the current state of the batch. It includes details such as the number of tasks, their statuses, and any errors encountered during execution. This output is essential for monitoring the progress of the batch and making informed decisions about further actions.
batches
The batches output parameter returns a list of all the batches that have been processed or are currently being processed. Each batch in the list contains detailed information about its tasks, state, and execution history. This output is valuable for tracking the overall performance of the batch processing and reviewing past operations.
TK 批量提示词注入 Usage Tips:
- To optimize performance, configure the
modeparameter based on the complexity and size of your task set. For smaller, independent tasks, the "single" mode may be more efficient, while "batch" mode can handle larger, interdependent tasks better. - Regularly check the
summaryoutput to monitor the progress of your batch and quickly identify any issues that may require intervention. - Use the
enabledparameter to selectively activate tasks within a batch, allowing you to focus on high-priority tasks without disrupting the entire batch process.
TK 批量提示词注入 Common Errors and Solutions:
"idx {idx} 越界"
- Explanation: This error occurs when the specified index is out of bounds, meaning it does not correspond to any task within the batch.
- Solution: Ensure that the index you are using is within the valid range of tasks in the batch. Double-check the total number of tasks and adjust the index accordingly.
"该任务尚在队列/执行中,无需重试"
- Explanation: This error indicates that the task you are attempting to retry is still in the queue or currently being executed.
- Solution: Wait for the task to complete its current execution or be removed from the queue before attempting to retry it. You can monitor the task's status using the
summaryoutput.
"批次不存在"
- Explanation: This error means that the specified batch ID does not correspond to any existing batch.
- Solution: Verify that the batch ID you are using is correct and corresponds to a valid batch. Check the list of available batches using the
batchesoutput to find the correct ID.
