1. add parameter time to node, so we can set the video length of output.
2. update the workflow
This commit is contained in:
@@ -51,6 +51,7 @@ class DepthFlow:
|
||||
"fps": ("INT",{"default": 24, "min": 8, "max": 60, "step": 1}),
|
||||
"width": ("INT", {"default": 512, "min": 20, "max": 9999, "step": 1}),
|
||||
"height": ("INT", {"default": 512, "min": 20, "max": 9999, "step": 1}),
|
||||
"time": ("INT", {"default": 10, "min": 2, "max": 20, "step": 1}),
|
||||
"filename_prefix": ("STRING", {"default": "depthflow"}),
|
||||
},
|
||||
}
|
||||
@@ -63,7 +64,7 @@ class DepthFlow:
|
||||
CATEGORY = "DepthFlow"
|
||||
|
||||
|
||||
def doit(self, images, fps, width, height, filename_prefix):
|
||||
def doit(self, images, fps, width, height, time, filename_prefix):
|
||||
|
||||
depthflow = DepthScene_ComfyUI(backend='headless')
|
||||
|
||||
@@ -87,7 +88,7 @@ class DepthFlow:
|
||||
file = f"{filename}_{counter:05}_.mp4"
|
||||
save_path = os.path.join(full_output_folder, file)
|
||||
|
||||
depthflow.main(output=save_path, fps=fps, width=width, height=height)
|
||||
depthflow.main(output=save_path, fps=fps, width=width, height=height, time=time)
|
||||
depthflow.window.destroy() # trick 2 to avoid vram leak
|
||||
shutil.os.remove(tmpfile_path)
|
||||
#del depthflow
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
214
|
||||
],
|
||||
"flags": {},
|
||||
"order": 5,
|
||||
"order": 3,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
@@ -119,7 +119,6 @@
|
||||
"name": "width",
|
||||
"type": "INT",
|
||||
"links": [
|
||||
18,
|
||||
27
|
||||
],
|
||||
"slot_index": 0,
|
||||
@@ -129,7 +128,6 @@
|
||||
"name": "height",
|
||||
"type": "INT",
|
||||
"links": [
|
||||
19,
|
||||
28
|
||||
],
|
||||
"slot_index": 1,
|
||||
@@ -155,62 +153,6 @@
|
||||
512
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"type": "easy showAnything",
|
||||
"pos": [
|
||||
884,
|
||||
75
|
||||
],
|
||||
"size": {
|
||||
"0": 210,
|
||||
"1": 76
|
||||
},
|
||||
"flags": {},
|
||||
"order": 2,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "anything",
|
||||
"type": "*",
|
||||
"link": 18
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "easy showAnything"
|
||||
},
|
||||
"widgets_values": [
|
||||
"1920"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
"type": "easy showAnything",
|
||||
"pos": [
|
||||
876,
|
||||
230
|
||||
],
|
||||
"size": {
|
||||
"0": 210,
|
||||
"1": 76
|
||||
},
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "anything",
|
||||
"type": "*",
|
||||
"link": 19
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "easy showAnything"
|
||||
},
|
||||
"widgets_values": [
|
||||
"1080"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 34,
|
||||
"type": "DepthFlowSimple",
|
||||
@@ -220,10 +162,10 @@
|
||||
],
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 130
|
||||
"1": 146
|
||||
},
|
||||
"flags": {},
|
||||
"order": 4,
|
||||
"order": 2,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
@@ -266,6 +208,7 @@
|
||||
30,
|
||||
20,
|
||||
20,
|
||||
8,
|
||||
"depthflow"
|
||||
]
|
||||
},
|
||||
@@ -321,7 +264,7 @@
|
||||
489.9375
|
||||
],
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"order": 4,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
@@ -373,11 +316,11 @@
|
||||
"hidden": false,
|
||||
"paused": false,
|
||||
"params": {
|
||||
"filename": "AnimateDiff_00006.mp4",
|
||||
"filename": "AnimateDiff_00001.mp4",
|
||||
"subfolder": "",
|
||||
"type": "temp",
|
||||
"format": "video/h264-mp4",
|
||||
"frame_rate": 60
|
||||
"frame_rate": 30
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -394,7 +337,7 @@
|
||||
"1": 82
|
||||
},
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"order": 5,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
@@ -413,22 +356,6 @@
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
[
|
||||
18,
|
||||
29,
|
||||
0,
|
||||
30,
|
||||
0,
|
||||
"*"
|
||||
],
|
||||
[
|
||||
19,
|
||||
29,
|
||||
1,
|
||||
31,
|
||||
0,
|
||||
"*"
|
||||
],
|
||||
[
|
||||
25,
|
||||
35,
|
||||
@@ -490,10 +417,10 @@
|
||||
"config": {},
|
||||
"extra": {
|
||||
"ds": {
|
||||
"scale": 0.5989500000000011,
|
||||
"scale": 0.37190082644628153,
|
||||
"offset": [
|
||||
-1211.0716072847422,
|
||||
861.5741398595123
|
||||
277.7662985099714,
|
||||
1396.9711434619605
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user