diff --git a/example_workflows/comfyui-sharp-example.json b/example_workflows/comfyui-sharp-example.json new file mode 100644 index 0000000..c488c51 --- /dev/null +++ b/example_workflows/comfyui-sharp-example.json @@ -0,0 +1,349 @@ +{ + "id": "4fbf6f31-0f7b-4465-8ec8-25df4862e076", + "revision": 0, + "last_node_id": 34, + "last_link_id": 42, + "nodes": [ + { + "id": 31, + "type": "PrimitiveNode", + "pos": [ + 4672, + -928 + ], + "size": [ + 210, + 82 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "connect to widget input", + "type": "*", + "links": [] + } + ], + "properties": { + "Run widget replace on values": false, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.5.2", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [] + }, + { + "id": 29, + "type": "ParallelSharpnessLoader", + "pos": [ + 4992, + -1024 + ], + "size": [ + 320, + 262 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "images", + "type": "IMAGE", + "links": [ + 42 + ] + }, + { + "name": "scores_info", + "type": "STRING", + "links": [] + }, + { + "name": "batch_int", + "type": "INT", + "links": null + }, + { + "name": "batch_status", + "type": "STRING", + "links": [ + 39 + ] + } + ], + "properties": { + "aux_id": "ComfyUI-Sharp-Selector.git", + "ver": "dab38a1fbf0077655fe568d500866fce6ecc857d", + "Node name for S&R": "ParallelSharpnessLoader", + "ue_properties": { + "widget_ue_connectable": {}, + "input_ue_unconnectable": {}, + "version": "7.5.2" + } + }, + "widgets_values": [ + "C:\\path\\to\\video.mp4", + 0, + 1440, + 1, + 30, + 24, + 2000 + ] + }, + { + "id": 1, + "type": "SharpFrameSelector", + "pos": [ + 4992, + -704 + ], + "size": [ + 288, + 174 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": null + }, + { + "name": "scores", + "type": "SHARPNESS_SCORES", + "link": 3 + } + ], + "outputs": [ + { + "name": "selected_images", + "type": "IMAGE", + "links": [ + 32 + ] + }, + { + "name": "count", + "type": "INT", + "links": null + } + ], + "properties": { + "aux_id": "ComfyUI-Sharp-Selector.git", + "ver": "f30f948c9fa8acf9b7fe09559f172d8a63468c8d", + "Node name for S&R": "SharpFrameSelector", + "ue_properties": { + "widget_ue_connectable": {}, + "input_ue_unconnectable": {}, + "version": "7.5.2" + } + }, + "widgets_values": [ + "best_n", + 144, + 24, + 3, + 0 + ] + }, + { + "id": 34, + "type": "Note", + "pos": [ + 4224, + -1120 + ], + "size": [ + 416, + 736 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "šŸ“Œ ComfyUI Sharpness Tools Explained\n\n1. Parallel Video Loader (The \"Loader\")\n\n Best for: Processing long videos or movie files directly from disk.\n\n How it works: It opens the video file itself and uses multi-threading (parallel CPU cores) to scan thousands of frames without loading them into memory. It only \"decodes\" the final few sharpest frames.\n\n Use Case: Extracting dataset images, finding high-quality frames from a raw movie file, or scanning 10,000 frames without crashing your RAM.\n\n Key Feature: Features a \"Batch Counter\" to automatically page through long videos (e.g., scan minute 0-1, then minute 1-2).\n\n2. Standard Sharpness Duo (The \"Filter\")\n\n Best for: Processing images already inside your workflow (e.g., after an img2img pass, or a short generated GIF).\n\n How it works:\n\n Node A (Analyzer): Assigns a score to every image in the batch.\n\n Node B (Selector): Picks the best ones based on those scores.\n\n Use Case: Filtering bad generations, picking the best frame from a small batch of AnimateDiff results, or cleaning up a sequence.\n\n Limitation: It is single-threaded and requires all images to be loaded in VRAM/RAM first (slow for long videos).\n\nšŸš€ Which one to use?\n\n Starting from a Video File? → Use Parallel Loader.\n\n Starting from a Generation/Latent? → Use Standard Duo." + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 33, + "type": "SaveImage", + "pos": [ + 5824, + -1024 + ], + "size": [ + 270, + 58 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 42 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.9.2", + "ue_properties": { + "widget_ue_connectable": {}, + "input_ue_unconnectable": {} + }, + "Node name for S&R": "SaveImage" + }, + "widgets_values": [ + "sharp/img_" + ] + }, + { + "id": 32, + "type": "easy showAnything", + "pos": [ + 5344, + -1024 + ], + "size": [ + 448, + 96 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "anything", + "shape": 7, + "type": "*", + "link": 39 + } + ], + "outputs": [ + { + "name": "output", + "type": "*", + "links": null + } + ], + "properties": { + "cnr_id": "comfyui-easy-use", + "ver": "5dfcbcf51d8a6efed947bc7bdd6797827fecab55", + "Node name for S&R": "easy showAnything", + "ue_properties": { + "widget_ue_connectable": {}, + "input_ue_unconnectable": {}, + "version": "7.5.2" + } + }, + "widgets_values": [ + "Batch 1: Skipped 3440 frames. Scanning range 3440 -> 4880." + ] + }, + { + "id": 5, + "type": "SharpnessAnalyzer", + "pos": [ + 4672, + -672 + ], + "size": [ + 185.9771484375, + 26 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": null + } + ], + "outputs": [ + { + "name": "scores", + "type": "SHARPNESS_SCORES", + "links": [ + 3, + 21 + ] + } + ], + "properties": { + "aux_id": "ComfyUI-Sharp-Selector.git", + "ver": "0df11447abb7f41bf7f12a2906aa868a5d2027b4", + "Node name for S&R": "SharpnessAnalyzer", + "ue_properties": { + "widget_ue_connectable": {}, + "input_ue_unconnectable": {}, + "version": "7.5.2" + } + }, + "widgets_values": [] + } + ], + "links": [ + [ + 3, + 5, + 0, + 1, + 1, + "SHARPNESS_SCORES" + ], + [ + 39, + 29, + 3, + 32, + 0, + "STRING" + ], + [ + 42, + 29, + 0, + 33, + 0, + "IMAGE" + ] + ], + "groups": [], + "config": {}, + "extra": { + "workflowRendererVersion": "LG", + "ue_links": [], + "links_added_by_ue": [], + "ds": { + "scale": 0.8264462809917354, + "offset": [ + -2054.6525613149634, + 1737.5186871750661 + ] + }, + "frontendVersion": "1.36.14", + "VHS_latentpreview": true, + "VHS_latentpreviewrate": 0, + "VHS_MetadataImage": true, + "VHS_KeepIntermediate": true + }, + "version": 0.4 +} \ No newline at end of file