mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-10 05:22:34 +08:00
Added comfy and test_input json
This commit is contained in:
parent
6f7e4b3136
commit
baecebcdaa
@ -75,6 +75,7 @@ def run_prompt(job):
|
|||||||
image_string = job['input']['image_string_lama']
|
image_string = job['input']['image_string_lama']
|
||||||
mask_string = job['input']['mask_string_lama']
|
mask_string = job['input']['mask_string_lama']
|
||||||
prompt_text = job["input"]["prompt"]
|
prompt_text = job["input"]["prompt"]
|
||||||
|
rainbow = job["input"]["rainbow"]
|
||||||
|
|
||||||
if image_string != 'None' and mask_string != 'None':
|
if image_string != 'None' and mask_string != 'None':
|
||||||
print("Running this part")
|
print("Running this part")
|
||||||
@ -110,20 +111,6 @@ def run_prompt(job):
|
|||||||
data['lama'] = im_b64
|
data['lama'] = im_b64
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#NOTE This is for the Rainbow Script Will be updating it later
|
|
||||||
# if image_string != 'None':
|
|
||||||
# # Decode the base64 string into bytes
|
|
||||||
# decoded_bytes = base64.b64decode(image_string)
|
|
||||||
# # Convert the bytes to an in-memory file-like object using io.BytesIO
|
|
||||||
# image_data = io.BytesIO(decoded_bytes)
|
|
||||||
# image = Image.open(image_data)
|
|
||||||
# rnbw = extract_rainbow()
|
|
||||||
# rnbw_values = rnbw.main(image)
|
|
||||||
|
|
||||||
# data['rainbow'] = rnbw_values
|
|
||||||
|
|
||||||
if prompt_text != "None":
|
if prompt_text != "None":
|
||||||
prompt = prompt_text
|
prompt = prompt_text
|
||||||
ws = websocket.WebSocket()
|
ws = websocket.WebSocket()
|
||||||
@ -134,6 +121,11 @@ def run_prompt(job):
|
|||||||
for node_id in images:
|
for node_id in images:
|
||||||
for image_data in images[node_id]:
|
for image_data in images[node_id]:
|
||||||
image = Image.open(io.BytesIO(image_data))
|
image = Image.open(io.BytesIO(image_data))
|
||||||
|
#NOTE This is for the Rainbow Script Will be updating it later
|
||||||
|
if rainbow != 'None':
|
||||||
|
rnbw = extract_rainbow()
|
||||||
|
rnbw_values = rnbw.main(image)
|
||||||
|
data['rainbow'] = rnbw_values
|
||||||
im_file = io.BytesIO()
|
im_file = io.BytesIO()
|
||||||
image.save(im_file, format="JPEG")
|
image.save(im_file, format="JPEG")
|
||||||
im_bytes = im_file.getvalue() # im_bytes: image in binary format.
|
im_bytes = im_file.getvalue() # im_bytes: image in binary format.
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user