mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fix default graph and test
This commit is contained in:
parent
7d221e2518
commit
1e6adf0a06
@ -29,8 +29,7 @@ def create_text_to_image() -> LibraryGraph:
|
|||||||
Edge(source=EdgeConnection(node_id='seed', field='a'), destination=EdgeConnection(node_id='3', field='seed')),
|
Edge(source=EdgeConnection(node_id='seed', field='a'), destination=EdgeConnection(node_id='3', field='seed')),
|
||||||
Edge(source=EdgeConnection(node_id='3', field='noise'), destination=EdgeConnection(node_id='5', field='noise')),
|
Edge(source=EdgeConnection(node_id='3', field='noise'), destination=EdgeConnection(node_id='5', field='noise')),
|
||||||
Edge(source=EdgeConnection(node_id='5', field='latents'), destination=EdgeConnection(node_id='6', field='latents')),
|
Edge(source=EdgeConnection(node_id='5', field='latents'), destination=EdgeConnection(node_id='6', field='latents')),
|
||||||
Edge(source=EdgeConnection(node_id='4', field='positive'), destination=EdgeConnection(node_id='5', field='positive')),
|
Edge(source=EdgeConnection(node_id='4', field='conditioning'), destination=EdgeConnection(node_id='5', field='conditioning')),
|
||||||
Edge(source=EdgeConnection(node_id='4', field='negative'), destination=EdgeConnection(node_id='5', field='negative')),
|
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
exposed_inputs=[
|
exposed_inputs=[
|
||||||
|
@ -463,16 +463,16 @@ def test_graph_subgraph_t2i():
|
|||||||
|
|
||||||
n4 = ShowImageInvocation(id = "4")
|
n4 = ShowImageInvocation(id = "4")
|
||||||
g.add_node(n4)
|
g.add_node(n4)
|
||||||
g.add_edge(create_edge("1.5","image","4","image"))
|
g.add_edge(create_edge("1.6","image","4","image"))
|
||||||
|
|
||||||
# Validate
|
# Validate
|
||||||
dg = g.nx_graph_flat()
|
dg = g.nx_graph_flat()
|
||||||
assert set(dg.nodes) == set(['1.width', '1.height', '1.3', '1.4', '1.5', '2', '3', '4'])
|
assert set(dg.nodes) == set(['1.width', '1.height', '1.seed', '1.3', '1.4', '1.5', '1.6', '2', '3', '4'])
|
||||||
expected_edges = [(f'1.{e.source.node_id}',f'1.{e.destination.node_id}') for e in lg.graph.edges]
|
expected_edges = [(f'1.{e.source.node_id}',f'1.{e.destination.node_id}') for e in lg.graph.edges]
|
||||||
expected_edges.extend([
|
expected_edges.extend([
|
||||||
('2','1.width'),
|
('2','1.width'),
|
||||||
('3','1.height'),
|
('3','1.height'),
|
||||||
('1.5','4')
|
('1.6','4')
|
||||||
])
|
])
|
||||||
print(expected_edges)
|
print(expected_edges)
|
||||||
print(list(dg.edges))
|
print(list(dg.edges))
|
||||||
|
Loading…
Reference in New Issue
Block a user