Skip to content

Instantly share code, notes, and snippets.

IFV2V VACE File-based Task Batch Manager workflow-specific setup info

For an introduction and the list of main parameters to get you started, refer to the earlier section at: https://gist.github.com/Glidias/b15b51598ae643bab9dbc7aa12fe62ed

These doc only covers anything workflow specific beyond file/json-based stuff.

Model Sampling Shift preset settings

There is a switch to adjust between switch numbers 1-3 for shift settings (Low, Medium, High) above the Sampling workflow group . Default is 2 for Medium but you can change this default depending on the nature of items in your batch source folder. The shift will increase for resolutions moving closer to or at 720p resolution (determined based off the shorter side of the output dimensions).

IFV2V VACE File-based Task Batch Management Workflow parameters

The purpose of this ComfyUI workflow (Image/Frame(s)/Video To Video process) is to manage batch generations of multiple file items found in a folder with varied mixed image/video file formats (including PSD file format for layers to define frames) through a unified VACE workflow . ((note: this can be swapped out to other types of workflows), but VACE was used because it's most versatile to fit all use cases under the V2V/I2V/FLF2V umbrella)

Required assets:

The source frames asset

This sets up the VACE's control video. Various file formats are supported (see last section below). These files are all located in the main source folder as specified in workflow, so you can switch it to any other folder as when needed.

@Glidias
Glidias / workflow-area-downscale.json
Created July 24, 2025 08:12
ComfyUI proportionally downscale image to meet maximum area requirement and keep divisibility by 16
{
"last_node_id": 42,
"last_link_id": 56,
"nodes": [
{
"id": 25,
"type": "easy showAnything",
"pos": [
1054.7166748046875,
-30.893224716186523
@Glidias
Glidias / workflow-area-downscale.json
Last active July 24, 2025 08:11
ComfyUI set shift values by resolution of output based off shortest side
{
"last_node_id": 42,
"last_link_id": 56,
"nodes": [
{
"id": 25,
"type": "easy showAnything",
"pos": [
1054.7166748046875,
-30.893224716186523
@Glidias
Glidias / gist:4964488d24157b9046f8a3c5d301dde7
Last active June 11, 2023 09:40
Github copilot generated examples and commented fixes i had to make
// (example prompt, hardcoded array value generarted by AI successfully given starting array values of "[0, 1, 5..."
const quadTreeArrayLevelOffsets: Array<number> = [0, 1, 5, 21, 85, 341, 1365, 5461, 21845, 87381, 349525, 1398101, 5592405, 22369621, 89478485, 357913941, 1431655765, 5726623061, 22906492245, 91625968981, 366503875925, 1466015503701, 5864062014805, 23456248059221, 93824992236885, 375299968947541, 1501199875790165, 6004799503160661, 24019198012642645, 96076792050570581, 384307168202282325, 1537228672809129301, 6148914691236517205, 24595658764946068821, 98382635059784275285, 393530540239137101141, 1574122160956548404565, 6296488643826193618261, 25185954575304774473045, 100743818301219097892181, 402975273204876391568725, 1611901092819505566274901, 6447604371278022265099605, 25790417485112089060398421, 103161669940448356241593685, 412646679761793424966374741, 1650586719047173699865498965, 6602346876188694799461995861, 26409387504754779197847983445, 105637550019019116791391933781, 422550200076076467
@Glidias
Glidias / gist:802872bba5b948422d0675e3ba57e1d8
Last active March 23, 2022 10:50
Stateful state hook that may reset itself given outside conditions
/**
* @param callback Important: A *Memomized* callback reference (eg. via `useCallback()`) or a *Permanent* function
* to process/return a given lazy initialized state!
* State will re-update on next frame via useEffect if callback method supplied is different from previous case,
* but on subsequent renders only.
* @returns The state payload consisting of [state, setState]
*/
export function useStateByCallback<T>(callback: () => T) {
const payload = useState(callback);
const [, setVal] = payload;
@Glidias
Glidias / gist:34ad697d31ccbb16fe05742cedfc96a6
Last active March 23, 2022 10:51
useEffect hook that only triggers on subsequent renders when combined with useCallback
/**
* useEffect() that skips the first render execution before being mounted
* @param callback Important: A *Memomized* callback reference (eg. via `useCallback()`) or any other function
* to process/return a given lazy initialized state! eg. `usePostEffect(useCallback(.., [...]))`
* Callback will call again on next frame via useEffect() if callback method supplied is different from previous case,
* but on subsequent renders only.
*/
export function usePostEffect(callback: Function) {
const ref = useRef(false);
useEffect(() => {
@Glidias
Glidias / gist:2cbd4830566e07c7d5ba829d73d210ef
Created August 20, 2018 02:36
fiddling. Doesnt work. Just some ideas tossing about...
_callComponentMethod: function (name, dt) {
var wasLooping = this._beginLooping();
var nextN;
var lastN = null;
for (var n = this.compNodeList; n!=null; n=nextN) {
nextN = n.next;
var c = n.c;
if (c._destroyed || !c.entity.enabled || !c.enabled) {
if (lastN) {
lastN.next = nextN;
@Glidias
Glidias / skillsExpenditure
Last active May 8, 2019 03:44
SONG OF SWORDS: Character Creation Field formulas
SONG OF SWORDS: Character Creation UI Field formulas (for Beta 2.0)
/*
PSEUDO CODE LEGEND SUMMARY:
* instance field quantifier/process description
"the" - single/sole/final, etc.
"each" - for each, resolves to different results per instance
"all" - for all instances, resolves similarly across all instances
=> Direct instance implication/continuation (ie. holds internal field)
|=> per instance respective field value implication (1 to 1 relationships)