Files
pythongosssss-ComfyUI-Custo…/upload-image/notes.txt
T
pythongosssss 6be2520736 Update notes.txt
Added max request size note
2023-03-06 19:43:59 +00:00

35 lines
1.3 KiB
Plaintext

This will embed the selected image into the generated images which probably isnt desired
Current fix for this is to add this to execution.py:
def prune_prompt(prompt):
pruned_prompt = {}
for n in prompt:
class_type = prompt[n]['class_type']
class_def = nodes.NODE_CLASS_MAPPINGS[class_type]
valid_inputs = class_def.INPUT_TYPES()
pruned_prompt[n] = copy.deepcopy(prompt[n])
if "inputs" in pruned_prompt[n]:
for x in pruned_prompt[n]["inputs"]:
input_type = None
if ("required" in valid_inputs and x in valid_inputs["required"]):
input_type = valid_inputs["required"][x]
elif ("optional" in valid_inputs and x in valid_inputs["optional"]):
input_type = valid_inputs["optional"][x]
if input_type is not None and input_type[0] == "B64IMAGE":
pruned_prompt[n]["inputs"][x] = None
return pruned_prompt
And call that from
if h[x] == "PROMPT":
input_data_all[x] = prune_prompt(prompt)
It also requires increasing the maximum request size on the API in server.py
self.app = web.Application(client_max_size=20971520)
Or some other sensible limit