fix: added queue_prompt from event, now input and image will not trigger queue prompt
This commit is contained in:
parent
e73392ba8b
commit
7189f13263
@ -480,6 +480,7 @@ async def websocket_handler(request):
|
|||||||
print("Got input: ", data.get("inputs"))
|
print("Got input: ", data.get("inputs"))
|
||||||
input = data.get('inputs')
|
input = data.get('inputs')
|
||||||
streaming_prompt_metadata[sid].inputs.update(input)
|
streaming_prompt_metadata[sid].inputs.update(input)
|
||||||
|
elif event_type == 'queue_prompt':
|
||||||
clear_current_prompt(sid)
|
clear_current_prompt(sid)
|
||||||
send_prompt(sid, streaming_prompt_metadata[sid])
|
send_prompt(sid, streaming_prompt_metadata[sid])
|
||||||
else:
|
else:
|
||||||
@ -519,8 +520,8 @@ async def websocket_handler(request):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error closing previous image for input ID {input_id}: {e}")
|
print(f"Error closing previous image for input ID {input_id}: {e}")
|
||||||
streaming_prompt_metadata[sid].inputs[input_id] = image
|
streaming_prompt_metadata[sid].inputs[input_id] = image
|
||||||
clear_current_prompt(sid)
|
# clear_current_prompt(sid)
|
||||||
send_prompt(sid, streaming_prompt_metadata[sid])
|
# send_prompt(sid, streaming_prompt_metadata[sid])
|
||||||
print(f"Received {image_type} image of size {image.size} with input ID {input_id}")
|
print(f"Received {image_type} image of size {image.size} with input ID {input_id}")
|
||||||
|
|
||||||
if msg.type == aiohttp.WSMsgType.ERROR:
|
if msg.type == aiohttp.WSMsgType.ERROR:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user