ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Cannot save image by running the saved API format workflow

Open jiaxinchen666 opened this issue 1 year ago • 8 comments

Your question

Images can be saved to the output directory by running the workflow on the ComfyUI frontend. When I click 'Save (API Format)' and execute the API format, only temporary images are saved; the generated images are not saved to the output directory.

See history below, { "prompt": [ 2, "96484e2f-454d-470c-bf1c-39da757e6603", { "1": { "inputs": { "image": "/root/test/testoldimage.jpg", "upload": "image" }, "class_type": "LoadImage", "_meta": { "title": "Load Image" } }, "2": { "inputs": { "width": 1024, "height": 1024, "interpolation": "nearest", "method": "keep proportion", "condition": "always", "multiple_of": 0, "image": [ "31", 0 ] }, "class_type": "ImageResize+", "_meta": { "title": "🔧 Image Resize" } }, "3": { "inputs": { "ckpt_name": "DreamShaperXL_Turbo_v2_1.safetensors", "vae_name": "Baked VAE", "clip_skip": -1, "lora_name": "None", "lora_model_strength": 1.0, "lora_clip_strength": 1.0, "resolution": "width x height (custom)", "empty_latent_width": [ "2", 1 ], "empty_latent_height": [ "2", 2 ], "positive": [ "40", 0 ], "negative": [ "37", 0 ], "batch_size": 2, "a1111_prompt_style": False }, "class_type": "easy a1111Loader", "_meta": { "title": "EasyLoader (A1111)" } }, "4": { "inputs": { "steps": 6, "cfg": 2.0, "sampler_name": "euler", "scheduler": "sgm_uniform", "denoise": 1.0, "image_output": "Hide", "link_id": 0, "save_prefix": "ComfyUI", "seed": 2018675805561752, "pipe": [ "6", 0 ], "model": [ "13", 0 ], "positive": [ "33", 1 ], "negative": [ "33", 2 ] }, "class_type": "easy fullkSampler", "_meta": { "title": "EasyKSampler (Full)" } }, "6": { "inputs": { "pipe": [ "3", 0 ] }, "class_type": "easy pipeOut", "_meta": { "title": "Pipe Out" } }, "8": { "inputs": { "strength": 1.1500000000000001, "start_percent": 0.0, "end_percent": 1.0, "positive": [ "6", 2 ], "negative": [ "6", 3 ], "control_net": [ "16", 0 ], "image": [ "2", 0 ] }, "class_type": "ControlNetApplyAdvanced", "_meta": { "title": "Apply ControlNet (Advanced)" } }, "12": { "inputs": { "preset": "FACEID PLUS V2", "lora_strength": 0.9500000000000001, "provider": "CUDA", "model": [ "33", 0 ] }, "class_type": "IPAdapterUnifiedLoaderFaceID", "_meta": { "title": "IPAdapter Unified Loader FaceID" } }, "13": { "inputs": { "weight": 1.0, "weight_faceidv2": 1.0, "weight_type": "linear", "combine_embeds": "concat", "start_at": 0.0, "end_at": 1.0, "embeds_scaling": "V only", "model": [ "12", 0 ], "ipadapter": [ "12", 1 ], "image": [ "2", 0 ], "clip_vision": [ "22", 0 ] }, "class_type": "IPAdapterFaceID", "_meta": { "title": "IPAdapter FaceID" } }, "16": { "inputs": { "control_net_name": "CN-anytest_v4-marged.safetensors" }, "class_type": "ControlNetLoader", "_meta": { "title": "Load ControlNet Model" } }, "22": { "inputs": { "clip_name": "CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors" }, "class_type": "CLIPVisionLoader", "_meta": { "title": "Load CLIP Vision" } }, "31": { "inputs": { "facedetection": "retinaface_resnet50", "model": "GFPGANv1.4.pth", "visibility": 0.9, "codeformer_weight": 0.9, "image": [ "1", 0 ] }, "class_type": "ReActorRestoreFace", "_meta": { "title": "Restore Face 🌌 ReActor" } }, "32": { "inputs": { "value": 619795577123080, "mode": True, "action": "randomize", "last_seed": "855121295145194" }, "class_type": "easy globalSeed", "_meta": { "title": "EasyGlobalSeed" } }, "33": { "inputs": { "weight": 0.8, "start_at": 0.0, "end_at": 1.0, "instantid": [ "34", 0 ], "insightface": [ "35", 0 ], "control_net": [ "36", 0 ], "image": [ "2", 0 ], "model": [ "6", 1 ], "positive": [ "8", 0 ], "negative": [ "8", 1 ] }, "class_type": "ApplyInstantID", "_meta": { "title": "Apply InstantID" } }, "34": { "inputs": { "instantid_file": "ip-adapter_instant_id_sdxl.bin" }, "class_type": "InstantIDModelLoader", "_meta": { "title": "Load InstantID Model" } }, "35": { "inputs": { "provider": "CPU" }, "class_type": "InstantIDFaceAnalysis", "_meta": { "title": "InstantID Face Analysis" } }, "36": { "inputs": { "control_net_name": "control_instant_id_sdxl.safetensors" }, "class_type": "ControlNetLoader", "_meta": { "title": "Load ControlNet Model" } }, "37": { "inputs": { "prompt": "blurry, noise, snowflake, white dot, text, watermark, ill" }, "class_type": "CR Prompt Text", "_meta": { "title": "⚙️ CR Prompt Text" } }, "40": { "inputs": { "text_1": [ "42", 0 ], "text_2": "realistic photo, clear photo amazing textures, sharp focus, high-contrast, stunning professionalism, excellent details" }, "class_type": "ConcatText_Zho", "_meta": { "title": "✨ConcatText_Zho" } }, "41": { "inputs": { "images": [ "2", 0 ] }, "class_type": "PreviewImage", "_meta": { "title": "Preview Image" } }, "42": { "inputs": { "model": "wd-swinv2-tagger-v3", "threshold": 0.2, "character_threshold": 0.2, "replace_underscore": False, "trailing_comma": False, "exclude_tags": "greyscale, monochrome, grey_background", "tags": "1girl, solo, long_hair, looking_at_viewer, smile, upper_body, ponytail, uniform, lips, traditional_media, realistic, name_tag, employee_uniform, asian", "image": [ "1", 0 ] }, "class_type": "WD14Tagger|pysssss", "_meta": { "title": "WD14 Tagger 🐍" } }, "46": { "inputs": { "filename_prefix": "ComfyUI", "images": [ "4", 1 ] }, "class_type": "SaveImage", "_meta": { "title": "Save Image" } } }, {}, [ "32", "42", "41" ] ], "outputs": { "41": { "images": [ { "filename": "ComfyUI_temp_jvozx_00003_.png", "subfolder": "", "type": "temp" } ] }, "42": { "tags": ["1girl, long_hair, looking_at_viewer, smile, shirt, upper_body, ponytail, multiple_boys, collared_shirt,2boys, grin, english_text, dated, uniform, copyright_name, watermark, 3boys, low_ponytail, realistic, name_tag, id_card, photo_\\(object\\), real_life_insert, asian" ] } }, "status": { "status_str": "success", "completed": True, "messages": [ [ "execution_start", { "prompt_id": "96484e2f-454d-470c-bf1c-39da757e6603", "timestamp": 1728028262072 } ], [ "execution_cached", { "nodes": [ "16", "22", "34", "35", "36", "37" ], "prompt_id": "96484e2f-454d-470c-bf1c-39da757e6603", "timestamp": 1728028262099 } ], [ "execution_success", { "prompt_id": "96484e2f-454d-470c-bf1c-39da757e6603", "timestamp": 1728028265223 } ] ] }, "meta": { "41": { "node_id": "41", "display_node": "41", "parent_node": None, "real_node_id": "41" }, "42": { "node_id": "42", "display_node": "42", "parent_node": None, "real_node_id": "42" } } } { "41": { "images": [ { "filename": "ComfyUI_temp_jvozx_00003_.png", "subfolder": "", "type": "temp" } ] }, "42": { "tags": ["1girl, long_hair, looking_at_viewer, smile, shirt, upper_body, ponytail, multiple_boys, collared_shirt,2boys, grin, english_text, dated, uniform, copyright_name, watermark, 3boys, low_ponytail, realistic, name_tag, id_card, photo_\\(object\\), real_life_insert, asian" ] } }

