mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-11 16:40:05 +08:00
Update websockets_api_example.py
removed the import from inside the loop to outside it to improve the code cleanliness.
This commit is contained in:
parent
369a6dd2c4
commit
9bcd048905
@ -7,6 +7,7 @@ import json
|
||||
import urllib.request
|
||||
import urllib.parse
|
||||
|
||||
|
||||
server_address = "127.0.0.1:8188"
|
||||
client_id = str(uuid.uuid4())
|
||||
|
||||
@ -153,11 +154,10 @@ ws.connect("ws://{}/ws?clientId={}".format(server_address, client_id))
|
||||
images = get_images(ws, prompt)
|
||||
|
||||
#Commented out code to display the output images:
|
||||
|
||||
# from PIL import Image
|
||||
# import io
|
||||
# for node_id in images:
|
||||
# for image_data in images[node_id]:
|
||||
# from PIL import Image
|
||||
# import io
|
||||
# image = Image.open(io.BytesIO(image_data))
|
||||
# image.show()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user