Created
January 13, 2026 09:29
-
-
Save romsson/5e83ae6dbadf4175e3bbc1454a44a939 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| from ntt.frames.frame_generation import random_frame | |
| from ntt.frames.display import display_frame | |
| from pipeoptz import Pipeline, Node | |
| def random_number(): | |
| num = random.randint(100, 600) | |
| return num | |
| pipeline = Pipeline("Simple Pipeline", "Generate a random image.") | |
| node_gen_width = Node("GenWidth", random_number) | |
| node_gen_height = Node("GenHeight", random_number) | |
| node_random_frame = Node( | |
| "random_frame", random_frame, fixed_params={"width": 10, "height": 3} | |
| ) | |
| pipeline.add_node(node_gen_width) | |
| pipeline.add_node(node_gen_height) | |
| pipeline.add_node( | |
| node_random_frame, predecessors={"width": "GenWidth", "height": "GenHeight"} | |
| ) | |
| outputs = pipeline.run() | |
| display_frame(outputs[1][pipeline.static_order()[-1]]) |
romsson
commented
Jan 13, 2026
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment