Skip to content

Commit 855359f

Browse files
Kosinkadinkthorsten
authored andcommitted
Mvly/node update (comfyanonymous#10042)
* updated V2V node to allow for control image input exposing steps in v2v fixing guidance_scale as input parameter TODO: allow for motion_intensity as input param. * refactor: comment out unsupported resolution and adjust default values in video nodes * set control_after_generate * adding new defaults * fixes * changed control_after_generate back to True * changed control_after_generate back to False --------- Co-authored-by: thorsten <[email protected]>
1 parent 873aba6 commit 855359f

File tree

1 file changed

+37
-23
lines changed

1 file changed

+37
-23
lines changed

comfy_api_nodes/nodes_moonvalley.py

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def parse_width_height_from_res(resolution: str):
335335
"1:1 (1152 x 1152)": {"width": 1152, "height": 1152},
336336
"4:3 (1536 x 1152)": {"width": 1536, "height": 1152},
337337
"3:4 (1152 x 1536)": {"width": 1152, "height": 1536},
338-
"21:9 (2560 x 1080)": {"width": 2560, "height": 1080},
338+
# "21:9 (2560 x 1080)": {"width": 2560, "height": 1080},
339339
}
340340
return res_map.get(resolution, {"width": 1920, "height": 1080})
341341

@@ -388,11 +388,11 @@ def define_schema(cls) -> comfy_io.Schema:
388388
"negative_prompt",
389389
multiline=True,
390390
default="<synthetic> <scene cut> gopro, bright, contrast, static, overexposed, vignette, "
391-
"artifacts, still, noise, texture, scanlines, videogame, 360 camera, VR, transition, "
392-
"flare, saturation, distorted, warped, wide angle, saturated, vibrant, glowing, "
393-
"cross dissolve, cheesy, ugly hands, mutated hands, mutant, disfigured, extra fingers, "
394-
"blown out, horrible, blurry, worst quality, bad, dissolve, melt, fade in, fade out, "
395-
"wobbly, weird, low quality, plastic, stock footage, video camera, boring",
391+
"artifacts, still, noise, texture, scanlines, videogame, 360 camera, VR, transition, "
392+
"flare, saturation, distorted, warped, wide angle, saturated, vibrant, glowing, "
393+
"cross dissolve, cheesy, ugly hands, mutated hands, mutant, disfigured, extra fingers, "
394+
"blown out, horrible, blurry, worst quality, bad, dissolve, melt, fade in, fade out, "
395+
"wobbly, weird, low quality, plastic, stock footage, video camera, boring",
396396
tooltip="Negative prompt text",
397397
),
398398
comfy_io.Combo.Input(
@@ -403,14 +403,14 @@ def define_schema(cls) -> comfy_io.Schema:
403403
"1:1 (1152 x 1152)",
404404
"4:3 (1536 x 1152)",
405405
"3:4 (1152 x 1536)",
406-
"21:9 (2560 x 1080)",
406+
# "21:9 (2560 x 1080)",
407407
],
408408
default="16:9 (1920 x 1080)",
409409
tooltip="Resolution of the output video",
410410
),
411411
comfy_io.Float.Input(
412412
"prompt_adherence",
413-
default=10.0,
413+
default=4.5,
414414
min=1.0,
415415
max=20.0,
416416
step=1.0,
@@ -424,10 +424,11 @@ def define_schema(cls) -> comfy_io.Schema:
424424
step=1,
425425
display_mode=comfy_io.NumberDisplay.number,
426426
tooltip="Random seed value",
427+
control_after_generate=True,
427428
),
428429
comfy_io.Int.Input(
429430
"steps",
430-
default=100,
431+
default=33,
431432
min=1,
432433
max=100,
433434
step=1,
@@ -468,7 +469,6 @@ async def execute(
468469
steps=steps,
469470
seed=seed,
470471
guidance_scale=prompt_adherence,
471-
num_frames=128,
472472
width=width_height["width"],
473473
height=width_height["height"],
474474
use_negative_prompts=True,
@@ -526,11 +526,11 @@ def define_schema(cls) -> comfy_io.Schema:
526526
"negative_prompt",
527527
multiline=True,
528528
default="<synthetic> <scene cut> gopro, bright, contrast, static, overexposed, vignette, "
529-
"artifacts, still, noise, texture, scanlines, videogame, 360 camera, VR, transition, "
530-
"flare, saturation, distorted, warped, wide angle, saturated, vibrant, glowing, "
531-
"cross dissolve, cheesy, ugly hands, mutated hands, mutant, disfigured, extra fingers, "
532-
"blown out, horrible, blurry, worst quality, bad, dissolve, melt, fade in, fade out, "
533-
"wobbly, weird, low quality, plastic, stock footage, video camera, boring",
529+
"artifacts, still, noise, texture, scanlines, videogame, 360 camera, VR, transition, "
530+
"flare, saturation, distorted, warped, wide angle, saturated, vibrant, glowing, "
531+
"cross dissolve, cheesy, ugly hands, mutated hands, mutant, disfigured, extra fingers, "
532+
"blown out, horrible, blurry, worst quality, bad, dissolve, melt, fade in, fade out, "
533+
"wobbly, weird, low quality, plastic, stock footage, video camera, boring",
534534
tooltip="Negative prompt text",
535535
),
536536
comfy_io.Int.Input(
@@ -546,7 +546,7 @@ def define_schema(cls) -> comfy_io.Schema:
546546
comfy_io.Video.Input(
547547
"video",
548548
tooltip="The reference video used to generate the output video. Must be at least 5 seconds long. "
549-
"Videos longer than 5s will be automatically trimmed. Only MP4 format supported.",
549+
"Videos longer than 5s will be automatically trimmed. Only MP4 format supported.",
550550
),
551551
comfy_io.Combo.Input(
552552
"control_type",
@@ -563,6 +563,15 @@ def define_schema(cls) -> comfy_io.Schema:
563563
tooltip="Only used if control_type is 'Motion Transfer'",
564564
optional=True,
565565
),
566+
comfy_io.Int.Input(
567+
"steps",
568+
default=33,
569+
min=1,
570+
max=100,
571+
step=1,
572+
display_mode=comfy_io.NumberDisplay.number,
573+
tooltip="Number of inference steps",
574+
),
566575
],
567576
outputs=[comfy_io.Video.Output()],
568577
hidden=[
@@ -582,6 +591,8 @@ async def execute(
582591
video: Optional[VideoInput] = None,
583592
control_type: str = "Motion Transfer",
584593
motion_intensity: Optional[int] = 100,
594+
steps=33,
595+
prompt_adherence=4.5,
585596
) -> comfy_io.NodeOutput:
586597
auth = {
587598
"auth_token": cls.hidden.auth_token_comfy_org,
@@ -602,6 +613,8 @@ async def execute(
602613
negative_prompt=negative_prompt,
603614
seed=seed,
604615
control_params=control_params,
616+
steps=steps,
617+
guidance_scale=prompt_adherence,
605618
)
606619

607620
control = parse_control_parameter(control_type)
@@ -653,11 +666,11 @@ def define_schema(cls) -> comfy_io.Schema:
653666
"negative_prompt",
654667
multiline=True,
655668
default="<synthetic> <scene cut> gopro, bright, contrast, static, overexposed, vignette, "
656-
"artifacts, still, noise, texture, scanlines, videogame, 360 camera, VR, transition, "
657-
"flare, saturation, distorted, warped, wide angle, saturated, vibrant, glowing, "
658-
"cross dissolve, cheesy, ugly hands, mutated hands, mutant, disfigured, extra fingers, "
659-
"blown out, horrible, blurry, worst quality, bad, dissolve, melt, fade in, fade out, "
660-
"wobbly, weird, low quality, plastic, stock footage, video camera, boring",
669+
"artifacts, still, noise, texture, scanlines, videogame, 360 camera, VR, transition, "
670+
"flare, saturation, distorted, warped, wide angle, saturated, vibrant, glowing, "
671+
"cross dissolve, cheesy, ugly hands, mutated hands, mutant, disfigured, extra fingers, "
672+
"blown out, horrible, blurry, worst quality, bad, dissolve, melt, fade in, fade out, "
673+
"wobbly, weird, low quality, plastic, stock footage, video camera, boring",
661674
tooltip="Negative prompt text",
662675
),
663676
comfy_io.Combo.Input(
@@ -675,7 +688,7 @@ def define_schema(cls) -> comfy_io.Schema:
675688
),
676689
comfy_io.Float.Input(
677690
"prompt_adherence",
678-
default=10.0,
691+
default=4.0,
679692
min=1.0,
680693
max=20.0,
681694
step=1.0,
@@ -688,11 +701,12 @@ def define_schema(cls) -> comfy_io.Schema:
688701
max=4294967295,
689702
step=1,
690703
display_mode=comfy_io.NumberDisplay.number,
704+
control_after_generate=True,
691705
tooltip="Random seed value",
692706
),
693707
comfy_io.Int.Input(
694708
"steps",
695-
default=100,
709+
default=33,
696710
min=1,
697711
max=100,
698712
step=1,

0 commit comments

Comments
 (0)