Release standalone timeline editor 1.0.0

This commit is contained in:
Hopping Mad Games
2026-08-26 09:55:12 -06:00
commit 869537cefd
27 changed files with 7739 additions and 0 deletions
+86
View File
@@ -0,0 +1,86 @@
import json
from custom_nodes.ComfyUI_ETK_LTXV_Timeline_Editor import (
ETKLTXVTimelineImageEditor,
NODE_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS,
)
def test_workflow_identity_and_ports_are_stable():
assert NODE_CLASS_MAPPINGS == {
"ETKLTXVTimelineImageEditor": ETKLTXVTimelineImageEditor,
}
assert NODE_DISPLAY_NAME_MAPPINGS == {
"ETKLTXVTimelineImageEditor": "ETK LTXV Timeline Image Editor",
}
assert ETKLTXVTimelineImageEditor.CATEGORY == "ETK/Image"
assert ETKLTXVTimelineImageEditor.FUNCTION == "generate"
assert ETKLTXVTimelineImageEditor.RETURN_TYPES == (
"IMAGE",
"IMAGE",
"INT",
"INT",
"INT",
"LIST",
"LIST",
"LIST",
"LIST",
)
assert ETKLTXVTimelineImageEditor.RETURN_NAMES == (
"edited_images",
"unedited_images",
"width",
"height",
"length",
"strengths",
"frame_indexes",
"position_seconds",
"prompts",
)
def test_empty_timeline_preserves_result_shape_and_settings():
output = ETKLTXVTimelineImageEditor().generate(
width=96,
height=64,
length=17,
timeline_json="[]",
fps=24.0,
)
assert output["result"][0].shape == (1, 64, 96, 3)
assert output["result"][1].shape == (1, 64, 96, 4)
assert output["result"][2:5] == (96, 64, 17)
assert output["result"][5:] == ([], [], [], [])
settings = json.loads(output["ui"]["etk_ltxv_timeline_settings"][0])
assert settings == {
"width": 96,
"height": 64,
"length": 17,
"fps": 24.0,
"ui_instance_id": "",
}
def test_list_inputs_keep_prompt_strength_and_time_alignment():
output = ETKLTXVTimelineImageEditor().generate(
width=96,
height=64,
length=17,
timeline_json="[]",
fps=8.0,
prompts=[["first", "second"]],
strengths=[[0.25, 0.75]],
times=[[0.0, 1.0]],
)
result = output["result"]
assert result[5] == []
assert result[6] == []
assert result[7] == []
assert result[8] == []
keyframes = json.loads(output["ui"]["etk_ltxv_timeline_keyframes"][0])["keyframes"]
assert [item["positivePrompt"] for item in keyframes] == ["first", "second"]
assert [item["latentStrength"] for item in keyframes] == [0.25, 0.75]
assert [item["time"] for item in keyframes] == [0.0, 1.0]