Data Types
Understanding the underlying data structure is crucial for seamless node interaction.
Frame-Based Data Format
Section titled “Frame-Based Data Format”Blobit uses a Frame-Based Data Format. This means almost all data passed between nodes is wrapped in a list, where each item represents a “frame”.
- Concept:
[Frame1, Frame2, Frame3] - Single Item:
[Item](Even a single image is a list of one image) - Empty:
[]
Your backend BaseNode.normalize_to_frames() handles this automatically for inputs. Your BaseNode.pack_outputs() handles this for outputs.
Supported I/O Types
Section titled “Supported I/O Types”Blobit nodes communicate by passing file paths (Relative Strings) between the backend and frontend.
| Type | Expected Python Return | Note |
|---|---|---|
image | "/temp/filename.png" | Frontend expects an image path. |
video | "/temp/filename.mp4" | Frontend expects a video path. |
audio | "/temp/filename.wav" | Frontend expects an audio path. |
string | "Any text" | Standard string. |
number | 1.0 | Int or Float. |
array | [...] | Generic list. |
The “Path” Rule
Section titled “The “Path” Rule”Most BaseNodes exchange Paths (/temp/img.png), not heavy Tensors.
- Backend: Saves processed data to a temp file -> Returns relative path.
- Frontend: Receives path -> Normalizes to
http://localhost...-> Displays it.
# Correct Return Patternreturn self.pack_outputs([saved_path_1, saved_path_2])# Internal structure: {"output": [["/temp/img1.png"], ["/temp/img2.png"]]}