mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
split out RunwayVideoOutput from VideoOutput
This commit is contained in:
committed by
psychedelicious
parent
0224fab631
commit
8d5e2b0816
@@ -293,19 +293,35 @@ class ImageCollectionInvocation(BaseInvocation):
|
||||
# region Video
|
||||
|
||||
|
||||
@invocation_output("runway_video_output")
|
||||
class RunwayVideoOutput(BaseInvocationOutput):
|
||||
"""Base class for nodes that output a runway result"""
|
||||
|
||||
video_url: str = OutputField(description="The output video url")
|
||||
runway_task_id: str = OutputField(description="The runway task id")
|
||||
|
||||
|
||||
@classmethod
|
||||
def build(cls, video_url: str, runway_task_id: str) -> "RunwayVideoOutput":
|
||||
return cls(
|
||||
video_url=video_url,
|
||||
runway_task_id=runway_task_id,
|
||||
)
|
||||
|
||||
@invocation_output("video_output")
|
||||
class VideoOutput(BaseInvocationOutput):
|
||||
"""Base class for nodes that output a single video"""
|
||||
"""Base class for nodes that output a video"""
|
||||
|
||||
video: VideoField = OutputField(description="The output video")
|
||||
video_id: str = OutputField(description="The output video id")
|
||||
width: int = OutputField(description="The width of the video in pixels")
|
||||
height: int = OutputField(description="The height of the video in pixels")
|
||||
duration_seconds: float = OutputField(description="The duration of the video in seconds")
|
||||
|
||||
|
||||
@classmethod
|
||||
def build(cls, video_name: str, width: int, height: int, duration_seconds: float) -> "VideoOutput":
|
||||
def build(cls, video_id: str, width: int, height: int, duration_seconds: float) -> "VideoOutput":
|
||||
return cls(
|
||||
video=VideoField(video_name=video_name),
|
||||
video_id=video_id,
|
||||
width=width,
|
||||
height=height,
|
||||
duration_seconds=duration_seconds,
|
||||
@@ -314,7 +330,6 @@ class VideoOutput(BaseInvocationOutput):
|
||||
|
||||
|
||||
|
||||
|
||||
# endregion
|
||||
|
||||
# region DenoiseMask
|
||||
|
||||
@@ -68,6 +68,7 @@ from invokeai.app.invocations.primitives import (
|
||||
LatentsOutput,
|
||||
StringCollectionOutput,
|
||||
StringOutput,
|
||||
RunwayVideoOutput,
|
||||
VideoOutput,
|
||||
)
|
||||
from invokeai.app.invocations.scheduler import SchedulerOutput
|
||||
@@ -157,6 +158,7 @@ __all__ = [
|
||||
"LatentsOutput",
|
||||
"StringCollectionOutput",
|
||||
"StringOutput",
|
||||
"RunwayVideoOutput",
|
||||
"VideoOutput",
|
||||
# invokeai.app.services.image_records.image_records_common
|
||||
"ImageCategory",
|
||||
|
||||
Reference in New Issue
Block a user