Wrap the new flux-3-video endpoint (t2v, i2v, v2v modes) in three generation nodes plus two workflow utilities: - BaseFlux3Video reuses BaseFlux post/poll, overrides process_result to download the signed MP4 and return ComfyUI's native VIDEO type, and returns a 1-frame black video on every failure path. Polling ceiling is 240 attempts (~20 min): a real v2v+fhd task was still generating at 11 minutes. - Flux3Keyframes combines up to 10 image sockets into the keyframes string; timing 'even' sends a plain list, 'custom' sends [seconds, image] pairs (start pinned at 0, end_time = clip length). - VideoToBase64 converts a ComfyUI VIDEO to a base64 MP4 string for v2v's start_video. Nodes register only when comfy_api is importable so the package keeps loading on older ComfyUI versions.
26 lines
618 B
Python
26 lines
618 B
Python
import importlib
|
|
import importlib.util
|
|
|
|
node_list = [
|
|
"api_node",
|
|
"finetune",
|
|
"flux_tools",
|
|
"flux3_video",
|
|
"config_node",
|
|
"utils",
|
|
]
|
|
|
|
NODE_CLASS_MAPPINGS = {}
|
|
NODE_DISPLAY_NAME_MAPPINGS = {}
|
|
|
|
for module_name in node_list:
|
|
imported_module = importlib.import_module(f".nodes.{module_name}", __name__)
|
|
|
|
NODE_CLASS_MAPPINGS = {**NODE_CLASS_MAPPINGS, **imported_module.NODE_CLASS_MAPPINGS}
|
|
NODE_DISPLAY_NAME_MAPPINGS = {**NODE_DISPLAY_NAME_MAPPINGS, **imported_module.NODE_DISPLAY_NAME_MAPPINGS}
|
|
|
|
|
|
WEB_DIRECTORY = "./web"
|
|
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]
|