mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-10 05:22:34 +08:00
Added jsonify base64
This commit is contained in:
parent
08a991eab8
commit
9512cac9d2
5
build_docker.sh
Executable file
5
build_docker.sh
Executable file
@ -0,0 +1,5 @@
|
||||
docker build -t comfy .
|
||||
|
||||
docker tag comfy forme2/comfy
|
||||
|
||||
docker push forme2/comfy
|
||||
@ -74,10 +74,11 @@ def run_prompt(job):
|
||||
for node_id in images:
|
||||
for image_data in images[node_id]:
|
||||
image = Image.open(io.BytesIO(image_data))
|
||||
im_file = BytesIO()
|
||||
im_file = io.BytesIO()
|
||||
image.save(im_file, format="JPEG")
|
||||
im_bytes = im_file.getvalue() # im_bytes: image in binary format.
|
||||
im_b64 = base64.b64encode(im_bytes)
|
||||
im_b64 = base64.b64encode(im_bytes)
|
||||
im_b64 = str(im_b64)
|
||||
data['images'].append(im_b64)
|
||||
return data
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user