From f44e91dd1686014f2dc6b2560331d9dd973e64af Mon Sep 17 00:00:00 2001 From: thinkwee Date: Wed, 13 Nov 2024 18:33:58 +0800 Subject: [PATCH] fix multi-model support --- graph.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/graph.py b/graph.py index 88c86cf4..c34ec9ef 100644 --- a/graph.py +++ b/graph.py @@ -264,7 +264,7 @@ class Graph: if len(line) == 1: # In case there is only one layer for node_id in range(line[0][0][0], line[0][0][1] + 1): if node_id not in self.nodes: - self.add_node(Node(node_id)) + self.add_node(Node(node_id), model=self.config.get("Model")) for i in range(len(line) - 1): from_node_list = line[i] to_node_list = line[i + 1] @@ -273,9 +273,9 @@ class Graph: for to_node_tuple in to_node_list: for to_node_id in range(to_node_tuple[0], to_node_tuple[1] + 1): if from_node_id not in self.nodes: - self.add_node(Node(from_node_id)) + self.add_node(Node(from_node_id), model=self.config.get("Model")) if to_node_id not in self.nodes: - self.add_node(Node(to_node_id)) + self.add_node(Node(to_node_id), model=self.config.get("Model")) self.add_edge(from_node_id, to_node_id) self.input_layer = self.get_input_layer() self.output_layer = self.get_output_layer()