mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): hide workflow and gallery checkboxes on image primitive
This node doesn't actually *save* the image, so these checkboxes do nothing on it.
This commit is contained in:
parent
e02af8f518
commit
4d01b5c0f2
@ -25,8 +25,8 @@ const InvocationNodeFooter = ({ nodeId }: Props) => {
|
|||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{hasImageOutput && <EmbedWorkflowCheckbox nodeId={nodeId} />}
|
|
||||||
<UseCacheCheckbox nodeId={nodeId} />
|
<UseCacheCheckbox nodeId={nodeId} />
|
||||||
|
{hasImageOutput && <EmbedWorkflowCheckbox nodeId={nodeId} />}
|
||||||
{hasImageOutput && <SaveToGalleryCheckbox nodeId={nodeId} />}
|
{hasImageOutput && <SaveToGalleryCheckbox nodeId={nodeId} />}
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
|
@ -17,8 +17,12 @@ export const useHasImageOutput = (nodeId: string) => {
|
|||||||
if (!isInvocationNode(node)) {
|
if (!isInvocationNode(node)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return some(node.data.outputs, (output) =>
|
return some(
|
||||||
IMAGE_FIELDS.includes(output.type)
|
node.data.outputs,
|
||||||
|
(output) =>
|
||||||
|
IMAGE_FIELDS.includes(output.type) &&
|
||||||
|
// the image primitive node does not actually save the image, do not show the image-saving checkboxes
|
||||||
|
node.data.type !== 'image'
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
defaultSelectorOptions
|
defaultSelectorOptions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user