bugfix and optimize
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ def define_comfyui_nodes(sdppp):
|
||||
else:
|
||||
photoshopInstance = sdppp.get_ps_instance()
|
||||
id, bounds_id = self.LAYER_BOUNDS_NAME_TO_ID(layer, use_layer_bounds)
|
||||
is_changed, history_state_id = asyncio.run(photoshopInstance.check_layer_bounds_combo_changed(id, bounds_id))
|
||||
is_changed, history_state_id = photoshopInstance.check_layer_bounds_combo_changed(id, bounds_id)
|
||||
if is_changed and history_state_id is None:
|
||||
return np.random.rand()
|
||||
photoshopInstance.update_comfyui_last_value(id, bounds_id, history_state_id)
|
||||
|
||||
@@ -23,8 +23,8 @@ class PhotoshopInstance:
|
||||
layer_strs.insert(0, '### Use canvas ###')
|
||||
|
||||
bounds_strs = list(layer_strs)
|
||||
bounds_strs.insert(0, '### Use selection ###')
|
||||
bounds_strs.insert(0, '### Same as layer ###')
|
||||
bounds_strs.insert(1, '### Use selection ###')
|
||||
bounds_strs.insert(1, '### Same as layer ###')
|
||||
|
||||
return layer_strs, bounds_strs
|
||||
|
||||
|
||||
+6
-1
@@ -63,11 +63,16 @@ class SDPPP:
|
||||
await asyncio.sleep(0.5)
|
||||
self.loop.create_task(selfEventLoop())
|
||||
|
||||
# only emit by photoshop instance
|
||||
@sio.event
|
||||
def disconnect(sid):
|
||||
self.state[sid] = False
|
||||
self.photoshop_instances.pop(sid, None)
|
||||
if sid in self.photoshop_instances:
|
||||
self.photoshop_instances.pop(sid, None)
|
||||
elif sid in self.comfyui_instances:
|
||||
self.comfyui_instances.pop(sid, None)
|
||||
|
||||
# only emit by photoshop instance
|
||||
@sio.event
|
||||
async def sync_layers(sid, data):
|
||||
instance = self.get_ps_instance(sid)
|
||||
|
||||
Reference in New Issue
Block a user