mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-15 19:15:02 -05:00
feat(ui): store node templates in separate slice
Flattens the `nodes` slice. May offer minor perf improvements in addition to just being cleaner.
This commit is contained in:
committed by
Kent Keirsey
parent
7c548c5bf3
commit
5d4610d981
@@ -12,7 +12,14 @@ import { getConnectedEdges } from 'reactflow';
|
||||
const selector = createMemoizedSelector(
|
||||
[stateSelector, activeTabNameSelector],
|
||||
(
|
||||
{ controlAdapters, generation, system, nodes, dynamicPrompts },
|
||||
{
|
||||
controlAdapters,
|
||||
generation,
|
||||
system,
|
||||
nodes,
|
||||
nodeTemplates,
|
||||
dynamicPrompts,
|
||||
},
|
||||
activeTabName
|
||||
) => {
|
||||
const { initialImage, model } = generation;
|
||||
@@ -41,7 +48,7 @@ const selector = createMemoizedSelector(
|
||||
return;
|
||||
}
|
||||
|
||||
const nodeTemplate = nodes.nodeTemplates[node.data.type];
|
||||
const nodeTemplate = nodeTemplates.templates[node.data.type];
|
||||
|
||||
if (!nodeTemplate) {
|
||||
// Node type not found
|
||||
|
||||
Reference in New Issue
Block a user