Skip to content

Allow using video for ControlNet for target type image#1362

Open
jtreminio wants to merge 3 commits intomcmonkeyprojects:masterfrom
jtreminio:controlnet-video-support-2
Open

Allow using video for ControlNet for target type image#1362
jtreminio wants to merge 3 commits intomcmonkeyprojects:masterfrom
jtreminio:controlnet-video-support-2

Conversation

@jtreminio
Copy link
Copy Markdown
Contributor

Note that "Preview" might still not work here.

Hitting the button results in:

[vost#0:0/libx264 @ 0x15d05fc0] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
[vf#0:0 @ 0x15cfa340] Error sending frames to consumers: Generic error in an external library
[vf#0:0 @ 0x15cfa340] Task finished with error code: -542398533 (Generic error in an external library)
[vf#0:0 @ 0x15cfa340] Terminating thread with return code -542398533 (Generic error in an external library)
[vost#0:0/libx264 @ 0x15d05fc0] Could not open encoder before EOF
[vost#0:0/libx264 @ 0x15d05fc0] Task finished with error code: -22 (Invalid argument)
[vost#0:0/libx264 @ 0x15d05fc0] Terminating thread with return code -22 (Invalid argument)
[out#0/mp4 @ 0x15d05640] Nothing was written into output file, because at least one of its streams received no packets.

I worked around this by following your example here.

CleanShot 2026-05-01 at 18 43 43

@jtreminio
Copy link
Copy Markdown
Contributor Author

Second commit fixes issue with "Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height":

CleanShot.2026-05-01.at.19.23.33.mp4

if (g.UserInput.Get(T2IParamTypes.ControlNetPreviewOnly))
{
g.CurrentMedia = imageNodeActual.WithPath(preprocActual);
if (g.CurrentMedia.DataType == WGNodeData.DT_VIDEO)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this inside the ControlNetPreviewOnly area?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants