1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Add Moonvalley nodes (#8832)

This commit is contained in:
Christian Byrne
2025-07-08 05:54:30 -07:00
committed by GitHub
parent b5e97db9ac
commit 9fd0cd7cf7
5 changed files with 837 additions and 2 deletions

View File

@@ -64,6 +64,15 @@ class VideoFromFile(VideoInput):
"""
self.__file = file
def get_stream_source(self) -> str | io.BytesIO:
"""
Return the underlying file source for efficient streaming.
This avoids unnecessary memory copies when the source is already a file path.
"""
if isinstance(self.__file, io.BytesIO):
self.__file.seek(0)
return self.__file
def get_dimensions(self) -> tuple[int, int]:
"""
Returns the dimensions of the video input.