-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ComfyScript: Failed to load node VHS_VideoCombine
because of AttributeError: 'list' object has no attribute 'removesuffix'
#22
Comments
VideoHelperSuite does some hacks to ComfyUI. ComfyScript will now ignore any invalid ComfyScript: VHS_VideoCombine: Invalid enum value: ['video/av1-webm', [['pix_fmt', ['yuv420p10le', 'yuv420p']], ['crf', 'INT', {'default': 23, 'min': 0, 'max': 100, 'step': 1}], ['input_color_depth', ['8bit', '16bit']], ['save_metadata', 'BOOLEAN', {'default': True}]]]
ComfyScript: VHS_VideoCombine: Invalid enum value: ['video/h264-mp4', [['pix_fmt', ['yuv420p', 'yuv420p10le']], ['crf', 'INT', {'default': 19, 'min': 0, 'max': 100, 'step': 1}], ['save_metadata', 'BOOLEAN', {'default': True}]]]
ComfyScript: VHS_VideoCombine: Invalid enum value: ['video/h265-mp4', [['pix_fmt', ['yuv420p10le', 'yuv420p']], ['crf', 'INT', {'default': 22, 'min': 0, 'max': 100, 'step': 1}], ['save_metadata', 'BOOLEAN', {'default': True}]]]
ComfyScript: VHS_VideoCombine: Invalid enum value: ['video/nvenc_h264-mp4', [['pix_fmt', ['yuv420p', 'yuv420p10le']], ['bitrate', 'INT', {'default': 10, 'min': 1, 'max': 999, 'step': 1}], ['megabit', 'BOOLEAN', {'default': True}], ['save_metadata', 'BOOLEAN', {'default': True}]]]
ComfyScript: VHS_VideoCombine: Invalid enum value: ['video/nvenc_hevc-mp4', [['pix_fmt', ['yuv420p', 'yuv420p10le']], ['bitrate', 'INT', {'default': 10, 'min': 1, 'max': 999, 'step': 1}], ['megabit', 'BOOLEAN', {'default': True}], ['save_metadata', 'BOOLEAN', {'default': True}]]]
ComfyScript: VHS_VideoCombine: Invalid enum value: ['video/webm', [['crf', 'INT', {'default': 20, 'min': 0, 'max': 100, 'step': 1}], ['save_metadata', 'BOOLEAN', {'default': True}]]] If you want to use these ignore values and dynamic inputs, you can directly use string literals and keyword arguments, for example: VHSVideoCombine(image, 8, 0, 'AnimateDiff', 'video/av1-webm', False, True, None, None, pix_fmt='yuv420p10le', crf=23, input_color_depth='8bit', save_metadata=True) |
Great, thanks, I'll give it a try and report back here! |
This issue could be kept open to help other people using VideoHelperSuite. |
By the way, |
I cannot for the life of me figure out how to get output from the VHSVideoCombine node function loaded into my Python code, even as a PIL image. Is there a standard way of doing this? |
previews = [
{
"filename": file,
"subfolder": subfolder,
"type": "output" if save_output else "temp",
"format": format,
}
]
return {"ui": {"gifs": previews}, "result": ((save_output, output_files),)} If you are using virtual mode, you can get the dict via
I'll add some interop with |
I've attempted to get this code to work:
but it throws the error |
Sorry, I missed one line of code. It's now fixed and you can run with Workflow():
model, clip, vae = CheckpointLoaderSimple(Checkpoints.v1_5_pruned_emaonly)
conditioning = CLIPTextEncode('whileaf whileaf creepy slime calligraphy graffiti runes', clip)
conditioning2 = CLIPTextEncode('ugly', clip)
latent = EmptyLatentImage(512, 512, 2)
latent = KSampler(model, 0, 5, 8, 'dpmpp_2m_sde_gpu', 'karras', conditioning, conditioning2, latent, 1)
image = VAEDecode(latent, vae)
video = VHSVideoCombine(image, 8, 0, 'AnimateDiff', 'image/gif', False, True, None, None)
import PIL.Image
# {'gifs': [{'filename': 'AnimateDiff_00002.gif', 'subfolder': '', 'type': 'output', 'format': 'image/gif'}]}
filename = video.wait()._output['gifs'][0]['filename']
gif = PIL.Image.open(rf'D:/ComfyUI/output/{filename}')
display(gif)
# Second frame
gif.seek(1)
display(gif) |
To display the animation instead of a frame in Jupyter Notebook: from IPython.display import Image
Image(filename=rf'D:/ComfyUI/output/{filename}') Another option is to use https://github.com/google/mediapy, which can also display videos but requires FFmpeg to be present in PATH. |
It works now, thank you so much! |
Hi there, thanks for this super cool repo, this is exactly what I've been waiting for to really dive into comfyUI!
I'm trying to get an animateDiff workflow working, but I'm running into an issue with the node which outputs the video/gif.
It's from https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite
The workflow is here:
whileaf-lora-workflow.json
It gets transpiled to:
but running it gives the following errors:
Any idea what might be going on?
The text was updated successfully, but these errors were encountered: