From f1993eb2b160a03bfd2db2eeb8790df0e9e6308d Mon Sep 17 00:00:00 2001 From: zombieyang Date: Thu, 13 Feb 2025 23:55:32 +0800 Subject: [PATCH] try fix instance notfound bug --- sdppp_python/comfy/nodes.py | 5 +++-- sdppp_python/comfy/nodes_legacy.py | 11 +++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/sdppp_python/comfy/nodes.py b/sdppp_python/comfy/nodes.py index 243b9f5..168d4fd 100644 --- a/sdppp_python/comfy/nodes.py +++ b/sdppp_python/comfy/nodes.py @@ -433,8 +433,9 @@ def define_comfyui_nodes(sdpppServer): else: document = layer_or_group[0]['document'] - if document['instance_id'] not in sdpppServer.ppp_instances: - raise ValueError(f'Photoshop instance {document["instance_id"]} not found') + # dont check here, some python cannot read the data in this thread. + # if document['instance_id'] not in sdpppServer.ppp_instances: + # raise ValueError(f'Photoshop instance {document["instance_id"]} not found') res_text = [] for i, item_layer in enumerate(layer_or_group): diff --git a/sdppp_python/comfy/nodes_legacy.py b/sdppp_python/comfy/nodes_legacy.py index 01c5c64..9c34136 100644 --- a/sdppp_python/comfy/nodes_legacy.py +++ b/sdppp_python/comfy/nodes_legacy.py @@ -84,8 +84,10 @@ def define_comfyui_nodes_legacy(sdppp): sdppp.has_ps_instance(throw_error=True) linked_style, document = parse_params(unique_id, prompt, layer_or_group, document) - if document['instance_id'] not in sdppp.ppp_instances: - raise ValueError(f'Photoshop instance {document["instance_id"]} not found') + + # dont check here, some python cannot read the data in this thread. + # if document['instance_id'] not in sdppp.ppp_instances: + # raise ValueError(f'Photoshop instance {document["instance_id"]} not found') res_image = [] res_mask = [] @@ -203,8 +205,9 @@ def define_comfyui_nodes_legacy(sdppp): linked_style, document = parse_params(unique_id, prompt, layer_or_group, document) - if document['instance_id'] not in sdppp.ppp_instances: - raise ValueError(f'Photoshop instance {document["instance_id"]} not found') + # dont check here, some python cannot read the data in this thread. + # if document['instance_id'] not in sdppp.ppp_instances: + # raise ValueError(f'Photoshop instance {document["instance_id"]} not found') params = [] # iterate layer_or_group