Frame Selector & Sequence Selection Node for ComfyUI.
The Late Night Labs (LNL) Frame Selector node for ComfyUI is aimed at enhancing video interaction within the ComfyUI framework. It enables users to upload, playback, and perform basic In/Out on video files directly within the ComfyUI environment.
The project is structured into two main components: the web directory, containing front-end JavaScript and CSS files, and the modules directory, containing back-end Python scripts.
$ cd ComfyUI/custom_nodes
$ git clone https://github.com/latenightlabs/ComfyUI-LNL.git
Install dependencies if not downloaded from the Comfy Manager:
$ cd ComfyUI-LNL
$ pip install -r requirements.txt
Make sure you that you have ffmpeg defined in your path.
Options include:
This project uses parts of code and some ideas from the following repositories: ComfyUI-Custom-Scripts ComfyUI-VideoHelperSuite Make sure to check them out, they both offer awesome tool suites!
We also use icons for player controls supplied by Icons8.
This project aims to provide the users with a possibilty to create custom components (specific group versions) which can be reused throughout different projects, or used in different places within the same project. Users can also take advantage of using different versions of the same group/component in the same workflow. Going forward, we're going to be referencing these versioned groups as components.
By right-clicking on an empty canvas, you're presented with a context menu where the Add Group
option is presented. By default, ComfyUI creates an empty group called Group
when you tap that option. Due to installing this library, you'll be taken to another submenu offering options of Empty group
(the default empty group ComfyUI creates) and a Versioned group
. Selecting the Versioned group
option, you'll see all of the components listed (the latest version of each component). If you've just installed this library, you won't see any components because we haven't created any yet.
Let's create an empty ComfyUI group by right-clicking an empty canvas, selecting Add Group
-> Empty group
. You can name the group anything you like e.g. Test group
. Bear in mind that the group name isn't tied to the component name, meaning each component version can have a different group name.
Add a Load image
node (use the default example.png
image pre-installed with ComfyUI), and connect it to a Preview image
node. Make sure both are inside our group. Right-click inside our group, and select Edit Group
-> Versions
-> Save
.
Once selected, you'll be asked to enter a component name. Let's call it First component
and hit OK
.
This will create a component out of this group, and you'll see additional info in the group header appear, such as the component name and component version.
Now, once our component is created, let's clear the workflow by selecting Clear
from the ComfyUI menu. Right-click on an empty canvas again, and from Add Group
-> Versioned group
select our component.
This will add our previously saved component to the workflow. You can do it a couple of times more, e.g. twice, to add the component on different parts of the canvas.
Let's select one of our component's and shuffle the nodes around a bit, maybe even change the group size and name. We'll do it on the left topmost one for our example.
Now, once the changes have been made, right-click on the group, and select Edit Group
-> Versions
-> Save as new version
. This will create a new version of our component, version 2. The changes will also be reflected in the group's header.
Do note that, should you wish to add another component to the workflow, you'll be offered to add the component's last version (as initially mentioned). That would now be the version 2.
By now, we've already seen how to add the latest component version to our workflow. But if we want to load a specific version, we must right-click on the group and select Edit Group
-> Versions
-> Load version
and select a specific version. To make navigating different versions easier, each version is labeled with its last change date and time.
In our example, let's load v2 in our top-right component. We'll end up with two v2 First component
components and one v1 First component
component.
Provided we've made some changes to one of our components but haven't saved them (can be the latest or one of the previous versions) and we want to undo them, we can select Edit Group
-> Versions
-> Refresh
. In our example, we chose to modify the bottom-right component's node locations and the group title. Selecting Refresh
will reset the changes, or rather reload the v1 of the component.
If we've changed a component in a different part of a workflow (or even in a different workflow altogether), and wish to update a component with that same version, we can select the Refresh
option from the example above as well.
Contributions to the Load Video Node project are welcome. Please
This project is licensed under the GNU General Public License.