Only tagger's output and the temp images in 'outputs'. No output images. And in output directory, there is also no images.

Logs

No response

Other

No response

jiaxinchen666 avatar Oct 04 '24 08:10 jiaxinchen666

I took a quick look at your prompt, and the flow being passed to save image and preview image is completely different. Simplify it to use the flow that goes to save image, and test it again.

ltdrdata avatar Oct 05 '24 05:10 ltdrdata

even with save images facing the same issue

hackkhai avatar Oct 10 '24 13:10 hackkhai

even with save images facing the same issue

what is your original workflow?

ltdrdata avatar Oct 10 '24 16:10 ltdrdata

pose_and_mask_gen_api.json

This is what i was using

hackkhai avatar Oct 12 '24 07:10 hackkhai

pose_and_mask_gen_api.json

This is what i was using

The workflow you initially posted and the JSON you attached are completely different workflows. It seems you are looking at a file in the wrong directory or wrong name.

ltdrdata avatar Oct 13 '24 04:10 ltdrdata

I am not the one who posted this issue, but I had the same issue too

hackkhai avatar Oct 13 '24 04:10 hackkhai

i had the issue with this specific workflow, but it works at times, and doesn't work at times, super weird

hackkhai avatar Oct 13 '24 04:10 hackkhai

This issue is being marked stale because it has not had any activity for 30 days. Reply below within 7 days if your issue still isn't solved, and it will be left open. Otherwise, the issue will be closed automatically.

github-actions[bot] avatar Nov 12 '24 11:11 github-actions[bot]