From b391506fdcdb19df4055fdf32ef5c537b8e8e4c4 Mon Sep 17 00:00:00 2001 From: CMonk Date: Tue, 23 Apr 2024 19:36:41 +0800 Subject: [PATCH] Fix a bug where images were sent to PS only when PS history has changes --- comfy/__init__.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/comfy/__init__.py b/comfy/__init__.py index b0ef555..a234d89 100644 --- a/comfy/__init__.py +++ b/comfy/__init__.py @@ -66,7 +66,6 @@ class PhotoshopInstance: self.push_data = {} self.get_img_state_id = None self.last_get_img_id = None - self.send_img_state_id = None async def poll_layers(self): await asyncio.sleep(1) @@ -139,12 +138,8 @@ class PhotoshopInstance: return self.get_img_state_id != current_id async def send_images(self, image_ids, layer_name=""): - history_state_id = await self.get_active_history_state_id() - if self.send_img_state_id == history_state_id: - return {} result = await self.wsCallsManager.call('send_images', {'image_ids': image_ids, 'layer_name': layer_name}) history_state_id = await self.get_active_history_state_id() # need to get new id after operation, it causes history change - self.send_img_state_id = history_state_id self.get_img_state_id = history_state_id # it gets into a loop if get img state is not updated return result