mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-21 20:52:12 -03:00
Remove cache and output switch options from CanvasNode
Eliminated the 'cache_enabled' and 'output_switch' parameters and related logic from CanvasNode. This simplifies the node's configuration and processing flow by removing unused or redundant options.
This commit is contained in:
@@ -91,7 +91,6 @@ class CanvasNode:
|
||||
_canvas_cache = {
|
||||
'image': None,
|
||||
'mask': None,
|
||||
'cache_enabled': True,
|
||||
'data_flow_status': {},
|
||||
'persistent_cache': {},
|
||||
'last_execution_id': None
|
||||
@@ -169,8 +168,6 @@ class CanvasNode:
|
||||
return {
|
||||
"required": {
|
||||
"trigger": ("INT", {"default": 0, "min": 0, "max": 99999999, "step": 1, "hidden": True}),
|
||||
"output_switch": ("BOOLEAN", {"default": True}),
|
||||
"cache_enabled": ("BOOLEAN", {"default": True, "label": "Enable Cache"}),
|
||||
"node_id": ("STRING", {"default": "0", "hidden": True}),
|
||||
},
|
||||
"optional": {
|
||||
@@ -237,7 +234,7 @@ class CanvasNode:
|
||||
|
||||
_processing_lock = threading.Lock()
|
||||
|
||||
def process_canvas_image(self, trigger, output_switch, cache_enabled, node_id, prompt=None, unique_id=None, input_image=None,
|
||||
def process_canvas_image(self, trigger, node_id, prompt=None, unique_id=None, input_image=None,
|
||||
input_mask=None):
|
||||
|
||||
try:
|
||||
@@ -290,11 +287,6 @@ class CanvasNode:
|
||||
log_warn(f"Processed mask is still None, creating default blank mask.")
|
||||
processed_mask = torch.zeros((1, 512, 512), dtype=torch.float32)
|
||||
|
||||
|
||||
if not output_switch:
|
||||
log_debug(f"Output switch is OFF, returning empty tuple")
|
||||
return (None, None)
|
||||
|
||||
log_debug(f"About to return output - Image shape: {processed_image.shape}, Mask shape: {processed_mask.shape}")
|
||||
|
||||
self.update_persistent_cache()
|
||||
|
||||
Reference in New Issue
Block a user