-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly handle format widget conversion
Format widgets don't exist in the node def. This makes converting them into an input difficult. AddInput is now wrapped on nodes that include format widgets (only Video Combine) to intercept and add the proper configuration to the input on conversion. Separately, when workflow data is loaded that includes a converted format widget, that config data is properly applied to the already existent input. Code to forcibly convert input types which do not match has been removed. This code was a best effort attempt to ease over the transition from VHS_AUDIO to AUDIO, but did not function as well as hoped and now causes more issues than it solves. Particular by clobbering a converted input type to wildcard when connected to a primitive. Resolves #326
- Loading branch information
1 parent
8222985
commit 05f085e
Showing
2 changed files
with
275 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,253 @@ | ||
{ | ||
"last_node_id": 19, | ||
"last_link_id": 20, | ||
"nodes": [ | ||
{ | ||
"id": 18, | ||
"type": "PrimitiveNode", | ||
"pos": [ | ||
318, | ||
618 | ||
], | ||
"size": [ | ||
210, | ||
82 | ||
], | ||
"flags": {}, | ||
"order": 0, | ||
"mode": 0, | ||
"inputs": [], | ||
"outputs": [ | ||
{ | ||
"name": "INT", | ||
"type": "INT", | ||
"links": [ | ||
18 | ||
], | ||
"widget": { | ||
"name": "crf" | ||
} | ||
} | ||
], | ||
"properties": { | ||
"Run widget replace on values": false | ||
}, | ||
"widgets_values": [ | ||
60, | ||
"fixed" | ||
] | ||
}, | ||
{ | ||
"id": 11, | ||
"type": "LoadImage", | ||
"pos": [ | ||
260.4530029296875, | ||
233.2003173828125 | ||
], | ||
"size": [ | ||
315, | ||
314 | ||
], | ||
"flags": {}, | ||
"order": 1, | ||
"mode": 0, | ||
"inputs": [], | ||
"outputs": [ | ||
{ | ||
"name": "IMAGE", | ||
"type": "IMAGE", | ||
"links": [ | ||
19 | ||
], | ||
"slot_index": 0 | ||
}, | ||
{ | ||
"name": "MASK", | ||
"type": "MASK", | ||
"links": null | ||
} | ||
], | ||
"properties": { | ||
"Node name for S&R": "LoadImage" | ||
}, | ||
"widgets_values": [ | ||
"example.png", | ||
"image" | ||
] | ||
}, | ||
{ | ||
"id": 17, | ||
"type": "VHS_VideoCombine", | ||
"pos": [ | ||
733.3749389648438, | ||
338.28924560546875 | ||
], | ||
"size": [ | ||
222.91415405273438, | ||
522.9141845703125 | ||
], | ||
"flags": {}, | ||
"order": 3, | ||
"mode": 0, | ||
"inputs": [ | ||
{ | ||
"name": "images", | ||
"type": "IMAGE", | ||
"link": 19 | ||
}, | ||
{ | ||
"name": "audio", | ||
"type": "AUDIO", | ||
"link": null, | ||
"shape": 7 | ||
}, | ||
{ | ||
"name": "meta_batch", | ||
"type": "VHS_BatchManager", | ||
"link": null, | ||
"shape": 7 | ||
}, | ||
{ | ||
"name": "vae", | ||
"type": "VAE", | ||
"link": null, | ||
"shape": 7 | ||
}, | ||
{ | ||
"name": "crf", | ||
"type": "INT", | ||
"link": 18, | ||
"widget": { | ||
"name": "crf" | ||
} | ||
}, | ||
{ | ||
"name": "pix_fmt", | ||
"type": [ | ||
"yuv420p", | ||
"yuv420p10le" | ||
], | ||
"link": 20, | ||
"widget": { | ||
"name": "pix_fmt" | ||
} | ||
} | ||
], | ||
"outputs": [ | ||
{ | ||
"name": "Filenames", | ||
"type": "VHS_FILENAMES", | ||
"links": null | ||
} | ||
], | ||
"properties": { | ||
"Node name for S&R": "VHS_VideoCombine" | ||
}, | ||
"widgets_values": { | ||
"frame_rate": 8, | ||
"loop_count": 0, | ||
"filename_prefix": "AnimateDiff", | ||
"format": "video/h264-mp4", | ||
"pix_fmt": "yuv420p10le", | ||
"crf": 60, | ||
"save_metadata": true, | ||
"pingpong": false, | ||
"save_output": false, | ||
"videopreview": { | ||
"hidden": false, | ||
"paused": false, | ||
"params": { | ||
"filename": "AnimateDiff_00001.mp4", | ||
"subfolder": "", | ||
"type": "temp", | ||
"format": "video/h264-mp4", | ||
"frame_rate": 8 | ||
}, | ||
"muted": false | ||
} | ||
} | ||
}, | ||
{ | ||
"id": 19, | ||
"type": "PrimitiveNode", | ||
"pos": [ | ||
300, | ||
760 | ||
], | ||
"size": [ | ||
290, | ||
110 | ||
], | ||
"flags": {}, | ||
"order": 2, | ||
"mode": 0, | ||
"inputs": [], | ||
"outputs": [ | ||
{ | ||
"name": "COMBO", | ||
"type": "COMBO", | ||
"links": [ | ||
20 | ||
], | ||
"widget": { | ||
"name": "pix_fmt" | ||
} | ||
} | ||
], | ||
"properties": { | ||
"Run widget replace on values": false | ||
}, | ||
"widgets_values": [ | ||
"yuv420p10le", | ||
"fixed", | ||
"" | ||
] | ||
} | ||
], | ||
"links": [ | ||
[ | ||
18, | ||
18, | ||
0, | ||
17, | ||
4, | ||
"INT" | ||
], | ||
[ | ||
19, | ||
11, | ||
0, | ||
17, | ||
0, | ||
"IMAGE" | ||
], | ||
[ | ||
20, | ||
19, | ||
0, | ||
17, | ||
5, | ||
[ | ||
"yuv420p", | ||
"yuv420p10le" | ||
] | ||
] | ||
], | ||
"groups": [], | ||
"config": {}, | ||
"extra": { | ||
"ds": { | ||
"scale": 0.8264462809917354, | ||
"offset": [ | ||
45.8650452880864, | ||
-157.46987175292935 | ||
] | ||
} | ||
}, | ||
"version": 0.4, | ||
"tests": { | ||
"17": [{"type": "video", "key": "pix_fmt", "value": "yuv420p10le"} | ||
], | ||
"length": 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters