From 35273d75586eb6584d13da9f8925cee6b1ffbd85 Mon Sep 17 00:00:00 2001 From: Jo Kim <1893942+Jokimbe@users.noreply.github.com> Date: Sat, 5 Apr 2025 15:59:45 +0200 Subject: [PATCH] Removed contents array --- nodes.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/nodes.py b/nodes.py index 7987fab..17b631c 100644 --- a/nodes.py +++ b/nodes.py @@ -217,11 +217,9 @@ async def dt_sampler( img2img = None maskimg = None if image is not None: - img2img = bytes(hashlib.sha256(convert_image_for_request(image)).digest()) - contents.append(base64.b64decode(convert_image_for_request(image))) + img2img = bytes(convert_image_for_request(image)) if mask is not None: - maskimg = bytes(hashlib.sha256(convert_image_for_request(mask)).digest()) - contents.append(base64.b64decode(convert_image_for_request(mask))) + maskimg = bytes(convert_image_for_request(mask)) models_override = [{ "default_scale": 8, @@ -245,11 +243,10 @@ async def dt_sampler( if image is not None: tensor_and_weight.append( imageService_pb2.TensorAndWeight( - tensor = bytes(hashlib.sha256(convert_image_for_request(image)).digest()), + tensor = bytes(convert_image_for_request(image)), weight = control_cfg["control_weight"] ) ) - contents.append(base64.b64decode(convert_image_for_request(image))) hints = [ imageService_pb2.HintProto( @@ -271,7 +268,7 @@ async def dt_sampler( # override = override, # Override the existing metadata on various Zoo objects. user = "ComfyUI", # The name of the client. device = "LAPTOP", # The type of the device uses. - contents = contents # The image data as array of bytes. It is addressed by its sha256 content. This is modeled as content-addressable storage. + # contents = contents # The image data as array of bytes. It is addressed by its sha256 content. This is modeled as content-addressable storage. )) while True: response = await generate_stream.read()