Swooftee commited on
Commit
c5d7790
·
verified ·
1 Parent(s): dde5209

Delete GIF INTERPOLATION WORKFLOW.json

Browse files
Files changed (1) hide show
  1. GIF INTERPOLATION WORKFLOW.json +0 -1
GIF INTERPOLATION WORKFLOW.json DELETED
@@ -1 +0,0 @@
1
- {"id":"18fe56fc-68a0-4a1f-96b5-233b9475d638","revision":0,"last_node_id":22,"last_link_id":43,"nodes":[{"id":1,"type":"FrameInterpolationModelLoader","pos":[1199.3988636363565,-141.33873106060594],"size":[320,80],"flags":{},"order":0,"mode":0,"inputs":[{"localized_name":"model_name","name":"model_name","type":"COMBO","widget":{"name":"model_name"},"link":null}],"outputs":[{"localized_name":"INTERP_MODEL","name":"INTERP_MODEL","type":"INTERP_MODEL","links":[32]}],"properties":{"Node name for S&R":"FrameInterpolationModelLoader"},"widgets_values":["rife_v4.26.safetensors"],"widgets_values_named":{"model_name":"rife_v4.26.safetensors"}},{"id":2,"type":"GIFLoadWithDelays","pos":[459.49791666666664,-49.117708333333326],"size":[330,546],"flags":{},"order":1,"mode":0,"inputs":[{"localized_name":"gif","name":"gif","type":"COMBO","widget":{"name":"gif"},"link":null},{"localized_name":"transparent_background","name":"transparent_background","type":"COMBO","widget":{"name":"transparent_background"},"link":null},{"localized_name":"fix_browser_min_delay","name":"fix_browser_min_delay","type":"BOOLEAN","widget":{"name":"fix_browser_min_delay"},"link":null},{"localized_name":"skip_first_frames","name":"skip_first_frames","type":"INT","widget":{"name":"skip_first_frames"},"link":null},{"localized_name":"select_every_nth","name":"select_every_nth","type":"INT","widget":{"name":"select_every_nth"},"link":null},{"localized_name":"frame_load_cap","name":"frame_load_cap","type":"INT","widget":{"name":"frame_load_cap"},"link":null},{"localized_name":"custom_path","name":"custom_path","shape":7,"type":"STRING","widget":{"name":"custom_path"},"link":null},{"localized_name":"folder_start_index","name":"folder_start_index","shape":7,"type":"INT","widget":{"name":"folder_start_index"},"link":null},{"localized_name":"frame_storage","name":"frame_storage","shape":7,"type":"COMBO","widget":{"name":"frame_storage"},"link":null},{"localized_name":"upload","name":"upload","type":"IMAGEUPLOAD","widget":{"name":"upload"},"link":null}],"outputs":[{"localized_name":"images","name":"images","type":"IMAGE","links":[3]},{"localized_name":"delays","name":"delays","type":"GIF_DELAYS","links":[4]},{"localized_name":"gif_info","name":"gif_info","type":"STRING","links":[17]},{"localized_name":"filename","name":"filename","type":"STRING","links":[42]}],"properties":{"Node name for S&R":"GIFLoadWithDelays"},"widgets_values":["nopic.jpg","black",true,0,1,0,"",0,"vram_float16","image"],"widgets_values_named":{"gif":"nopic.jpg","transparent_background":"black","fix_browser_min_delay":true,"skip_first_frames":0,"select_every_nth":1,"frame_load_cap":0,"custom_path":"","folder_start_index":0,"frame_storage":"vram_float16","upload":"image"}},{"id":3,"type":"GIFPlanInterpolation","pos":[810.3673295454547,200.23484848484824],"size":[338.007205581665,181.99999504089354],"flags":{},"order":5,"mode":0,"inputs":[{"localized_name":"delays","name":"delays","type":"GIF_DELAYS","link":6},{"localized_name":"target_fps","name":"target_fps","type":"FLOAT","widget":{"name":"target_fps"},"link":null},{"localized_name":"reference","name":"reference","type":"COMBO","widget":{"name":"reference"},"link":null},{"localized_name":"max_multiplier","name":"max_multiplier","type":"INT","widget":{"name":"max_multiplier"},"link":null}],"outputs":[{"localized_name":"multiplier","name":"multiplier","type":"INT","links":[29]},{"localized_name":"source_fps","name":"source_fps","type":"FLOAT","links":[]},{"localized_name":"resulting_fps","name":"resulting_fps","type":"FLOAT","links":[]}],"properties":{"Node name for S&R":"GIFPlanInterpolation"},"widgets_values":[50,"average_fps",16],"widgets_values_named":{"target_fps":50,"reference":"average_fps","max_multiplier":16}},{"id":9,"type":"GIFDeduplicate","pos":[812.525,-44.633333333333326],"size":[300,190],"flags":{},"order":3,"mode":0,"inputs":[{"localized_name":"images","name":"images","type":"IMAGE","link":3},{"localized_name":"delays","name":"delays","type":"GIF_DELAYS","link":4},{"localized_name":"similarity_threshold","name":"similarity_threshold","type":"FLOAT","widget":{"name":"similarity_threshold"},"link":null},{"localized_name":"comparison_mode","name":"comparison_mode","type":"COMBO","widget":{"name":"comparison_mode"},"link":null},{"localized_name":"compare_against","name":"compare_against","type":"COMBO","widget":{"name":"compare_against"},"link":null}],"outputs":[{"localized_name":"images","name":"images","type":"IMAGE","links":[30]},{"localized_name":"delays","name":"delays","type":"GIF_DELAYS","links":[6,31]},{"localized_name":"removed_frames","name":"removed_frames","type":"INT","links":[]},{"localized_name":"gif_info","name":"gif_info","type":"STRING","links":[20]},{"localized_name":"summary","name":"summary","type":"STRING","links":[]}],"properties":{"Node name for S&R":"GIFDeduplicate"},"widgets_values":[1.1,"strict_max_difference","group_first_frame"],"widgets_values_named":{"similarity_threshold":1.1,"comparison_mode":"strict_max_difference","compare_against":"group_first_frame"}},{"id":8,"type":"GIFSaveWithDelays","pos":[1871.6854166666678,229.42500000000015],"size":[340,742],"flags":{},"order":9,"mode":0,"inputs":[{"localized_name":"images","name":"images","type":"IMAGE","link":37},{"localized_name":"delays","name":"delays","shape":7,"type":"GIF_DELAYS","link":40},{"localized_name":"save_location","name":"save_location","type":"STRING","widget":{"name":"save_location"},"link":null},{"localized_name":"filename","name":"filename","type":"STRING","widget":{"name":"filename"},"link":42},{"localized_name":"filename_suffix","name":"filename_suffix","type":"STRING","widget":{"name":"filename_suffix"},"link":null},{"localized_name":"multip_suffix","name":"multip_suffix","type":"STRING","widget":{"name":"multip_suffix"},"link":43},{"localized_name":"output_format","name":"output_format","type":"COMBO","widget":{"name":"output_format"},"link":null},{"localized_name":"webp_lossless","name":"webp_lossless","type":"BOOLEAN","widget":{"name":"webp_lossless"},"link":null},{"localized_name":"quality","name":"quality","type":"INT","widget":{"name":"quality"},"link":null},{"localized_name":"webp_method","name":"webp_method","type":"INT","widget":{"name":"webp_method"},"link":null},{"localized_name":"fallback_fps","name":"fallback_fps","type":"FLOAT","widget":{"name":"fallback_fps"},"link":null},{"localized_name":"max_fps","name":"max_fps","type":"FLOAT","widget":{"name":"max_fps"},"link":null},{"localized_name":"backend","name":"backend","type":"COMBO","widget":{"name":"backend"},"link":null},{"localized_name":"palette_mode","name":"palette_mode","type":"COMBO","widget":{"name":"palette_mode"},"link":null},{"localized_name":"dither","name":"dither","type":"COMBO","widget":{"name":"dither"},"link":null},{"localized_name":"max_colors","name":"max_colors","type":"INT","widget":{"name":"max_colors"},"link":null},{"localized_name":"loop_count","name":"loop_count","type":"INT","widget":{"name":"loop_count"},"link":null},{"localized_name":"optimize_size","name":"optimize_size","type":"BOOLEAN","widget":{"name":"optimize_size"},"link":null},{"localized_name":"batch_size","name":"batch_size","type":"INT","widget":{"name":"batch_size"},"link":null},{"localized_name":"save_to","name":"save_to","type":"COMBO","widget":{"name":"save_to"},"link":null},{"localized_name":"animated_preview","name":"animated_preview","type":"BOOLEAN","widget":{"name":"animated_preview"},"link":null}],"outputs":[{"localized_name":"delays","name":"delays","type":"GIF_DELAYS","links":[]},{"localized_name":"gif_info","name":"gif_info","type":"STRING","links":[16]},{"localized_name":"filepath","name":"filepath","type":"STRING","links":[]}],"properties":{"Node name for S&R":"GIFSaveWithDelays"},"widgets_values":["GIFS/INTERPOLATED","webp","INTERP","webp","webp",false,90,4,10,50,"ffmpeg_palette","per_frame","sierra2_4a",256,0,true,100,"output",false],"widgets_values_named":{"save_location":"GIFS/INTERPOLATED","filename":"webp","filename_suffix":"INTERP","multip_suffix":"webp","output_format":"webp","webp_lossless":false,"quality":90,"webp_method":4,"fallback_fps":10,"max_fps":50,"backend":"ffmpeg_palette","palette_mode":"per_frame","dither":"sierra2_4a","max_colors":256,"loop_count":0,"optimize_size":true,"batch_size":100,"save_to":"output","animated_preview":false}},{"id":11,"type":"PreviewAny","pos":[463.91282291666687,-451.95633333333274],"size":[324.21995788574225,344.9099774169922],"flags":{},"order":4,"mode":0,"inputs":[{"localized_name":"source","name":"source","type":"*","link":17}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[]}],"properties":{"Node name for S&R":"PreviewAny"},"widgets_values":[],"widgets_values_named":{}},{"id":12,"type":"PreviewAny","pos":[813.3346979166668,-447.052166666666],"size":[330.34893506367996,338.7759948412577],"flags":{},"order":6,"mode":0,"inputs":[{"localized_name":"source","name":"source","type":"*","link":20}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[]}],"properties":{"Node name for S&R":"PreviewAny"},"widgets_values":[],"widgets_values_named":{}},{"id":13,"type":"PreviewAny","pos":[1577.9084668560627,-62.40945833333255],"size":[225,145.06144892374675],"flags":{},"order":8,"mode":0,"inputs":[{"localized_name":"source","name":"source","type":"*","link":39}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[]}],"properties":{"Node name for S&R":"PreviewAny"},"widgets_values":[],"widgets_values_named":{}},{"id":14,"type":"PreviewAny","pos":[1881.2169895833324,-166.28862499999997],"size":[324.21995788574225,344.9099774169922],"flags":{},"order":10,"mode":0,"inputs":[{"localized_name":"source","name":"source","type":"*","link":16}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[]}],"properties":{"Node name for S&R":"PreviewAny"},"widgets_values":[],"widgets_values_named":{}},{"id":19,"type":"GIFFusedInterpolate","pos":[1170.036999885453,11.421231382192808],"size":[362.843359375,382],"flags":{},"order":7,"mode":0,"inputs":[{"localized_name":"interp_model","name":"interp_model","type":"INTERP_MODEL","link":32},{"localized_name":"images","name":"images","type":"IMAGE","link":30},{"localized_name":"original_delays","name":"original_delays","type":"GIF_DELAYS","link":31},{"localized_name":"multiplier","name":"multiplier","type":"INT","widget":{"name":"multiplier"},"link":29},{"localized_name":"timing_mode","name":"timing_mode","type":"COMBO","widget":{"name":"timing_mode"},"link":null},{"localized_name":"deduce_from_original","name":"deduce_from_original","type":"COMBO","widget":{"name":"deduce_from_original"},"link":null},{"localized_name":"allow_longer","name":"allow_longer","type":"BOOLEAN","widget":{"name":"allow_longer"},"link":null},{"localized_name":"max_fps","name":"max_fps","type":"FLOAT","widget":{"name":"max_fps"},"link":null},{"localized_name":"interp_delay_ms","name":"interp_delay_ms","type":"INT","widget":{"name":"interp_delay_ms"},"link":null},{"localized_name":"looping","name":"looping","type":"BOOLEAN","widget":{"name":"looping"},"link":null},{"localized_name":"output_dtype","name":"output_dtype","type":"COMBO","widget":{"name":"output_dtype"},"link":null},{"localized_name":"clear_cache_every","name":"clear_cache_every","type":"INT","widget":{"name":"clear_cache_every"},"link":null},{"localized_name":"held_frame_factor","name":"held_frame_factor","type":"FLOAT","widget":{"name":"held_frame_factor"},"link":null},{"localized_name":"force_custom_multiplier","name":"force_custom_multiplier","type":"INT","widget":{"name":"force_custom_multiplier"},"link":null},{"localized_name":"output_device","name":"output_device","shape":7,"type":"COMBO","widget":{"name":"output_device"},"link":null}],"outputs":[{"localized_name":"images","name":"images","type":"IMAGE","links":[37]},{"localized_name":"delays","name":"delays","type":"GIF_DELAYS","links":[40]},{"localized_name":"multiplier","name":"multiplier","type":"STRING","links":[39,43]},{"localized_name":"gif_info","name":"gif_info","type":"STRING","links":null}],"properties":{"Node name for S&R":"GIFFusedInterpolate"},"widgets_values":[4,"keep_original_delays","deduce - not held frame",true,50,0,true,"float16",10,1.5,0,"auto"],"widgets_values_named":{"multiplier":4,"timing_mode":"keep_original_delays","deduce_from_original":"deduce - not held frame","allow_longer":true,"max_fps":50,"interp_delay_ms":0,"looping":true,"output_dtype":"float16","clear_cache_every":10,"held_frame_factor":1.5,"force_custom_multiplier":0,"output_device":"auto"}},{"id":22,"type":"Note","pos":[840.2332151371463,464.38294899739566],"size":[900,1100],"flags":{},"order":2,"mode":0,"inputs":[],"outputs":[],"properties":{},"widgets_values":["GIF DELAY TOOLS - EVERY SETTING EXPLAINED\n=========================================\n\nRECOMMENDED CHAIN (lowest RAM)\n GIF Load -> GIF Deduplicate -> GIF Delay-Aware Interpolate (fused) -> GIF Save\n (model from Frame Interpolation Model Loader; GIF Plan Interpolation can feed \"multiplier\")\nCLASSIC CHAIN (still works)\n GIF Load -> GIF Deduplicate -> GIF Batch Interpolate (frames) + GIF Loop Pair -> GIF Batch Interpolate (loop pair)\n -> GIF Delay-Aware Interpolation (+ loop_interpolated) -> GIF Save\nDelays are always in milliseconds. A GIF stores delays in 10 ms steps (centiseconds); the rounding error is\nspread over the frames so the total duration stays accurate.\n\n\n=== GIF LOAD (with delays) ===\ngif ............................ file from the ComfyUI input folder (.gif or .webp). Use \"upload\" to add one.\ncustom_path (optional) ......... empty: the gif/webp chosen in \"gif\" is loaded (the one you uploaded or picked).\n path to a FILE: that file is loaded, the dropdown is ignored.\n path to a FOLDER: FOLDER MODE. The dropdown is ignored and the .gif/.webp files of\n the folder are loaded one by one, ONE PER RUN: 1st click on Run = 1st file, 2nd click\n = 2nd file, and so on (natural order: gif2 before gif10; sub-folders are not read).\n After the last file it starts again from the first. \"Run (N)\" / batch count works\n too. The node always re-runs in folder mode, so everything after it re-runs as well.\nfolder_start_index ............. folder mode only: the file the sequence starts at (0 = first file). Change the value\n to restart the sequence from that file. It also restarts when the folder path\n changes or ComfyUI is restarted. Each Load node has its own counter.\nframe_storage (optional) .... where the loaded frames are kept. ram_float32 = ComfyUI standard (most RAM).\n ram_float16 = half the RAM, the 8-bit values stay exact. vram_float16 = the frames live\n on the GPU: almost no RAM is used, but they take as much VRAM as ram_float16 takes RAM\n for as long as ComfyUI keeps this node's result. Falls back to RAM if the VRAM is full.\n (The frames are also converted chunk by chunk now, which lowers the RAM peak while loading.)\ntransparent_background ......... colour that transparent pixels are painted on (black / white / gray / green).\n Frames are loaded as plain RGB, so transparency is lost.\nfix_browser_min_delay .......... ON: a GIF frame with a delay of 0 or 1 cs (0-10 ms) is treated as 100 ms, the way\n browsers play it (WebP: only a 0 ms delay). OFF: use the raw value.\nskip_first_frames .............. drop the first N frames. Their delay is dropped too.\nselect_every_nth ............... keep every Nth frame (1 = all). The delays of the skipped frames are ADDED to the\n kept frame, so the animation keeps its duration (it just gets choppier).\nframe_load_cap ................. maximum number of frames to keep (0 = no limit). Counted after skip / every_nth.\nOutputs: images, delays, gif_info (duration, frame count, average fps, delay list; in folder mode the first line\nis \"file 3/12: name.gif\"), filename (name of the loaded file without extension: handy for naming the saved result\nwhen you process a folder).\n\n\n=== GIF DEDUPLICATE (merge delays) ===\nMerges CONSECUTIVE identical frames into one and adds their delays together. The kept frames are untouched\noriginals and the total duration does not change. Put it right after the loader.\nsimilarity_threshold ........... 0 = only exactly identical frames (lossless). Otherwise the largest allowed\n difference, in colour levels (0-255), for two frames to count as the same.\ncomparison_mode ................ strict_max_difference: NO single pixel may differ by more than the threshold\n (never hides a small visible change). mean_difference: compares the average\n difference over the whole frame (can hide small local changes).\ncompare_against ................ previous_frame: compare with the frame just before. group_first_frame: compare\n with the first frame of the current group (stops slow drift from being merged away).\nOutputs: images, delays, removed_frames (count), gif_info, summary.\nIf nothing is removed the input batch is passed through without a copy.\n\n\n=== GIF PLAN INTERPOLATION ===\nComputes the interpolation multiplier so the result does not go above a target fps.\nmultiplier = floor(target_fps / source_fps), limited to 1..max_multiplier.\ntarget_fps ..................... the fps you do not want to exceed (default 50 = fastest speed browsers play reliably).\nreference ...................... which speed of the source decides source_fps:\n average_fps = overall average | median_delay = the typical frame |\n minimum_fps = the SLOWEST part (longest delay) -> bigger multiplier |\n maximum_fps = the FASTEST part (shortest delay) -> smaller multiplier.\nmax_multiplier ................. upper limit (default 16).\nOutputs: multiplier, source_fps, resulting_fps (= source_fps x multiplier).\n\n\n=== GIF DELAY-AWARE INTERPOLATE (fused, lowest RAM) ===\nDoes RIFE/FILM interpolation AND the timing in one step. It plans the final timeline first and only creates the\nframes that really end up in the GIF, so RAM depends on the FINAL frame count, not on originals x multiplier.\nThe seamless-loop transition (last -> first frame) is computed here too: no GIF Loop Pair needed.\nInputs: interp_model, images (the original frames), original_delays.\nmultiplier ..................... frames per original frame (x2, x4...). Can be wired from GIF Plan Interpolation.\n A high value costs time only for frames that are kept.\ntiming_mode .................... see TIMING MODES below.\ndeduce_from_original ........... see DEDUCE below.\nallow_longer ................... see ALLOW_LONGER below.\nmax_fps ........................ speed limit. The smallest delay allowed is ceil(100 / max_fps) cs: 50 fps = 20 ms.\ninterp_delay_ms ................ delay given to new frames (0 = the smallest allowed by max_fps). Used by\n keep_original_delays (new frames) and uniform_delays (all frames, when allow_longer\n is ON). Ignored by smart_delays.\nlooping ........................ ON: insert interpolated frames between the LAST and the FIRST frame so the loop is\n seamless. OFF: no transition (for gifs that do not loop).\noutput_dtype ................... float16 (default) uses half the RAM of float32. No visible difference for GIF/WebP.\nclear_cache_every .............. free GPU caches every N frame pairs (0 = never). Lower = less VRAM, slightly slower.\nheld_frame_factor .............. slider 1.1 - 10 (default 2.0). A frame is \"held\" when its delay is at least this many\n times the AVERAGE delay of the gif (2.0 = twice the average). It decides which frames\n count as held for \"deduce - not held frame\" AND for the hold cap of smart_delays.\n Lower = more frames count as held. Example: average 200 ms -> 2.0 means 400 ms or more,\n 1.5 means 300 ms or more, 4.0 means 800 ms or more.\nforce_custom_multiplier ........ slider 0 - 16 (the last of the main settings). 0 = off (the multiplier input is\n used). 1 = FORCE x1: NO interpolation at all (the model is not even loaded). The original\n frames are kept and only the timing settings (timing_mode, max_fps, interp_delay_ms...)\n are applied: use it to just change the speed or convert to WebP/GIF.\n 2 - 16 = FORCE that multiplier and ignore the multiplier input (for example the\n one coming from GIF Plan Interpolation). Every other setting is respected, except\n allow_longer: with it OFF, new frames that do not fit would be dropped, so the forced\n multiplier could not be honoured - it is switched ON while forcing x2 or more (the\n console prints a line when this happens). uniform_delays is not affected (it shortens\n the delay instead of dropping frames), and neither is x1 (there are no new frames).\n Things that cannot be avoided are still clamped: the delay of a frame never goes below\n the minimum of max_fps, so the gif can end up longer.\n NOTE: older workflows saved with the old \"1 = off\" value now force x1: set it to 0.\noutput_device (optional) .... where the OUTPUT batch lives (it is the big one). auto (default) = in VRAM when it fits\n with head-room, otherwise in RAM (the model is loaded first, so the free VRAM is known).\n ram = always RAM. vram = always the GPU (falls back to RAM if it does not fit). It stays\n in VRAM for as long as ComfyUI keeps the result: choose ram if later nodes run out of VRAM.\n With a forced x1 nothing is interpolated and the copy stays in RAM.\nOutputs: images, delays, multiplier (text), gif_info. Wire BOTH images and delays into GIF Save.\n\n\n=== TIMING MODES (timing_mode) ===\nkeep_original_delays\n Original frames keep their own delays (minus time given to new frames when deduce is on).\n Every new frame gets interp_delay_ms (20 ms at 50 fps).\nuniform_delays\n EVERY frame, old and new, gets the same delay -> constant speed. With allow_longer ON that delay is\n interp_delay_ms. With allow_longer OFF it is chosen so the GIF keeps its original duration. The deduce setting\n is ignored, except for the loop transition (with a deduce option it shares the original duration, with\n \"don't deduce\" it is added on top).\nsmart_delays\n New frames glide at the pace of the original frame they follow: k new frames share that frame's delay d, each\n getting d / (k + 1) (never less than the minimum delay). A frame whose delay is above held_frame_factor x the\n average (2x by default) is a \"hold\": its new frames glide at the capped pace held_frame_factor x average / (k + 1),\n so a long pause does not become a slow transition. interp_delay_ms is ignored.\n\n\n=== DEDUCE (deduce_from_original) ===\ndeduce\n The time of the new frames is taken OUT of the original frame's delay (the original frame gets shorter, never\n below the minimum delay). Example: 100 ms frame + 3 new frames of 20 ms -> original 40 ms, total still 100 ms.\ndeduce - not held frame\n Same as \"deduce\", EXCEPT for held frames: frames whose delay is held_frame_factor x the average delay or MORE\n (2x by default, adjustable with the held_frame_factor slider). A held frame keeps\n its full delay, but it is still interpolated as usual: all its new frames are kept and added ON TOP, so the GIF\n gets longer by the time of those frames. (allow_longer does not apply to held frames.)\n Example: delays 100, 100, 100, 500 (average 200, so 500 is held), x4, keep_original_delays:\n normal frames -> 40 + 20 + 20 + 20 (duration kept), held frame -> 500 + 20 + 20 + 20 (60 ms longer).\ndon't deduce\n Original frames always keep their full delay and the new frames are added on top: the GIF gets longer.\n (keep_original_delays + allow_longer OFF cannot add anything without changing the duration, so new frames are\n dropped there. smart_delays keeps them on top.)\nThe loop transition belongs to the LAST frame: with a deduce option its time comes out of the last frame's delay\n(unless the last frame is held); with \"don't deduce\" it is added on top.\n\n\n=== ALLOW_LONGER ===\nON - every new frame is kept, the GIF may get longer than the original.\nOFF - each frame keeps its original duration: only as many new frames as fit are kept, evenly spread.\nOnly relevant when a deduce option is used (held frames of \"deduce - not held frame\" are always kept in full).\n\n\n=== GIF LOOP PAIR / GIF BATCH INTERPOLATE / GIF DELAY-AWARE INTERPOLATION (classic chain) ===\nGIF Loop Pair: outputs the batch [last frame, first frame]. Interpolate it with the same multiplier as the frames.\nGIF Batch Interpolate (low-memory):\n multiplier ................... frames per original (minimum 2). Must be the SAME for frames and loop pair.\n batch_size ................... frame pairs processed before GPU caches are cleared. Lower = less VRAM.\n force_custom_multiplier ...... slider 0 - 16 (last setting). 0 = off. 1 = force x1 (no interpolation, the frames are\n returned untouched). 2 - 16 = use this multiplier instead of the\n multiplier input. Use the SAME value on the node that interpolates the [last, first]\n pair, and keep allow_longer ON in GIF Delay-Aware Interpolation, otherwise it drops\n the frames that do not fit.\n output_device (optional) ..... auto / ram / vram, same meaning as in the fused node (where the output batch lives).\n Creates EVERY in-between frame in float16 RAM; the fused node needs far less RAM.\nGIF Delay-Aware Interpolation: same timing settings as the fused node (timing_mode, deduce_from_original,\n allow_longer, max_fps, interp_delay_ms, looping, held_frame_factor). Extra inputs: interpolated_images must contain\n (N-1) x multiplier + 1 frames; loop_interpolated (optional) is the interpolated loop pair.\n\n\n=== GIF SAVE (delays + FFmpeg palette) ===\nimages / delays ................ wire the delays output of the interpolation node. Without delays, fallback_fps is used.\nsave_location .................. folder the file is saved into; absolute, or relative to the output/temp folder (empty = that folder).\nfilename ....................... name without extension; connect the load node's 'filename' output to keep the original name.\nfilename_suffix ................ added with an underscore: 1234 + interpolated -> 1234_interpolated.gif.\nmultip_suffix .................. second suffix after filename_suffix; connect the interpolation node's 'multiplier' output: 1234 + interp + x4 -> 1234_interp_x4.gif.\noutput_format .................. gif (256 colours per frame) or webp (full colour, optional lossless, ms delays).\nmax_fps ........................ hard speed cap (50 fps = 2 cs minimum delay). Shorter delays are raised to it.\nfallback_fps ................... speed used only when no delays are connected.\nquality ........................ 0 - 100, default 90, works for GIF AND WebP.\n GIF: 90-100 = the full palette (max_colors). Below 90 the palette shrinks linearly:\n about 200 colours at 70, 129 at 45, 58 at 20, 2 at 0 -> smaller files, more banding\n (a \"quality\" setting does not exist in the GIF format, so it controls the palette size;\n the dither setting is left as you chose it). Works with both backends.\n WebP: lossy = image quality, lossless = compression effort (higher = smaller, slower).\nloop_count ..................... 0 = loop forever, -1 = play once, N = repeat N times.\nsave_to ........................ output (kept) or temp (deleted by ComfyUI later).\nbatch_size ..................... frames encoded per chunk (GIF via Pillow, WebP). Lower = less RAM, slightly slower.\nanimated_preview ............... mark the preview as animated (desktop frontend). Turn off if your frontend shows none.\nGIF only:\n backend ...................... ffmpeg_palette (best quality, needs ffmpeg) or pillow_fallback (no ffmpeg needed).\n palette_mode ................. per_frame: every frame gets its own 256-colour palette (best). global: one palette\n for the whole gif (smaller file, more banding).\n dither ....................... none (banding) | floyd_steinberg, sierra2, sierra2_4a (error diffusion, sierra2_4a is\n the gentlest and leaves frames that already have <=256 colours unchanged) |\n bayer (ordered pattern) | heckbert (simple, no real dither).\n max_colors ................... 2-256 colours per palette at best quality (the quality slider can lower it).\n optimize_size ................ smaller file via transparency/rectangle tricks, but 255 colours and not lossless.\nWebP only:\n webp_lossless ................ ON = exact pixels (big files), OFF = lossy (much smaller).\n webp_method .................. encoder effort 0 (fast) - 6 (slowest, smallest).\nOutputs: delays, gif_info, filepath.\n\n\n=== HELPERS ===\nGIF Delays Info ................ delays -> avg_fps, min_ms, max_ms.\nGIF Delays From FPS ............ images + fps -> constant delays (for a video / image batch), plus avg_fps."],"widgets_values_named":{"text":"GIF DELAY TOOLS - EVERY SETTING EXPLAINED\n=========================================\n\nRECOMMENDED CHAIN (lowest RAM)\n GIF Load -> GIF Deduplicate -> GIF Delay-Aware Interpolate (fused) -> GIF Save\n (model from Frame Interpolation Model Loader; GIF Plan Interpolation can feed \"multiplier\")\nCLASSIC CHAIN (still works)\n GIF Load -> GIF Deduplicate -> GIF Batch Interpolate (frames) + GIF Loop Pair -> GIF Batch Interpolate (loop pair)\n -> GIF Delay-Aware Interpolation (+ loop_interpolated) -> GIF Save\nDelays are always in milliseconds. A GIF stores delays in 10 ms steps (centiseconds); the rounding error is\nspread over the frames so the total duration stays accurate.\n\n\n=== GIF LOAD (with delays) ===\ngif ............................ file from the ComfyUI input folder (.gif or .webp). Use \"upload\" to add one.\ncustom_path (optional) ......... empty: the gif/webp chosen in \"gif\" is loaded (the one you uploaded or picked).\n path to a FILE: that file is loaded, the dropdown is ignored.\n path to a FOLDER: FOLDER MODE. The dropdown is ignored and the .gif/.webp files of\n the folder are loaded one by one, ONE PER RUN: 1st click on Run = 1st file, 2nd click\n = 2nd file, and so on (natural order: gif2 before gif10; sub-folders are not read).\n After the last file it starts again from the first. \"Run (N)\" / batch count works\n too. The node always re-runs in folder mode, so everything after it re-runs as well.\nfolder_start_index ............. folder mode only: the file the sequence starts at (0 = first file). Change the value\n to restart the sequence from that file. It also restarts when the folder path\n changes or ComfyUI is restarted. Each Load node has its own counter.\nframe_storage (optional) .... where the loaded frames are kept. ram_float32 = ComfyUI standard (most RAM).\n ram_float16 = half the RAM, the 8-bit values stay exact. vram_float16 = the frames live\n on the GPU: almost no RAM is used, but they take as much VRAM as ram_float16 takes RAM\n for as long as ComfyUI keeps this node's result. Falls back to RAM if the VRAM is full.\n (The frames are also converted chunk by chunk now, which lowers the RAM peak while loading.)\ntransparent_background ......... colour that transparent pixels are painted on (black / white / gray / green).\n Frames are loaded as plain RGB, so transparency is lost.\nfix_browser_min_delay .......... ON: a GIF frame with a delay of 0 or 1 cs (0-10 ms) is treated as 100 ms, the way\n browsers play it (WebP: only a 0 ms delay). OFF: use the raw value.\nskip_first_frames .............. drop the first N frames. Their delay is dropped too.\nselect_every_nth ............... keep every Nth frame (1 = all). The delays of the skipped frames are ADDED to the\n kept frame, so the animation keeps its duration (it just gets choppier).\nframe_load_cap ................. maximum number of frames to keep (0 = no limit). Counted after skip / every_nth.\nOutputs: images, delays, gif_info (duration, frame count, average fps, delay list; in folder mode the first line\nis \"file 3/12: name.gif\"), filename (name of the loaded file without extension: handy for naming the saved result\nwhen you process a folder).\n\n\n=== GIF DEDUPLICATE (merge delays) ===\nMerges CONSECUTIVE identical frames into one and adds their delays together. The kept frames are untouched\noriginals and the total duration does not change. Put it right after the loader.\nsimilarity_threshold ........... 0 = only exactly identical frames (lossless). Otherwise the largest allowed\n difference, in colour levels (0-255), for two frames to count as the same.\ncomparison_mode ................ strict_max_difference: NO single pixel may differ by more than the threshold\n (never hides a small visible change). mean_difference: compares the average\n difference over the whole frame (can hide small local changes).\ncompare_against ................ previous_frame: compare with the frame just before. group_first_frame: compare\n with the first frame of the current group (stops slow drift from being merged away).\nOutputs: images, delays, removed_frames (count), gif_info, summary.\nIf nothing is removed the input batch is passed through without a copy.\n\n\n=== GIF PLAN INTERPOLATION ===\nComputes the interpolation multiplier so the result does not go above a target fps.\nmultiplier = floor(target_fps / source_fps), limited to 1..max_multiplier.\ntarget_fps ..................... the fps you do not want to exceed (default 50 = fastest speed browsers play reliably).\nreference ...................... which speed of the source decides source_fps:\n average_fps = overall average | median_delay = the typical frame |\n minimum_fps = the SLOWEST part (longest delay) -> bigger multiplier |\n maximum_fps = the FASTEST part (shortest delay) -> smaller multiplier.\nmax_multiplier ................. upper limit (default 16).\nOutputs: multiplier, source_fps, resulting_fps (= source_fps x multiplier).\n\n\n=== GIF DELAY-AWARE INTERPOLATE (fused, lowest RAM) ===\nDoes RIFE/FILM interpolation AND the timing in one step. It plans the final timeline first and only creates the\nframes that really end up in the GIF, so RAM depends on the FINAL frame count, not on originals x multiplier.\nThe seamless-loop transition (last -> first frame) is computed here too: no GIF Loop Pair needed.\nInputs: interp_model, images (the original frames), original_delays.\nmultiplier ..................... frames per original frame (x2, x4...). Can be wired from GIF Plan Interpolation.\n A high value costs time only for frames that are kept.\ntiming_mode .................... see TIMING MODES below.\ndeduce_from_original ........... see DEDUCE below.\nallow_longer ................... see ALLOW_LONGER below.\nmax_fps ........................ speed limit. The smallest delay allowed is ceil(100 / max_fps) cs: 50 fps = 20 ms.\ninterp_delay_ms ................ delay given to new frames (0 = the smallest allowed by max_fps). Used by\n keep_original_delays (new frames) and uniform_delays (all frames, when allow_longer\n is ON). Ignored by smart_delays.\nlooping ........................ ON: insert interpolated frames between the LAST and the FIRST frame so the loop is\n seamless. OFF: no transition (for gifs that do not loop).\noutput_dtype ................... float16 (default) uses half the RAM of float32. No visible difference for GIF/WebP.\nclear_cache_every .............. free GPU caches every N frame pairs (0 = never). Lower = less VRAM, slightly slower.\nheld_frame_factor .............. slider 1.1 - 10 (default 2.0). A frame is \"held\" when its delay is at least this many\n times the AVERAGE delay of the gif (2.0 = twice the average). It decides which frames\n count as held for \"deduce - not held frame\" AND for the hold cap of smart_delays.\n Lower = more frames count as held. Example: average 200 ms -> 2.0 means 400 ms or more,\n 1.5 means 300 ms or more, 4.0 means 800 ms or more.\nforce_custom_multiplier ........ slider 0 - 16 (the last of the main settings). 0 = off (the multiplier input is\n used). 1 = FORCE x1: NO interpolation at all (the model is not even loaded). The original\n frames are kept and only the timing settings (timing_mode, max_fps, interp_delay_ms...)\n are applied: use it to just change the speed or convert to WebP/GIF.\n 2 - 16 = FORCE that multiplier and ignore the multiplier input (for example the\n one coming from GIF Plan Interpolation). Every other setting is respected, except\n allow_longer: with it OFF, new frames that do not fit would be dropped, so the forced\n multiplier could not be honoured - it is switched ON while forcing x2 or more (the\n console prints a line when this happens). uniform_delays is not affected (it shortens\n the delay instead of dropping frames), and neither is x1 (there are no new frames).\n Things that cannot be avoided are still clamped: the delay of a frame never goes below\n the minimum of max_fps, so the gif can end up longer.\n NOTE: older workflows saved with the old \"1 = off\" value now force x1: set it to 0.\noutput_device (optional) .... where the OUTPUT batch lives (it is the big one). auto (default) = in VRAM when it fits\n with head-room, otherwise in RAM (the model is loaded first, so the free VRAM is known).\n ram = always RAM. vram = always the GPU (falls back to RAM if it does not fit). It stays\n in VRAM for as long as ComfyUI keeps the result: choose ram if later nodes run out of VRAM.\n With a forced x1 nothing is interpolated and the copy stays in RAM.\nOutputs: images, delays, multiplier (text), gif_info. Wire BOTH images and delays into GIF Save.\n\n\n=== TIMING MODES (timing_mode) ===\nkeep_original_delays\n Original frames keep their own delays (minus time given to new frames when deduce is on).\n Every new frame gets interp_delay_ms (20 ms at 50 fps).\nuniform_delays\n EVERY frame, old and new, gets the same delay -> constant speed. With allow_longer ON that delay is\n interp_delay_ms. With allow_longer OFF it is chosen so the GIF keeps its original duration. The deduce setting\n is ignored, except for the loop transition (with a deduce option it shares the original duration, with\n \"don't deduce\" it is added on top).\nsmart_delays\n New frames glide at the pace of the original frame they follow: k new frames share that frame's delay d, each\n getting d / (k + 1) (never less than the minimum delay). A frame whose delay is above held_frame_factor x the\n average (2x by default) is a \"hold\": its new frames glide at the capped pace held_frame_factor x average / (k + 1),\n so a long pause does not become a slow transition. interp_delay_ms is ignored.\n\n\n=== DEDUCE (deduce_from_original) ===\ndeduce\n The time of the new frames is taken OUT of the original frame's delay (the original frame gets shorter, never\n below the minimum delay). Example: 100 ms frame + 3 new frames of 20 ms -> original 40 ms, total still 100 ms.\ndeduce - not held frame\n Same as \"deduce\", EXCEPT for held frames: frames whose delay is held_frame_factor x the average delay or MORE\n (2x by default, adjustable with the held_frame_factor slider). A held frame keeps\n its full delay, but it is still interpolated as usual: all its new frames are kept and added ON TOP, so the GIF\n gets longer by the time of those frames. (allow_longer does not apply to held frames.)\n Example: delays 100, 100, 100, 500 (average 200, so 500 is held), x4, keep_original_delays:\n normal frames -> 40 + 20 + 20 + 20 (duration kept), held frame -> 500 + 20 + 20 + 20 (60 ms longer).\ndon't deduce\n Original frames always keep their full delay and the new frames are added on top: the GIF gets longer.\n (keep_original_delays + allow_longer OFF cannot add anything without changing the duration, so new frames are\n dropped there. smart_delays keeps them on top.)\nThe loop transition belongs to the LAST frame: with a deduce option its time comes out of the last frame's delay\n(unless the last frame is held); with \"don't deduce\" it is added on top.\n\n\n=== ALLOW_LONGER ===\nON - every new frame is kept, the GIF may get longer than the original.\nOFF - each frame keeps its original duration: only as many new frames as fit are kept, evenly spread.\nOnly relevant when a deduce option is used (held frames of \"deduce - not held frame\" are always kept in full).\n\n\n=== GIF LOOP PAIR / GIF BATCH INTERPOLATE / GIF DELAY-AWARE INTERPOLATION (classic chain) ===\nGIF Loop Pair: outputs the batch [last frame, first frame]. Interpolate it with the same multiplier as the frames.\nGIF Batch Interpolate (low-memory):\n multiplier ................... frames per original (minimum 2). Must be the SAME for frames and loop pair.\n batch_size ................... frame pairs processed before GPU caches are cleared. Lower = less VRAM.\n force_custom_multiplier ...... slider 0 - 16 (last setting). 0 = off. 1 = force x1 (no interpolation, the frames are\n returned untouched). 2 - 16 = use this multiplier instead of the\n multiplier input. Use the SAME value on the node that interpolates the [last, first]\n pair, and keep allow_longer ON in GIF Delay-Aware Interpolation, otherwise it drops\n the frames that do not fit.\n output_device (optional) ..... auto / ram / vram, same meaning as in the fused node (where the output batch lives).\n Creates EVERY in-between frame in float16 RAM; the fused node needs far less RAM.\nGIF Delay-Aware Interpolation: same timing settings as the fused node (timing_mode, deduce_from_original,\n allow_longer, max_fps, interp_delay_ms, looping, held_frame_factor). Extra inputs: interpolated_images must contain\n (N-1) x multiplier + 1 frames; loop_interpolated (optional) is the interpolated loop pair.\n\n\n=== GIF SAVE (delays + FFmpeg palette) ===\nimages / delays ................ wire the delays output of the interpolation node. Without delays, fallback_fps is used.\nsave_location .................. folder the file is saved into; absolute, or relative to the output/temp folder (empty = that folder).\nfilename ....................... name without extension; connect the load node's 'filename' output to keep the original name.\nfilename_suffix ................ added with an underscore: 1234 + interpolated -> 1234_interpolated.gif.\nmultip_suffix .................. second suffix after filename_suffix; connect the interpolation node's 'multiplier' output: 1234 + interp + x4 -> 1234_interp_x4.gif.\noutput_format .................. gif (256 colours per frame) or webp (full colour, optional lossless, ms delays).\nmax_fps ........................ hard speed cap (50 fps = 2 cs minimum delay). Shorter delays are raised to it.\nfallback_fps ................... speed used only when no delays are connected.\nquality ........................ 0 - 100, default 90, works for GIF AND WebP.\n GIF: 90-100 = the full palette (max_colors). Below 90 the palette shrinks linearly:\n about 200 colours at 70, 129 at 45, 58 at 20, 2 at 0 -> smaller files, more banding\n (a \"quality\" setting does not exist in the GIF format, so it controls the palette size;\n the dither setting is left as you chose it). Works with both backends.\n WebP: lossy = image quality, lossless = compression effort (higher = smaller, slower).\nloop_count ..................... 0 = loop forever, -1 = play once, N = repeat N times.\nsave_to ........................ output (kept) or temp (deleted by ComfyUI later).\nbatch_size ..................... frames encoded per chunk (GIF via Pillow, WebP). Lower = less RAM, slightly slower.\nanimated_preview ............... mark the preview as animated (desktop frontend). Turn off if your frontend shows none.\nGIF only:\n backend ...................... ffmpeg_palette (best quality, needs ffmpeg) or pillow_fallback (no ffmpeg needed).\n palette_mode ................. per_frame: every frame gets its own 256-colour palette (best). global: one palette\n for the whole gif (smaller file, more banding).\n dither ....................... none (banding) | floyd_steinberg, sierra2, sierra2_4a (error diffusion, sierra2_4a is\n the gentlest and leaves frames that already have <=256 colours unchanged) |\n bayer (ordered pattern) | heckbert (simple, no real dither).\n max_colors ................... 2-256 colours per palette at best quality (the quality slider can lower it).\n optimize_size ................ smaller file via transparency/rectangle tricks, but 255 colours and not lossless.\nWebP only:\n webp_lossless ................ ON = exact pixels (big files), OFF = lossy (much smaller).\n webp_method .................. encoder effort 0 (fast) - 6 (slowest, smallest).\nOutputs: delays, gif_info, filepath.\n\n\n=== HELPERS ===\nGIF Delays Info ................ delays -> avg_fps, min_ms, max_ms.\nGIF Delays From FPS ............ images + fps -> constant delays (for a video / image batch), plus avg_fps."},"color":"#232","bgcolor":"#353"}],"links":[[3,2,0,9,0,"IMAGE"],[4,2,1,9,1,"GIF_DELAYS"],[6,9,1,3,0,"GIF_DELAYS"],[16,8,1,14,0,"STRING"],[17,2,2,11,0,"STRING"],[20,9,3,12,0,"STRING"],[29,3,0,19,3,"INT"],[30,9,0,19,1,"IMAGE"],[31,9,1,19,2,"GIF_DELAYS"],[32,1,0,19,0,"INTERP_MODEL"],[39,19,2,13,0,"STRING"],[37,19,0,8,0,"IMAGE"],[40,19,1,8,1,"GIF_DELAYS"],[42,2,3,8,3,"STRING"],[43,19,2,8,5,"STRING"]],"groups":[],"config":{},"extra":{"ds":{"scale":0.9869158878504688,"offset":[-278.88851816744955,460.72121766926995]}},"version":0.4}