Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
csreesan committed Aug 6, 2024
1 parent 8b640e0 commit e77e4de
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions substrate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
SegmentAnything,
BatchComputeJSON,
BatchComputeText,
InterpolateFrame,
ListVectorStores,
Llama3Instruct8B,
MultiComputeJSON,
Expand All @@ -38,6 +37,7 @@
RemoveBackground,
TranscribeSpeech,
DeleteVectorStore,
InterpolateFrames,
Llama3Instruct70B,
Mistral7BInstruct,
MultiInpaintImage,
Expand Down Expand Up @@ -84,7 +84,7 @@
"StableDiffusionXLInpaint",
"StableDiffusionXLControlNet",
"StableVideoDiffusion",
"InterpolateFrame",
"InterpolateFrames",
"TranscribeSpeech",
"GenerateSpeech",
"RemoveBackground",
Expand Down
12 changes: 6 additions & 6 deletions substrate/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ class Config:
"""
Seed for deterministic generation. Default is a random seed.
"""
fps: int = 7
fps: Annotated[int, Field(ge=1)] = 7
"""
Frames per second of the generated video.
"""
Expand All @@ -997,13 +997,13 @@ class Config:
"""
Generated video.
"""
frames: Optional[List[str]] = None
frames_uris: Optional[List[str]] = None
"""
Generated frames.
"""


class InterpolateFrameIn(BaseModel):
class InterpolateFramesIn(BaseModel):
class Config:
extra = Extra.allow

Expand All @@ -1019,7 +1019,7 @@ class Config:
"""
Output video format.
"""
fps: int = 7
fps: Annotated[int, Field(ge=1)] = 7
"""
Frames per second of the generated video.
"""
Expand All @@ -1029,15 +1029,15 @@ class Config:
"""


class InterpolateFrameOut(BaseModel):
class InterpolateFramesOut(BaseModel):
class Config:
extra = Extra.allow

video_uri: Optional[str] = None
"""
Generated video.
"""
frames: Optional[List[str]] = None
frame_uris: Optional[List[str]] = None
"""
Output frames.
"""
Expand Down
12 changes: 6 additions & 6 deletions substrate/future_dataclass_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1264,17 +1264,17 @@ class FutureStableVideoDiffusionOut:
(Future reference)
Generated video.
"""
frames: Optional[List[str]] = None
frames_uris: Optional[List[str]] = None
"""
(Future reference)
Generated frames.
"""


@dataclass
class FutureInterpolateFrameIn:
class FutureInterpolateFramesIn:
"""
Future reference to FutureInterpolateFrameIn
Future reference to FutureInterpolateFramesIn
"""

frame_uris: List[str]
Expand Down Expand Up @@ -1305,17 +1305,17 @@ class FutureInterpolateFrameIn:


@dataclass
class FutureInterpolateFrameOut:
class FutureInterpolateFramesOut:
"""
Future reference to FutureInterpolateFrameOut
Future reference to FutureInterpolateFramesOut
"""

video_uri: Optional[str] = None
"""
(Future reference)
Generated video.
"""
frames: Optional[List[str]] = None
frame_uris: Optional[List[str]] = None
"""
(Future reference)
Output frames.
Expand Down
18 changes: 9 additions & 9 deletions substrate/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
SegmentAnythingOut,
BatchComputeJSONOut,
BatchComputeTextOut,
InterpolateFrameOut,
ListVectorStoresOut,
Llama3Instruct8BOut,
MultiComputeJSONOut,
Expand All @@ -47,6 +46,7 @@
RemoveBackgroundOut,
TranscribeSpeechOut,
DeleteVectorStoreOut,
InterpolateFramesOut,
Llama3Instruct70BOut,
Mistral7BInstructOut,
MultiInpaintImageOut,
Expand Down Expand Up @@ -89,7 +89,6 @@
FutureSegmentAnythingOut,
FutureBatchComputeJSONOut,
FutureBatchComputeTextOut,
FutureInterpolateFrameOut,
FutureListVectorStoresOut,
FutureLlama3Instruct8BOut,
FutureMultiComputeJSONOut,
Expand All @@ -98,6 +97,7 @@
FutureRemoveBackgroundOut,
FutureTranscribeSpeechOut,
FutureDeleteVectorStoreOut,
FutureInterpolateFramesOut,
FutureLlama3Instruct70BOut,
FutureMistral7BInstructOut,
FutureMultiInpaintImageOut,
Expand Down Expand Up @@ -999,8 +999,8 @@ def future(self) -> FutureStableVideoDiffusionOut: # type: ignore
return super().future # type: ignore


class InterpolateFrame(CoreNode[InterpolateFrameOut]):
"""https://substrate.run/nodes#InterpolateFrame"""
class InterpolateFrames(CoreNode[InterpolateFramesOut]):
"""https://substrate.run/nodes#InterpolateFrames"""

def __init__(
self,
Expand All @@ -1020,7 +1020,7 @@ def __init__(
fps: Frames per second of the generated video.
num_rounds: Number of rounds of interpolation. Each round interpolates between all adjacent frames. This also includes the interpolated frames from the previous round.
https://substrate.run/nodes#InterpolateFrame
https://substrate.run/nodes#InterpolateFrames
"""
super().__init__(
frame_uris=frame_uris,
Expand All @@ -1029,17 +1029,17 @@ def __init__(
fps=fps,
num_rounds=num_rounds,
hide=hide,
out_type=InterpolateFrameOut,
out_type=InterpolateFramesOut,
**kwargs,
)
self.node = "InterpolateFrame"
self.node = "InterpolateFrames"

@property
def future(self) -> FutureInterpolateFrameOut: # type: ignore
def future(self) -> FutureInterpolateFramesOut: # type: ignore
"""
Future reference to this node's output.
https://substrate.run/nodes#InterpolateFrame
https://substrate.run/nodes#InterpolateFrames
"""
return super().future # type: ignore

Expand Down
8 changes: 4 additions & 4 deletions substrate/typeddict_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,13 +849,13 @@ class StableVideoDiffusionOut(TypedDict):
"""
Generated video.
"""
frames: NotRequired[List[str]]
frames_uris: NotRequired[List[str]]
"""
Generated frames.
"""


class InterpolateFrameIn(TypedDict):
class InterpolateFramesIn(TypedDict):
frame_uris: NotRequired[List[str]]
"""
Frames.
Expand All @@ -878,12 +878,12 @@ class InterpolateFrameIn(TypedDict):
"""


class InterpolateFrameOut(TypedDict):
class InterpolateFramesOut(TypedDict):
video_uri: NotRequired[str]
"""
Generated video.
"""
frames: NotRequired[List[str]]
frame_uris: NotRequired[List[str]]
"""
Output frames.
"""
Expand Down

0 comments on commit e77e4de

Please sign in to comment.