mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Missed Translations
This commit is contained in:
parent
0f0366f1f3
commit
3920d5c90d
@ -619,56 +619,175 @@
|
|||||||
"addNodeToolTip": "Add Node (Shift+A, Space)",
|
"addNodeToolTip": "Add Node (Shift+A, Space)",
|
||||||
"animatedEdges": "Animated Edges",
|
"animatedEdges": "Animated Edges",
|
||||||
"animatedEdgesHelp": "Animate selected edges and edges connected to selected nodes",
|
"animatedEdgesHelp": "Animate selected edges and edges connected to selected nodes",
|
||||||
|
"boolean": "Booleans",
|
||||||
|
"booleanCollection": "Boolean Collection",
|
||||||
|
"booleanCollectionDescription": "A collection of booleans.",
|
||||||
|
"booleanDescription": "Booleans are true or false.",
|
||||||
|
"booleanPolymorphic": "Boolean Polymorphic",
|
||||||
|
"booleanPolymorphicDescription": "A collection of booleans.",
|
||||||
"cannotConnectInputToInput": "Cannot connect input to input",
|
"cannotConnectInputToInput": "Cannot connect input to input",
|
||||||
"cannotConnectOutputToOutput": "Cannot connect output to output",
|
"cannotConnectOutputToOutput": "Cannot connect output to output",
|
||||||
"cannotConnectToSelf": "Cannot connect to self",
|
"cannotConnectToSelf": "Cannot connect to self",
|
||||||
|
"clipField": "Clip",
|
||||||
|
"clipFieldDescription": "Tokenizer and text_encoder submodels.",
|
||||||
|
"collection": "Collection",
|
||||||
|
"collectionDescription": "TODO",
|
||||||
|
"collectionItem": "Collection Item",
|
||||||
|
"collectionItemDescription": "TODO",
|
||||||
"colorCodeEdges": "Color-Code Edges",
|
"colorCodeEdges": "Color-Code Edges",
|
||||||
"colorCodeEdgesHelp": "Color-code edges according to their connected fields",
|
"colorCodeEdgesHelp": "Color-code edges according to their connected fields",
|
||||||
|
"colorCollectionDescription": "A collection of colors.",
|
||||||
|
"colorField": "Color",
|
||||||
|
"colorFieldDescription": "A RGBA color.",
|
||||||
|
"colorPolymorphic": "Color Polymorphic",
|
||||||
|
"colorPolymorphicDescription": "A collection of colors.",
|
||||||
|
"conditioningCollection": "Conditioning Collection",
|
||||||
|
"conditioningCollectionDescription": "Conditioning may be passed between nodes.",
|
||||||
|
"conditioningField": "Conditioning",
|
||||||
|
"conditioningFieldDescription": "Conditioning may be passed between nodes.",
|
||||||
|
"conditioningPolymorphic": "Conditioning Polymorphic",
|
||||||
|
"conditioningPolymorphicDescription": "Conditioning may be passed between nodes.",
|
||||||
"connectionWouldCreateCycle": "Connection would create a cycle",
|
"connectionWouldCreateCycle": "Connection would create a cycle",
|
||||||
|
"controlCollection": "Control Collection",
|
||||||
|
"controlCollectionDescription": "Control info passed between nodes.",
|
||||||
|
"controlField": "Control",
|
||||||
|
"controlFieldDescription": "Control info passed between nodes.",
|
||||||
"currentImage": "Current Image",
|
"currentImage": "Current Image",
|
||||||
"currentImageDescription": "Displays the current image in the Node Editor",
|
"currentImageDescription": "Displays the current image in the Node Editor",
|
||||||
|
"denoiseMaskField": "Denoise Mask",
|
||||||
|
"denoiseMaskFieldDescription": "Denoise Mask may be passed between nodes",
|
||||||
|
"doesNotExist": "does not exist",
|
||||||
"downloadWorkflow": "Download Workflow JSON",
|
"downloadWorkflow": "Download Workflow JSON",
|
||||||
|
"edge": "Edge",
|
||||||
|
"enum": "Enum",
|
||||||
|
"enumDescription": "Enums are values that may be one of a number of options.",
|
||||||
|
"executionStateCompleted": "Completed",
|
||||||
|
"executionStateError": "Error",
|
||||||
|
"executionStateInProgress": "In Progress",
|
||||||
"fieldTypesMustMatch": "Field types must match",
|
"fieldTypesMustMatch": "Field types must match",
|
||||||
"fitViewportNodes": "Fit View",
|
"fitViewportNodes": "Fit View",
|
||||||
|
"float": "Float",
|
||||||
|
"floatCollection": "Float Collection",
|
||||||
|
"floatCollectionDescription": "A collection of floats.",
|
||||||
|
"floatDescription": "Floats are numbers with a decimal point.",
|
||||||
|
"floatPolymorphic": "Float Polymorphic",
|
||||||
|
"floatPolymorphicDescription": "A collection of floats.",
|
||||||
"fullyContainNodes": "Fully Contain Nodes to Select",
|
"fullyContainNodes": "Fully Contain Nodes to Select",
|
||||||
"fullyContainNodesHelp": "Nodes must be fully inside the selection box to be selected",
|
"fullyContainNodesHelp": "Nodes must be fully inside the selection box to be selected",
|
||||||
"hideGraphNodes": "Hide Graph Overlay",
|
"hideGraphNodes": "Hide Graph Overlay",
|
||||||
"hideLegendNodes": "Hide Field Type Legend",
|
"hideLegendNodes": "Hide Field Type Legend",
|
||||||
"hideMinimapnodes": "Hide MiniMap",
|
"hideMinimapnodes": "Hide MiniMap",
|
||||||
|
"imageCollection": "Image Collection",
|
||||||
|
"imageCollectionDescription": "A collection of images.",
|
||||||
|
"imageField": "Image",
|
||||||
|
"imageFieldDescription": "Images may be passed between nodes.",
|
||||||
|
"imagePolymorphic": "Image Polymorphic",
|
||||||
|
"imagePolymorphicDescription": "A collection of images.",
|
||||||
|
"inputFields": "Input Feilds",
|
||||||
"inputMayOnlyHaveOneConnection": "Input may only have one connection",
|
"inputMayOnlyHaveOneConnection": "Input may only have one connection",
|
||||||
|
"inputNode": "Input Node",
|
||||||
|
"integer": "Integer",
|
||||||
|
"integerCollection": "Integer Collection",
|
||||||
|
"integerCollectionDescription": "A collection of integers.",
|
||||||
|
"integerDescription": "Integers are whole numbers, without a decimal point.",
|
||||||
|
"integerPolymorphic": "Integer Polymorphic",
|
||||||
|
"integerPolymorphicDescription": "A collection of integers.",
|
||||||
|
"invalidOutputSchema": "Invalid output schema",
|
||||||
|
"latentsCollection": "Latents Collection",
|
||||||
|
"latentsCollectionDescription": "Latents may be passed between nodes.",
|
||||||
|
"latentsField": "Latents",
|
||||||
|
"latentsFieldDescription": "Latents may be passed between nodes.",
|
||||||
|
"latentsPolymorphic": "Latents Polymorphic",
|
||||||
|
"latentsPolymorphicDescription": "Latents may be passed between nodes.",
|
||||||
"loadingNodes": "Loading Nodes...",
|
"loadingNodes": "Loading Nodes...",
|
||||||
"loadWorkflow": "Load Workflow",
|
"loadWorkflow": "Load Workflow",
|
||||||
|
"loRAModelField": "LoRA",
|
||||||
|
"loRAModelFieldDescription": "TODO",
|
||||||
|
"mainModelField": "Model",
|
||||||
|
"mainModelFieldDescription": "TODO",
|
||||||
|
"maybeIncompatible": "May be Incompatible With Installed",
|
||||||
|
"mismatchedVersion": "Has Mismatched Version",
|
||||||
|
"missingCanvaInitImage": "Missing canvas init image",
|
||||||
|
"missingCanvaInitMaskImages": "Missing canvas init and mask images",
|
||||||
|
"missingTemplate": "Missing Template",
|
||||||
"noConnectionData": "No connection data",
|
"noConnectionData": "No connection data",
|
||||||
"noConnectionInProgress": "No connection in progress",
|
"noConnectionInProgress": "No connection in progress",
|
||||||
|
"node": "Node",
|
||||||
"nodeOutputs": "Node Outputs",
|
"nodeOutputs": "Node Outputs",
|
||||||
"nodeSearch": "Search for nodes",
|
"nodeSearch": "Search for nodes",
|
||||||
"nodeTemplate": "Node Template",
|
"nodeTemplate": "Node Template",
|
||||||
|
"nodeType": "Node Type",
|
||||||
"noFieldsLinearview": "No fields added to Linear View",
|
"noFieldsLinearview": "No fields added to Linear View",
|
||||||
"noFieldType": "No field type",
|
"noFieldType": "No field type",
|
||||||
|
"noImageFoundState": "No initial image found in state",
|
||||||
"noMatchingNodes": "No matching nodes",
|
"noMatchingNodes": "No matching nodes",
|
||||||
|
"noModelFoundState": "No model found in state",
|
||||||
"noNodeSelected": "No node selected",
|
"noNodeSelected": "No node selected",
|
||||||
"noOpacity": "Node Opacity",
|
"noOpacity": "Node Opacity",
|
||||||
"noOutputRecorded": "No outputs recorded",
|
"noOutputRecorded": "No outputs recorded",
|
||||||
|
"noOutputSchemaName": "No output schema name found in ref object",
|
||||||
"notes": "Notes",
|
"notes": "Notes",
|
||||||
"notesDescription": "Add notes about your workflow",
|
"notesDescription": "Add notes about your workflow",
|
||||||
|
"oNNXModelField": "ONNX Model",
|
||||||
|
"oNNXModelFieldDescription": "ONNX model field.",
|
||||||
|
"outputFields": "Output Feilds",
|
||||||
|
"outputNode": "Output node",
|
||||||
|
"outputSchemaNotFound": "Output schema not found",
|
||||||
"pickOne": "Pick One",
|
"pickOne": "Pick One",
|
||||||
|
"problemReadingMetadata": "Problem reading metadata from image",
|
||||||
|
"problemReadingWorkflow": "Problem reading workflow from image",
|
||||||
"problemSettingTitle": "Problem Setting Title",
|
"problemSettingTitle": "Problem Setting Title",
|
||||||
"reloadNodeTemplates": "Reload Node Templates",
|
"reloadNodeTemplates": "Reload Node Templates",
|
||||||
"removeLinearView": "Remove from Linear View",
|
"removeLinearView": "Remove from Linear View",
|
||||||
"resetWorkflow": "Reset Workflow",
|
"resetWorkflow": "Reset Workflow",
|
||||||
"resetWorkflowDesc": "Are you sure you want to reset this workflow?",
|
"resetWorkflowDesc": "Are you sure you want to reset this workflow?",
|
||||||
"resetWorkflowDesc2": "Resetting the workflow will clear all nodes, edges and workflow details.",
|
"resetWorkflowDesc2": "Resetting the workflow will clear all nodes, edges and workflow details.",
|
||||||
|
"scheduler": "Scheduler",
|
||||||
|
"schedulerDescription": "TODO",
|
||||||
|
"sDXLMainModelField": "SDXL Model",
|
||||||
|
"sDXLMainModelFieldDescription": "SDXL model field.",
|
||||||
|
"sDXLRefinerModelField": "Refiner Model",
|
||||||
|
"sDXLRefinerModelFieldDescription": "TODO",
|
||||||
"showGraphNodes": "Show Graph Overlay",
|
"showGraphNodes": "Show Graph Overlay",
|
||||||
"showLegendNodes": "Show Field Type Legend",
|
"showLegendNodes": "Show Field Type Legend",
|
||||||
"showMinimapnodes": "Show MiniMap",
|
"showMinimapnodes": "Show MiniMap",
|
||||||
|
"skipped": "Skipped",
|
||||||
|
"skippedReservedInput": "Skipped reserved input field",
|
||||||
|
"skippedReservedOutput": "Skipped reserved output field",
|
||||||
|
"skippingInputNoTemplate": "Skipping input field with no template",
|
||||||
|
"skippingReservedFieldType": "Skipping reserved field type",
|
||||||
|
"skippingUnknownInputType": "Skipping unknown input field type",
|
||||||
|
"skippingUnknownOutputType": "Skipping unknown output field type",
|
||||||
"snapToGrid": "Snap to Grid",
|
"snapToGrid": "Snap to Grid",
|
||||||
"snapToGridHelp": "Snap nodes to grid when moved",
|
"snapToGridHelp": "Snap nodes to grid when moved",
|
||||||
|
"sourceNode": "Source node",
|
||||||
|
"string": "String",
|
||||||
|
"stringCollection": "String Collection",
|
||||||
|
"stringCollectionDescription": "A collection of strings.",
|
||||||
|
"stringDescription": "Strings are text.",
|
||||||
|
"stringPolymorphic": "String Polymorphic",
|
||||||
|
"stringPolymorphicDescription": "A collection of strings.",
|
||||||
"unableToLoadWorkflow": "Unable to Validate Workflow",
|
"unableToLoadWorkflow": "Unable to Validate Workflow",
|
||||||
|
"unableToParseEdge": "Unable to parse edge",
|
||||||
|
"unableToParseNode": "Unable to parse node",
|
||||||
"unableToValidateWorkflow": "Unable to Validate Workflow",
|
"unableToValidateWorkflow": "Unable to Validate Workflow",
|
||||||
|
"uNetField": "UNet",
|
||||||
|
"uNetFieldDescription": "UNet submodel.",
|
||||||
|
"unhandledInputProperty": "Unhandled input property",
|
||||||
|
"unhandledOutputProperty": "Unhandled output property",
|
||||||
"unknownField": "Unknown Field",
|
"unknownField": "Unknown Field",
|
||||||
|
"unknownNode": "Unknown Node",
|
||||||
|
"unknownTemplate": "Unknown Template",
|
||||||
"unkownInvocation": "Unknown Invocation type",
|
"unkownInvocation": "Unknown Invocation type",
|
||||||
|
"updateApp": "Update App",
|
||||||
|
"vaeField": "Vae",
|
||||||
|
"vaeFieldDescription": "Vae submodel.",
|
||||||
|
"vaeModelField": "VAE",
|
||||||
|
"vaeModelFieldDescription": "TODO",
|
||||||
"validateConnections": "Validate Connections and Graph",
|
"validateConnections": "Validate Connections and Graph",
|
||||||
"validateConnectionsHelp": "Prevent invalid connections from being made, and invalid graphs from being invoked",
|
"validateConnectionsHelp": "Prevent invalid connections from being made, and invalid graphs from being invoked",
|
||||||
|
"version": "Version",
|
||||||
|
"versionUnknown": " Version Unknown",
|
||||||
"workflow": "Workflow",
|
"workflow": "Workflow",
|
||||||
"workflowAuthor": "Author",
|
"workflowAuthor": "Author",
|
||||||
"workflowContact": "Contact",
|
"workflowContact": "Contact",
|
||||||
@ -680,15 +799,7 @@
|
|||||||
"workflowValidation": "Workflow Validation Error",
|
"workflowValidation": "Workflow Validation Error",
|
||||||
"workflowVersion": "Version",
|
"workflowVersion": "Version",
|
||||||
"zoomInNodes": "Zoom In",
|
"zoomInNodes": "Zoom In",
|
||||||
"zoomOutNodes": "Zoom Out",
|
"zoomOutNodes": "Zoom Out"
|
||||||
"executionStateError": "Error",
|
|
||||||
"executionStateCompleted": "Completed",
|
|
||||||
"executionStateInProgress": "In Progress",
|
|
||||||
"versionUnknown": " Version Unknown",
|
|
||||||
"unknownNode": "Unknown Node",
|
|
||||||
"version": "Version",
|
|
||||||
"updateApp": "Update App",
|
|
||||||
"unknownTemplate": "Unknown Template"
|
|
||||||
},
|
},
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"aspectRatio": "Ratio",
|
"aspectRatio": "Ratio",
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { FieldType, FieldUIConfig } from './types';
|
import { FieldType, FieldUIConfig } from './types';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
export const HANDLE_TOOLTIP_OPEN_DELAY = 500;
|
export const HANDLE_TOOLTIP_OPEN_DELAY = 500;
|
||||||
export const COLOR_TOKEN_VALUE = 500;
|
export const COLOR_TOKEN_VALUE = 500;
|
||||||
@ -102,73 +103,73 @@ export const isPolymorphicItemType = (
|
|||||||
export const FIELDS: Record<FieldType, FieldUIConfig> = {
|
export const FIELDS: Record<FieldType, FieldUIConfig> = {
|
||||||
boolean: {
|
boolean: {
|
||||||
color: 'green.500',
|
color: 'green.500',
|
||||||
description: 'Booleans are true or false.',
|
description: i18n.t('nodes.booleanDescription'),
|
||||||
title: 'Boolean',
|
title: i18n.t('nodes.boolean'),
|
||||||
},
|
},
|
||||||
BooleanCollection: {
|
BooleanCollection: {
|
||||||
color: 'green.500',
|
color: 'green.500',
|
||||||
description: 'A collection of booleans.',
|
description: i18n.t('nodes.booleanCollectionDescription'),
|
||||||
title: 'Boolean Collection',
|
title: i18n.t('nodes.booleanCollection'),
|
||||||
},
|
},
|
||||||
BooleanPolymorphic: {
|
BooleanPolymorphic: {
|
||||||
color: 'green.500',
|
color: 'green.500',
|
||||||
description: 'A collection of booleans.',
|
description: i18n.t('nodes.booleanPolymorphicDescription'),
|
||||||
title: 'Boolean Polymorphic',
|
title: i18n.t('nodes.booleanPolymorphic'),
|
||||||
},
|
},
|
||||||
ClipField: {
|
ClipField: {
|
||||||
color: 'green.500',
|
color: 'green.500',
|
||||||
description: 'Tokenizer and text_encoder submodels.',
|
description: i18n.t('nodes.clipFieldDescription'),
|
||||||
title: 'Clip',
|
title: i18n.t('nodes.clipField'),
|
||||||
},
|
},
|
||||||
Collection: {
|
Collection: {
|
||||||
color: 'base.500',
|
color: 'base.500',
|
||||||
description: 'TODO',
|
description: i18n.t('nodes.collectionDescription'),
|
||||||
title: 'Collection',
|
title: i18n.t('nodes.collection'),
|
||||||
},
|
},
|
||||||
CollectionItem: {
|
CollectionItem: {
|
||||||
color: 'base.500',
|
color: 'base.500',
|
||||||
description: 'TODO',
|
description: i18n.t('nodes.collectionItemDescription'),
|
||||||
title: 'Collection Item',
|
title: i18n.t('nodes.collectionItem'),
|
||||||
},
|
},
|
||||||
ColorCollection: {
|
ColorCollection: {
|
||||||
color: 'pink.300',
|
color: 'pink.300',
|
||||||
description: 'A collection of colors.',
|
description: i18n.t('nodes.colorCollectionDescription'),
|
||||||
title: 'Color Collection',
|
title: i18n.t('nodes.colorCollection'),
|
||||||
},
|
},
|
||||||
ColorField: {
|
ColorField: {
|
||||||
color: 'pink.300',
|
color: 'pink.300',
|
||||||
description: 'A RGBA color.',
|
description: i18n.t('nodes.colorFieldDescription'),
|
||||||
title: 'Color',
|
title: i18n.t('nodes.colorField'),
|
||||||
},
|
},
|
||||||
ColorPolymorphic: {
|
ColorPolymorphic: {
|
||||||
color: 'pink.300',
|
color: 'pink.300',
|
||||||
description: 'A collection of colors.',
|
description: i18n.t('nodes.colorPolymorphicDescription'),
|
||||||
title: 'Color Polymorphic',
|
title: i18n.t('nodes.colorPolymorphic'),
|
||||||
},
|
},
|
||||||
ConditioningCollection: {
|
ConditioningCollection: {
|
||||||
color: 'cyan.500',
|
color: 'cyan.500',
|
||||||
description: 'Conditioning may be passed between nodes.',
|
description: i18n.t('nodes.conditioningCollectionDescription'),
|
||||||
title: 'Conditioning Collection',
|
title: i18n.t('nodes.conditioningCollection'),
|
||||||
},
|
},
|
||||||
ConditioningField: {
|
ConditioningField: {
|
||||||
color: 'cyan.500',
|
color: 'cyan.500',
|
||||||
description: 'Conditioning may be passed between nodes.',
|
description: i18n.t('nodes.conditioningFieldDescription'),
|
||||||
title: 'Conditioning',
|
title: i18n.t('nodes.conditioningField'),
|
||||||
},
|
},
|
||||||
ConditioningPolymorphic: {
|
ConditioningPolymorphic: {
|
||||||
color: 'cyan.500',
|
color: 'cyan.500',
|
||||||
description: 'Conditioning may be passed between nodes.',
|
description: i18n.t('nodes.conditioningPolymorphicDescription'),
|
||||||
title: 'Conditioning Polymorphic',
|
title: i18n.t('nodes.conditioningPolymorphic'),
|
||||||
},
|
},
|
||||||
ControlCollection: {
|
ControlCollection: {
|
||||||
color: 'teal.500',
|
color: 'teal.500',
|
||||||
description: 'Control info passed between nodes.',
|
description: i18n.t('nodes.controlCollectionDescription'),
|
||||||
title: 'Control Collection',
|
title: i18n.t('nodes.controlCollection'),
|
||||||
},
|
},
|
||||||
ControlField: {
|
ControlField: {
|
||||||
color: 'teal.500',
|
color: 'teal.500',
|
||||||
description: 'Control info passed between nodes.',
|
description: i18n.t('nodes.controlFieldDescription'),
|
||||||
title: 'Control',
|
title: i18n.t('nodes.controlField'),
|
||||||
},
|
},
|
||||||
ControlNetModelField: {
|
ControlNetModelField: {
|
||||||
color: 'teal.500',
|
color: 'teal.500',
|
||||||
@ -182,132 +183,132 @@ export const FIELDS: Record<FieldType, FieldUIConfig> = {
|
|||||||
},
|
},
|
||||||
DenoiseMaskField: {
|
DenoiseMaskField: {
|
||||||
color: 'blue.300',
|
color: 'blue.300',
|
||||||
description: 'Denoise Mask may be passed between nodes',
|
description: i18n.t('nodes.denoiseMaskFieldDescription'),
|
||||||
title: 'Denoise Mask',
|
title: i18n.t('nodes.denoiseMaskField'),
|
||||||
},
|
},
|
||||||
enum: {
|
enum: {
|
||||||
color: 'blue.500',
|
color: 'blue.500',
|
||||||
description: 'Enums are values that may be one of a number of options.',
|
description: i18n.t('nodes.enumDescription'),
|
||||||
title: 'Enum',
|
title: i18n.t('nodes.enum'),
|
||||||
},
|
},
|
||||||
float: {
|
float: {
|
||||||
color: 'orange.500',
|
color: 'orange.500',
|
||||||
description: 'Floats are numbers with a decimal point.',
|
description: i18n.t('nodes.floatDescription'),
|
||||||
title: 'Float',
|
title: i18n.t('nodes.float'),
|
||||||
},
|
},
|
||||||
FloatCollection: {
|
FloatCollection: {
|
||||||
color: 'orange.500',
|
color: 'orange.500',
|
||||||
description: 'A collection of floats.',
|
description: i18n.t('nodes.floatCollectionDescription'),
|
||||||
title: 'Float Collection',
|
title: i18n.t('nodes.floatCollection'),
|
||||||
},
|
},
|
||||||
FloatPolymorphic: {
|
FloatPolymorphic: {
|
||||||
color: 'orange.500',
|
color: 'orange.500',
|
||||||
description: 'A collection of floats.',
|
description: i18n.t('nodes.floatPolymorphicDescription'),
|
||||||
title: 'Float Polymorphic',
|
title: i18n.t('nodes.floatPolymorphic'),
|
||||||
},
|
},
|
||||||
ImageCollection: {
|
ImageCollection: {
|
||||||
color: 'purple.500',
|
color: 'purple.500',
|
||||||
description: 'A collection of images.',
|
description: i18n.t('nodes.imageCollectionDescription'),
|
||||||
title: 'Image Collection',
|
title: i18n.t('nodes.imageCollection'),
|
||||||
},
|
},
|
||||||
ImageField: {
|
ImageField: {
|
||||||
color: 'purple.500',
|
color: 'purple.500',
|
||||||
description: 'Images may be passed between nodes.',
|
description: i18n.t('nodes.imageFieldDescription'),
|
||||||
title: 'Image',
|
title: i18n.t('nodes.imageField'),
|
||||||
},
|
},
|
||||||
ImagePolymorphic: {
|
ImagePolymorphic: {
|
||||||
color: 'purple.500',
|
color: 'purple.500',
|
||||||
description: 'A collection of images.',
|
description: i18n.t('nodes.imagePolymorphicDescription'),
|
||||||
title: 'Image Polymorphic',
|
title: i18n.t('nodes.imagePolymorphic'),
|
||||||
},
|
},
|
||||||
integer: {
|
integer: {
|
||||||
color: 'red.500',
|
color: 'red.500',
|
||||||
description: 'Integers are whole numbers, without a decimal point.',
|
description: i18n.t('nodes.integerDescription'),
|
||||||
title: 'Integer',
|
title: i18n.t('nodes.integer'),
|
||||||
},
|
},
|
||||||
IntegerCollection: {
|
IntegerCollection: {
|
||||||
color: 'red.500',
|
color: 'red.500',
|
||||||
description: 'A collection of integers.',
|
description: i18n.t('nodes.integerCollectionDescription'),
|
||||||
title: 'Integer Collection',
|
title: i18n.t('nodes.integerCollection'),
|
||||||
},
|
},
|
||||||
IntegerPolymorphic: {
|
IntegerPolymorphic: {
|
||||||
color: 'red.500',
|
color: 'red.500',
|
||||||
description: 'A collection of integers.',
|
description: i18n.t('nodes.integerPolymorphicDescription'),
|
||||||
title: 'Integer Polymorphic',
|
title: i18n.t('nodes.integerPolymorphic'),
|
||||||
},
|
},
|
||||||
LatentsCollection: {
|
LatentsCollection: {
|
||||||
color: 'pink.500',
|
color: 'pink.500',
|
||||||
description: 'Latents may be passed between nodes.',
|
description: i18n.t('nodes.latentsCollectionDescription'),
|
||||||
title: 'Latents Collection',
|
title: i18n.t('nodes.latentsCollection'),
|
||||||
},
|
},
|
||||||
LatentsField: {
|
LatentsField: {
|
||||||
color: 'pink.500',
|
color: 'pink.500',
|
||||||
description: 'Latents may be passed between nodes.',
|
description: i18n.t('nodes.latentsFieldDescription'),
|
||||||
title: 'Latents',
|
title: i18n.t('nodes.latentsField'),
|
||||||
},
|
},
|
||||||
LatentsPolymorphic: {
|
LatentsPolymorphic: {
|
||||||
color: 'pink.500',
|
color: 'pink.500',
|
||||||
description: 'Latents may be passed between nodes.',
|
description: i18n.t('nodes.latentsPolymorphicDescription'),
|
||||||
title: 'Latents Polymorphic',
|
title: i18n.t('nodes.latentsPolymorphic'),
|
||||||
},
|
},
|
||||||
LoRAModelField: {
|
LoRAModelField: {
|
||||||
color: 'teal.500',
|
color: 'teal.500',
|
||||||
description: 'TODO',
|
description: i18n.t('nodes.loRAModelFieldDescription'),
|
||||||
title: 'LoRA',
|
title: i18n.t('nodes.loRAModelField'),
|
||||||
},
|
},
|
||||||
MainModelField: {
|
MainModelField: {
|
||||||
color: 'teal.500',
|
color: 'teal.500',
|
||||||
description: 'TODO',
|
description: i18n.t('nodes.mainModelFieldDescription'),
|
||||||
title: 'Model',
|
title: i18n.t('nodes.mainModelField'),
|
||||||
},
|
},
|
||||||
ONNXModelField: {
|
ONNXModelField: {
|
||||||
color: 'teal.500',
|
color: 'teal.500',
|
||||||
description: 'ONNX model field.',
|
description: i18n.t('nodes.oNNXModelFieldDescription'),
|
||||||
title: 'ONNX Model',
|
title: i18n.t('nodes.oNNXModelField'),
|
||||||
},
|
},
|
||||||
Scheduler: {
|
Scheduler: {
|
||||||
color: 'base.500',
|
color: 'base.500',
|
||||||
description: 'TODO',
|
description: i18n.t('nodes.schedulerDescription'),
|
||||||
title: 'Scheduler',
|
title: i18n.t('nodes.scheduler'),
|
||||||
},
|
},
|
||||||
SDXLMainModelField: {
|
SDXLMainModelField: {
|
||||||
color: 'teal.500',
|
color: 'teal.500',
|
||||||
description: 'SDXL model field.',
|
description: i18n.t('nodes.sDXLMainModelFieldDescription'),
|
||||||
title: 'SDXL Model',
|
title: i18n.t('nodes.sDXLMainModelField'),
|
||||||
},
|
},
|
||||||
SDXLRefinerModelField: {
|
SDXLRefinerModelField: {
|
||||||
color: 'teal.500',
|
color: 'teal.500',
|
||||||
description: 'TODO',
|
description: i18n.t('nodes.sDXLRefinerModelFieldDescription'),
|
||||||
title: 'Refiner Model',
|
title: i18n.t('nodes.sDXLRefinerModelField'),
|
||||||
},
|
},
|
||||||
string: {
|
string: {
|
||||||
color: 'yellow.500',
|
color: 'yellow.500',
|
||||||
description: 'Strings are text.',
|
description: i18n.t('nodes.stringDescription'),
|
||||||
title: 'String',
|
title: i18n.t('nodes.string'),
|
||||||
},
|
},
|
||||||
StringCollection: {
|
StringCollection: {
|
||||||
color: 'yellow.500',
|
color: 'yellow.500',
|
||||||
description: 'A collection of strings.',
|
description: i18n.t('nodes.stringCollectionDescription'),
|
||||||
title: 'String Collection',
|
title: i18n.t('nodes.stringCollection'),
|
||||||
},
|
},
|
||||||
StringPolymorphic: {
|
StringPolymorphic: {
|
||||||
color: 'yellow.500',
|
color: 'yellow.500',
|
||||||
description: 'A collection of strings.',
|
description: i18n.t('nodes.stringPolymorphicDescription'),
|
||||||
title: 'String Polymorphic',
|
title: i18n.t('nodes.stringPolymorphic'),
|
||||||
},
|
},
|
||||||
UNetField: {
|
UNetField: {
|
||||||
color: 'red.500',
|
color: 'red.500',
|
||||||
description: 'UNet submodel.',
|
description: i18n.t('nodes.uNetFieldDescription'),
|
||||||
title: 'UNet',
|
title: i18n.t('nodes.uNetField'),
|
||||||
},
|
},
|
||||||
VaeField: {
|
VaeField: {
|
||||||
color: 'blue.500',
|
color: 'blue.500',
|
||||||
description: 'Vae submodel.',
|
description: i18n.t('nodes.vaeFieldDescription'),
|
||||||
title: 'Vae',
|
title: i18n.t('nodes.vaeField'),
|
||||||
},
|
},
|
||||||
VaeModelField: {
|
VaeModelField: {
|
||||||
color: 'teal.500',
|
color: 'teal.500',
|
||||||
description: 'TODO',
|
description: i18n.t('nodes.vaeModelFieldDescription'),
|
||||||
title: 'VAE',
|
title: i18n.t('nodes.vaeModelField'),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -20,6 +20,7 @@ import {
|
|||||||
import { O } from 'ts-toolbelt';
|
import { O } from 'ts-toolbelt';
|
||||||
import { JsonObject } from 'type-fest';
|
import { JsonObject } from 'type-fest';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
export type NonNullableGraph = O.Required<Graph, 'nodes' | 'edges'>;
|
export type NonNullableGraph = O.Required<Graph, 'nodes' | 'edges'>;
|
||||||
|
|
||||||
@ -1258,23 +1259,35 @@ export const zValidatedWorkflow = zWorkflow.transform((workflow) => {
|
|||||||
const targetNode = keyedNodes[edge.target];
|
const targetNode = keyedNodes[edge.target];
|
||||||
const issues: string[] = [];
|
const issues: string[] = [];
|
||||||
if (!sourceNode) {
|
if (!sourceNode) {
|
||||||
issues.push(`Output node ${edge.source} does not exist`);
|
issues.push(
|
||||||
|
`${i18n.t('nodes.outputNode')} ${edge.source} ${i18n.t(
|
||||||
|
'nodes.doesNotExist'
|
||||||
|
)}`
|
||||||
|
);
|
||||||
} else if (
|
} else if (
|
||||||
edge.type === 'default' &&
|
edge.type === 'default' &&
|
||||||
!(edge.sourceHandle in sourceNode.data.outputs)
|
!(edge.sourceHandle in sourceNode.data.outputs)
|
||||||
) {
|
) {
|
||||||
issues.push(
|
issues.push(
|
||||||
`Output field "${edge.source}.${edge.sourceHandle}" does not exist`
|
`${i18n.t('nodes.outputField')}"${edge.source}.${
|
||||||
|
edge.sourceHandle
|
||||||
|
}" ${i18n.t('nodes.doesNotExist')}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!targetNode) {
|
if (!targetNode) {
|
||||||
issues.push(`Input node ${edge.target} does not exist`);
|
issues.push(
|
||||||
|
`${i18n.t('nodes.inputNode')} ${edge.target} ${i18n.t(
|
||||||
|
'nodes.doesNotExist'
|
||||||
|
)}`
|
||||||
|
);
|
||||||
} else if (
|
} else if (
|
||||||
edge.type === 'default' &&
|
edge.type === 'default' &&
|
||||||
!(edge.targetHandle in targetNode.data.inputs)
|
!(edge.targetHandle in targetNode.data.inputs)
|
||||||
) {
|
) {
|
||||||
issues.push(
|
issues.push(
|
||||||
`Input field "${edge.target}.${edge.targetHandle}" does not exist`
|
`${i18n.t('nodes.inputField')} "${edge.target}.${
|
||||||
|
edge.targetHandle
|
||||||
|
}" ${i18n.t('nodes.doesNotExist')}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (issues.length) {
|
if (issues.length) {
|
||||||
@ -1282,7 +1295,9 @@ export const zValidatedWorkflow = zWorkflow.transform((workflow) => {
|
|||||||
const src = edge.type === 'default' ? edge.sourceHandle : edge.source;
|
const src = edge.type === 'default' ? edge.sourceHandle : edge.source;
|
||||||
const tgt = edge.type === 'default' ? edge.targetHandle : edge.target;
|
const tgt = edge.type === 'default' ? edge.targetHandle : edge.target;
|
||||||
warnings.push({
|
warnings.push({
|
||||||
message: `Edge "${src} -> ${tgt}" skipped`,
|
message: `${i18n.t('nodes.edge')} "${src} -> ${tgt}" ${i18n.t(
|
||||||
|
'nodes.skipped'
|
||||||
|
)}`,
|
||||||
issues,
|
issues,
|
||||||
data: edge,
|
data: edge,
|
||||||
});
|
});
|
||||||
|
@ -3,6 +3,7 @@ import { NodesState } from '../store/types';
|
|||||||
import { Workflow, zWorkflowEdge, zWorkflowNode } from '../types/types';
|
import { Workflow, zWorkflowEdge, zWorkflowNode } from '../types/types';
|
||||||
import { fromZodError } from 'zod-validation-error';
|
import { fromZodError } from 'zod-validation-error';
|
||||||
import { parseify } from 'common/util/serialize';
|
import { parseify } from 'common/util/serialize';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
export const buildWorkflow = (nodesState: NodesState): Workflow => {
|
export const buildWorkflow = (nodesState: NodesState): Workflow => {
|
||||||
const { workflow: workflowMeta, nodes, edges } = nodesState;
|
const { workflow: workflowMeta, nodes, edges } = nodesState;
|
||||||
@ -20,7 +21,7 @@ export const buildWorkflow = (nodesState: NodesState): Workflow => {
|
|||||||
const result = zWorkflowNode.safeParse(node);
|
const result = zWorkflowNode.safeParse(node);
|
||||||
if (!result.success) {
|
if (!result.success) {
|
||||||
const { message } = fromZodError(result.error, {
|
const { message } = fromZodError(result.error, {
|
||||||
prefix: 'Unable to parse node',
|
prefix: i18n.t('nodes.unableToParseNode'),
|
||||||
});
|
});
|
||||||
logger('nodes').warn({ node: parseify(node) }, message);
|
logger('nodes').warn({ node: parseify(node) }, message);
|
||||||
return;
|
return;
|
||||||
@ -32,7 +33,7 @@ export const buildWorkflow = (nodesState: NodesState): Workflow => {
|
|||||||
const result = zWorkflowEdge.safeParse(edge);
|
const result = zWorkflowEdge.safeParse(edge);
|
||||||
if (!result.success) {
|
if (!result.success) {
|
||||||
const { message } = fromZodError(result.error, {
|
const { message } = fromZodError(result.error, {
|
||||||
prefix: 'Unable to parse edge',
|
prefix: i18n.t('nodes.unableToParseEdge'),
|
||||||
});
|
});
|
||||||
logger('nodes').warn({ edge: parseify(edge) }, message);
|
logger('nodes').warn({ edge: parseify(edge) }, message);
|
||||||
return;
|
return;
|
||||||
|
@ -7,6 +7,7 @@ import {
|
|||||||
zWorkflow,
|
zWorkflow,
|
||||||
} from 'features/nodes/types/types';
|
} from 'features/nodes/types/types';
|
||||||
import { get } from 'lodash-es';
|
import { get } from 'lodash-es';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
export const getMetadataAndWorkflowFromImageBlob = async (
|
export const getMetadataAndWorkflowFromImageBlob = async (
|
||||||
image: Blob
|
image: Blob
|
||||||
@ -23,7 +24,7 @@ export const getMetadataAndWorkflowFromImageBlob = async (
|
|||||||
} else {
|
} else {
|
||||||
logger('system').error(
|
logger('system').error(
|
||||||
{ error: parseify(metadataResult.error) },
|
{ error: parseify(metadataResult.error) },
|
||||||
'Problem reading metadata from image'
|
i18n.t('nodes.problemReadingMetadata')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -36,7 +37,7 @@ export const getMetadataAndWorkflowFromImageBlob = async (
|
|||||||
} else {
|
} else {
|
||||||
logger('system').error(
|
logger('system').error(
|
||||||
{ error: parseify(workflowResult.error) },
|
{ error: parseify(workflowResult.error) },
|
||||||
'Problem reading workflow from image'
|
i18n.t('nodes.problemReadingWorkflow')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import { buildCanvasSDXLInpaintGraph } from './buildCanvasSDXLInpaintGraph';
|
|||||||
import { buildCanvasSDXLOutpaintGraph } from './buildCanvasSDXLOutpaintGraph';
|
import { buildCanvasSDXLOutpaintGraph } from './buildCanvasSDXLOutpaintGraph';
|
||||||
import { buildCanvasSDXLTextToImageGraph } from './buildCanvasSDXLTextToImageGraph';
|
import { buildCanvasSDXLTextToImageGraph } from './buildCanvasSDXLTextToImageGraph';
|
||||||
import { buildCanvasTextToImageGraph } from './buildCanvasTextToImageGraph';
|
import { buildCanvasTextToImageGraph } from './buildCanvasTextToImageGraph';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
export const buildCanvasGraph = (
|
export const buildCanvasGraph = (
|
||||||
state: RootState,
|
state: RootState,
|
||||||
@ -29,7 +30,7 @@ export const buildCanvasGraph = (
|
|||||||
}
|
}
|
||||||
} else if (generationMode === 'img2img') {
|
} else if (generationMode === 'img2img') {
|
||||||
if (!canvasInitImage) {
|
if (!canvasInitImage) {
|
||||||
throw new Error('Missing canvas init image');
|
throw new Error(i18n.t('nodes.missingCanvaInitImage'));
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
state.generation.model &&
|
state.generation.model &&
|
||||||
@ -41,7 +42,7 @@ export const buildCanvasGraph = (
|
|||||||
}
|
}
|
||||||
} else if (generationMode === 'inpaint') {
|
} else if (generationMode === 'inpaint') {
|
||||||
if (!canvasInitImage || !canvasMaskImage) {
|
if (!canvasInitImage || !canvasMaskImage) {
|
||||||
throw new Error('Missing canvas init and mask images');
|
throw new Error(i18n.t('nodes.missingCanvaInitMaskImages'));
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
state.generation.model &&
|
state.generation.model &&
|
||||||
@ -57,7 +58,7 @@ export const buildCanvasGraph = (
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!canvasInitImage) {
|
if (!canvasInitImage) {
|
||||||
throw new Error('Missing canvas init image');
|
throw new Error(i18n.t('nodes.missingCanvaInitImage'));
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
state.generation.model &&
|
state.generation.model &&
|
||||||
|
@ -25,6 +25,7 @@ import {
|
|||||||
POSITIVE_CONDITIONING,
|
POSITIVE_CONDITIONING,
|
||||||
SEAMLESS,
|
SEAMLESS,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the Canvas tab's Image to Image graph.
|
* Builds the Canvas tab's Image to Image graph.
|
||||||
@ -66,8 +67,8 @@ export const buildCanvasImageToImageGraph = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!model) {
|
if (!model) {
|
||||||
log.error('No model found in state');
|
log.error(i18n.t('nodes.noModelFoundState'));
|
||||||
throw new Error('No model found in state');
|
throw new Error(i18n.t('nodes.noModelFoundState'));
|
||||||
}
|
}
|
||||||
|
|
||||||
let modelLoaderNodeId = MAIN_MODEL_LOADER;
|
let modelLoaderNodeId = MAIN_MODEL_LOADER;
|
||||||
|
@ -44,6 +44,7 @@ import {
|
|||||||
RANGE_OF_SIZE,
|
RANGE_OF_SIZE,
|
||||||
SEAMLESS,
|
SEAMLESS,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the Canvas tab's Inpaint graph.
|
* Builds the Canvas tab's Inpaint graph.
|
||||||
@ -79,8 +80,8 @@ export const buildCanvasInpaintGraph = (
|
|||||||
} = state.generation;
|
} = state.generation;
|
||||||
|
|
||||||
if (!model) {
|
if (!model) {
|
||||||
log.error('No model found in state');
|
log.error(i18n.t('nodes.noImageFoundState'));
|
||||||
throw new Error('No model found in state');
|
throw new Error(i18n.t('nodes.noImageFoundState'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// The bounding box determines width and height, not the width and height params
|
// The bounding box determines width and height, not the width and height params
|
||||||
|
@ -46,6 +46,7 @@ import {
|
|||||||
RANGE_OF_SIZE,
|
RANGE_OF_SIZE,
|
||||||
SEAMLESS,
|
SEAMLESS,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the Canvas tab's Outpaint graph.
|
* Builds the Canvas tab's Outpaint graph.
|
||||||
@ -83,8 +84,8 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
} = state.generation;
|
} = state.generation;
|
||||||
|
|
||||||
if (!model) {
|
if (!model) {
|
||||||
log.error('No model found in state');
|
log.error(i18n.t('nodes.noImageFoundState'));
|
||||||
throw new Error('No model found in state');
|
throw new Error(i18n.t('nodes.noImageFoundState'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// The bounding box determines width and height, not the width and height params
|
// The bounding box determines width and height, not the width and height params
|
||||||
|
@ -27,6 +27,7 @@ import {
|
|||||||
SEAMLESS,
|
SEAMLESS,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
|
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the Canvas tab's Image to Image graph.
|
* Builds the Canvas tab's Image to Image graph.
|
||||||
@ -74,8 +75,8 @@ export const buildCanvasSDXLImageToImageGraph = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!model) {
|
if (!model) {
|
||||||
log.error('No model found in state');
|
log.error(i18n.t('nodes.noModelFoundState'));
|
||||||
throw new Error('No model found in state');
|
throw new Error(i18n.t('nodes.noModelFoundState'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Model Loader ID
|
// Model Loader ID
|
||||||
|
@ -46,6 +46,7 @@ import {
|
|||||||
SEAMLESS,
|
SEAMLESS,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
|
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the Canvas tab's Inpaint graph.
|
* Builds the Canvas tab's Inpaint graph.
|
||||||
@ -86,8 +87,8 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
} = state.sdxl;
|
} = state.sdxl;
|
||||||
|
|
||||||
if (!model) {
|
if (!model) {
|
||||||
log.error('No model found in state');
|
log.error(i18n.t('nodes.noModelFoundState'));
|
||||||
throw new Error('No model found in state');
|
throw new Error(i18n.t('nodes.noModelFoundState'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// The bounding box determines width and height, not the width and height params
|
// The bounding box determines width and height, not the width and height params
|
||||||
|
@ -48,6 +48,7 @@ import {
|
|||||||
SEAMLESS,
|
SEAMLESS,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
|
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the Canvas tab's Outpaint graph.
|
* Builds the Canvas tab's Outpaint graph.
|
||||||
@ -90,8 +91,8 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
} = state.sdxl;
|
} = state.sdxl;
|
||||||
|
|
||||||
if (!model) {
|
if (!model) {
|
||||||
log.error('No model found in state');
|
log.error(i18n.t('nodes.noModelFoundState'));
|
||||||
throw new Error('No model found in state');
|
throw new Error(i18n.t('nodes.noModelFoundState'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// The bounding box determines width and height, not the width and height params
|
// The bounding box determines width and height, not the width and height params
|
||||||
|
@ -29,6 +29,7 @@ import {
|
|||||||
SEAMLESS,
|
SEAMLESS,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
|
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the Canvas tab's Text to Image graph.
|
* Builds the Canvas tab's Text to Image graph.
|
||||||
@ -71,8 +72,8 @@ export const buildCanvasSDXLTextToImageGraph = (
|
|||||||
state.sdxl;
|
state.sdxl;
|
||||||
|
|
||||||
if (!model) {
|
if (!model) {
|
||||||
log.error('No model found in state');
|
log.error(i18n.t('nodes.noModelFoundState'));
|
||||||
throw new Error('No model found in state');
|
throw new Error(i18n.t('nodes.noModelFoundState'));
|
||||||
}
|
}
|
||||||
|
|
||||||
const use_cpu = shouldUseNoiseSettings
|
const use_cpu = shouldUseNoiseSettings
|
||||||
|
@ -27,6 +27,7 @@ import {
|
|||||||
POSITIVE_CONDITIONING,
|
POSITIVE_CONDITIONING,
|
||||||
SEAMLESS,
|
SEAMLESS,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the Canvas tab's Text to Image graph.
|
* Builds the Canvas tab's Text to Image graph.
|
||||||
@ -66,8 +67,8 @@ export const buildCanvasTextToImageGraph = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!model) {
|
if (!model) {
|
||||||
log.error('No model found in state');
|
log.error(i18n.t('nodes.noModelFoundState'));
|
||||||
throw new Error('No model found in state');
|
throw new Error(i18n.t('nodes.noModelFoundState'));
|
||||||
}
|
}
|
||||||
|
|
||||||
const use_cpu = shouldUseNoiseSettings
|
const use_cpu = shouldUseNoiseSettings
|
||||||
|
@ -27,6 +27,7 @@ import {
|
|||||||
RESIZE,
|
RESIZE,
|
||||||
SEAMLESS,
|
SEAMLESS,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the Image to Image tab graph.
|
* Builds the Image to Image tab graph.
|
||||||
@ -75,13 +76,13 @@ export const buildLinearImageToImageGraph = (
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (!initialImage) {
|
if (!initialImage) {
|
||||||
log.error('No initial image found in state');
|
log.error(i18n.t('nodes.noImageFoundState'));
|
||||||
throw new Error('No initial image found in state');
|
throw new Error(i18n.t('nodes.noImageFoundState'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!model) {
|
if (!model) {
|
||||||
log.error('No model found in state');
|
log.error(i18n.t('nodes.noModelFoundState'));
|
||||||
throw new Error('No model found in state');
|
throw new Error(i18n.t('nodes.noModelFoundState'));
|
||||||
}
|
}
|
||||||
|
|
||||||
const fp32 = vaePrecision === 'fp32';
|
const fp32 = vaePrecision === 'fp32';
|
||||||
|
@ -29,6 +29,7 @@ import {
|
|||||||
SEAMLESS,
|
SEAMLESS,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
|
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the Image to Image tab graph.
|
* Builds the Image to Image tab graph.
|
||||||
@ -75,13 +76,13 @@ export const buildLinearSDXLImageToImageGraph = (
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (!initialImage) {
|
if (!initialImage) {
|
||||||
log.error('No initial image found in state');
|
log.error(i18n.t('nodes.noImageFoundState'));
|
||||||
throw new Error('No initial image found in state');
|
throw new Error(i18n.t('nodes.noImageFoundState'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!model) {
|
if (!model) {
|
||||||
log.error('No model found in state');
|
log.error(i18n.t('nodes.noModelFoundState'));
|
||||||
throw new Error('No model found in state');
|
throw new Error(i18n.t('nodes.noModelFoundState'));
|
||||||
}
|
}
|
||||||
|
|
||||||
const fp32 = vaePrecision === 'fp32';
|
const fp32 = vaePrecision === 'fp32';
|
||||||
|
@ -23,6 +23,7 @@ import {
|
|||||||
SEAMLESS,
|
SEAMLESS,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
|
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
export const buildLinearSDXLTextToImageGraph = (
|
export const buildLinearSDXLTextToImageGraph = (
|
||||||
state: RootState
|
state: RootState
|
||||||
@ -58,8 +59,8 @@ export const buildLinearSDXLTextToImageGraph = (
|
|||||||
: initialGenerationState.shouldUseCpuNoise;
|
: initialGenerationState.shouldUseCpuNoise;
|
||||||
|
|
||||||
if (!model) {
|
if (!model) {
|
||||||
log.error('No model found in state');
|
log.error(i18n.t('nodes.noModelFoundState'));
|
||||||
throw new Error('No model found in state');
|
throw new Error(i18n.t('nodes.noModelFoundState'));
|
||||||
}
|
}
|
||||||
|
|
||||||
const fp32 = vaePrecision === 'fp32';
|
const fp32 = vaePrecision === 'fp32';
|
||||||
|
@ -26,6 +26,7 @@ import {
|
|||||||
SEAMLESS,
|
SEAMLESS,
|
||||||
TEXT_TO_IMAGE_GRAPH,
|
TEXT_TO_IMAGE_GRAPH,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
export const buildLinearTextToImageGraph = (
|
export const buildLinearTextToImageGraph = (
|
||||||
state: RootState
|
state: RootState
|
||||||
@ -53,8 +54,8 @@ export const buildLinearTextToImageGraph = (
|
|||||||
: initialGenerationState.shouldUseCpuNoise;
|
: initialGenerationState.shouldUseCpuNoise;
|
||||||
|
|
||||||
if (!model) {
|
if (!model) {
|
||||||
log.error('No model found in state');
|
log.error(i18n.t('nodes.noModelFoundState'));
|
||||||
throw new Error('No model found in state');
|
throw new Error(i18n.t('nodes.noModelFoundState'));
|
||||||
}
|
}
|
||||||
|
|
||||||
const fp32 = vaePrecision === 'fp32';
|
const fp32 = vaePrecision === 'fp32';
|
||||||
|
@ -15,6 +15,7 @@ import {
|
|||||||
isInvocationSchemaObject,
|
isInvocationSchemaObject,
|
||||||
} from '../types/types';
|
} from '../types/types';
|
||||||
import { buildInputFieldTemplate, getFieldType } from './fieldTemplateBuilders';
|
import { buildInputFieldTemplate, getFieldType } from './fieldTemplateBuilders';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
const RESERVED_INPUT_FIELD_NAMES = ['id', 'type', 'metadata'];
|
const RESERVED_INPUT_FIELD_NAMES = ['id', 'type', 'metadata'];
|
||||||
const RESERVED_OUTPUT_FIELD_NAMES = ['type'];
|
const RESERVED_OUTPUT_FIELD_NAMES = ['type'];
|
||||||
@ -97,7 +98,7 @@ export const parseSchema = (
|
|||||||
if (isReservedInputField(type, propertyName)) {
|
if (isReservedInputField(type, propertyName)) {
|
||||||
logger('nodes').trace(
|
logger('nodes').trace(
|
||||||
{ node: type, fieldName: propertyName, field: parseify(property) },
|
{ node: type, fieldName: propertyName, field: parseify(property) },
|
||||||
'Skipped reserved input field'
|
i18n.t('nodes.skippedReservedInput')
|
||||||
);
|
);
|
||||||
return inputsAccumulator;
|
return inputsAccumulator;
|
||||||
}
|
}
|
||||||
@ -105,7 +106,7 @@ export const parseSchema = (
|
|||||||
if (!isInvocationFieldSchema(property)) {
|
if (!isInvocationFieldSchema(property)) {
|
||||||
logger('nodes').warn(
|
logger('nodes').warn(
|
||||||
{ node: type, propertyName, property: parseify(property) },
|
{ node: type, propertyName, property: parseify(property) },
|
||||||
'Unhandled input property'
|
i18n.t('nodes.unhandledInputProperty')
|
||||||
);
|
);
|
||||||
return inputsAccumulator;
|
return inputsAccumulator;
|
||||||
}
|
}
|
||||||
@ -120,7 +121,7 @@ export const parseSchema = (
|
|||||||
fieldType,
|
fieldType,
|
||||||
field: parseify(property),
|
field: parseify(property),
|
||||||
},
|
},
|
||||||
'Skipping unknown input field type'
|
i18n.t('nodes.skippingUnknownInputType')
|
||||||
);
|
);
|
||||||
return inputsAccumulator;
|
return inputsAccumulator;
|
||||||
}
|
}
|
||||||
@ -133,7 +134,7 @@ export const parseSchema = (
|
|||||||
fieldType,
|
fieldType,
|
||||||
field: parseify(property),
|
field: parseify(property),
|
||||||
},
|
},
|
||||||
'Skipping reserved field type'
|
i18n.t('nodes.skippingReservedFieldType')
|
||||||
);
|
);
|
||||||
return inputsAccumulator;
|
return inputsAccumulator;
|
||||||
}
|
}
|
||||||
@ -153,7 +154,7 @@ export const parseSchema = (
|
|||||||
fieldType,
|
fieldType,
|
||||||
field: parseify(property),
|
field: parseify(property),
|
||||||
},
|
},
|
||||||
'Skipping input field with no template'
|
i18n.t('nodes.skippingInputNoTemplate')
|
||||||
);
|
);
|
||||||
return inputsAccumulator;
|
return inputsAccumulator;
|
||||||
}
|
}
|
||||||
@ -169,21 +170,24 @@ export const parseSchema = (
|
|||||||
if (!outputSchemaName) {
|
if (!outputSchemaName) {
|
||||||
logger('nodes').warn(
|
logger('nodes').warn(
|
||||||
{ outputRefObject: parseify(schema.output) },
|
{ outputRefObject: parseify(schema.output) },
|
||||||
'No output schema name found in ref object'
|
i18n.t('nodes.noOutputSchemaName')
|
||||||
);
|
);
|
||||||
return invocationsAccumulator;
|
return invocationsAccumulator;
|
||||||
}
|
}
|
||||||
|
|
||||||
const outputSchema = openAPI.components?.schemas?.[outputSchemaName];
|
const outputSchema = openAPI.components?.schemas?.[outputSchemaName];
|
||||||
if (!outputSchema) {
|
if (!outputSchema) {
|
||||||
logger('nodes').warn({ outputSchemaName }, 'Output schema not found');
|
logger('nodes').warn(
|
||||||
|
{ outputSchemaName },
|
||||||
|
i18n.t('nodes.outputSchemaNotFound')
|
||||||
|
);
|
||||||
return invocationsAccumulator;
|
return invocationsAccumulator;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isInvocationOutputSchemaObject(outputSchema)) {
|
if (!isInvocationOutputSchemaObject(outputSchema)) {
|
||||||
logger('nodes').error(
|
logger('nodes').error(
|
||||||
{ outputSchema: parseify(outputSchema) },
|
{ outputSchema: parseify(outputSchema) },
|
||||||
'Invalid output schema'
|
i18n.t('nodes.invalidOutputSchema')
|
||||||
);
|
);
|
||||||
return invocationsAccumulator;
|
return invocationsAccumulator;
|
||||||
}
|
}
|
||||||
@ -196,7 +200,7 @@ export const parseSchema = (
|
|||||||
if (!isAllowedOutputField(type, propertyName)) {
|
if (!isAllowedOutputField(type, propertyName)) {
|
||||||
logger('nodes').trace(
|
logger('nodes').trace(
|
||||||
{ type, propertyName, property: parseify(property) },
|
{ type, propertyName, property: parseify(property) },
|
||||||
'Skipped reserved output field'
|
i18n.t('nodes.skippedReservedOutput')
|
||||||
);
|
);
|
||||||
return outputsAccumulator;
|
return outputsAccumulator;
|
||||||
}
|
}
|
||||||
@ -204,7 +208,7 @@ export const parseSchema = (
|
|||||||
if (!isInvocationFieldSchema(property)) {
|
if (!isInvocationFieldSchema(property)) {
|
||||||
logger('nodes').warn(
|
logger('nodes').warn(
|
||||||
{ type, propertyName, property: parseify(property) },
|
{ type, propertyName, property: parseify(property) },
|
||||||
'Unhandled output property'
|
i18n.t('nodes.unhandledOutputProperty')
|
||||||
);
|
);
|
||||||
return outputsAccumulator;
|
return outputsAccumulator;
|
||||||
}
|
}
|
||||||
@ -214,7 +218,7 @@ export const parseSchema = (
|
|||||||
if (!isFieldType(fieldType)) {
|
if (!isFieldType(fieldType)) {
|
||||||
logger('nodes').warn(
|
logger('nodes').warn(
|
||||||
{ fieldName: propertyName, fieldType, field: parseify(property) },
|
{ fieldName: propertyName, fieldType, field: parseify(property) },
|
||||||
'Skipping unknown output field type'
|
i18n.t('nodes.skippingUnknownOutputType')
|
||||||
);
|
);
|
||||||
return outputsAccumulator;
|
return outputsAccumulator;
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import {
|
|||||||
isWorkflowInvocationNode,
|
isWorkflowInvocationNode,
|
||||||
} from '../types/types';
|
} from '../types/types';
|
||||||
import { parseify } from 'common/util/serialize';
|
import { parseify } from 'common/util/serialize';
|
||||||
|
import i18n from 'i18next';
|
||||||
|
|
||||||
export const validateWorkflow = (
|
export const validateWorkflow = (
|
||||||
workflow: Workflow,
|
workflow: Workflow,
|
||||||
@ -25,8 +26,14 @@ export const validateWorkflow = (
|
|||||||
const nodeTemplate = nodeTemplates[node.data.type];
|
const nodeTemplate = nodeTemplates[node.data.type];
|
||||||
if (!nodeTemplate) {
|
if (!nodeTemplate) {
|
||||||
errors.push({
|
errors.push({
|
||||||
message: `Node "${node.data.type}" skipped`,
|
message: `${i18n.t('nodes.node')} "${node.data.type}" ${i18n.t(
|
||||||
issues: [`Node type "${node.data.type}" does not exist`],
|
'nodes.skipped'
|
||||||
|
)}`,
|
||||||
|
issues: [
|
||||||
|
`${i18n.t('nodes.nodeType')}"${node.data.type}" ${i18n.t(
|
||||||
|
'nodes.doesNotExist'
|
||||||
|
)}`,
|
||||||
|
],
|
||||||
data: node,
|
data: node,
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@ -38,9 +45,13 @@ export const validateWorkflow = (
|
|||||||
compareVersions(nodeTemplate.version, node.data.version) !== 0
|
compareVersions(nodeTemplate.version, node.data.version) !== 0
|
||||||
) {
|
) {
|
||||||
errors.push({
|
errors.push({
|
||||||
message: `Node "${node.data.type}" has mismatched version`,
|
message: `${i18n.t('nodes.node')} "${node.data.type}" ${i18n.t(
|
||||||
|
'nodes.mismatchedVersion'
|
||||||
|
)}`,
|
||||||
issues: [
|
issues: [
|
||||||
`Node "${node.data.type}" v${node.data.version} may be incompatible with installed v${nodeTemplate.version}`,
|
`${i18n.t('nodes.node')} "${node.data.type}" v${
|
||||||
|
node.data.version
|
||||||
|
} ${i18n.t('nodes.maybeIncompatible')} v${nodeTemplate.version}`,
|
||||||
],
|
],
|
||||||
data: { node, nodeTemplate: parseify(nodeTemplate) },
|
data: { node, nodeTemplate: parseify(nodeTemplate) },
|
||||||
});
|
});
|
||||||
@ -52,33 +63,49 @@ export const validateWorkflow = (
|
|||||||
const targetNode = keyedNodes[edge.target];
|
const targetNode = keyedNodes[edge.target];
|
||||||
const issues: string[] = [];
|
const issues: string[] = [];
|
||||||
if (!sourceNode) {
|
if (!sourceNode) {
|
||||||
issues.push(`Output node ${edge.source} does not exist`);
|
issues.push(
|
||||||
|
`${i18n.t('nodes.outputNode')} ${edge.source} ${i18n.t(
|
||||||
|
'nodes.doesNotExist'
|
||||||
|
)}`
|
||||||
|
);
|
||||||
} else if (
|
} else if (
|
||||||
edge.type === 'default' &&
|
edge.type === 'default' &&
|
||||||
!(edge.sourceHandle in sourceNode.data.outputs)
|
!(edge.sourceHandle in sourceNode.data.outputs)
|
||||||
) {
|
) {
|
||||||
issues.push(
|
issues.push(
|
||||||
`Output field "${edge.source}.${edge.sourceHandle}" does not exist`
|
`${i18n.t('nodes.outputNodes')} "${edge.source}.${
|
||||||
|
edge.sourceHandle
|
||||||
|
}" ${i18n.t('nodes.doesNotExist')}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!targetNode) {
|
if (!targetNode) {
|
||||||
issues.push(`Input node ${edge.target} does not exist`);
|
issues.push(
|
||||||
|
`${i18n.t('nodes.inputNode')} ${edge.target} ${i18n.t(
|
||||||
|
'nodes.doesNotExist'
|
||||||
|
)}`
|
||||||
|
);
|
||||||
} else if (
|
} else if (
|
||||||
edge.type === 'default' &&
|
edge.type === 'default' &&
|
||||||
!(edge.targetHandle in targetNode.data.inputs)
|
!(edge.targetHandle in targetNode.data.inputs)
|
||||||
) {
|
) {
|
||||||
issues.push(
|
issues.push(
|
||||||
`Input field "${edge.target}.${edge.targetHandle}" does not exist`
|
`${i18n.t('nodes.inputFeilds')} "${edge.target}.${
|
||||||
|
edge.targetHandle
|
||||||
|
}" ${i18n.t('nodes.doesNotExist')}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!nodeTemplates[sourceNode?.data.type ?? '__UNKNOWN_NODE_TYPE__']) {
|
if (!nodeTemplates[sourceNode?.data.type ?? '__UNKNOWN_NODE_TYPE__']) {
|
||||||
issues.push(
|
issues.push(
|
||||||
`Source node "${edge.source}" missing template "${sourceNode?.data.type}"`
|
`${i18n.t('nodes.sourceNode')} "${edge.source}" ${i18n.t(
|
||||||
|
'nodes.missingTemplate'
|
||||||
|
)} "${sourceNode?.data.type}"`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!nodeTemplates[targetNode?.data.type ?? '__UNKNOWN_NODE_TYPE__']) {
|
if (!nodeTemplates[targetNode?.data.type ?? '__UNKNOWN_NODE_TYPE__']) {
|
||||||
issues.push(
|
issues.push(
|
||||||
`Source node "${edge.target}" missing template "${targetNode?.data.type}"`
|
`${i18n.t('nodes.sourceNode')}"${edge.target}" ${i18n.t(
|
||||||
|
'nodes.missingTemplate'
|
||||||
|
)} "${targetNode?.data.type}"`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (issues.length) {
|
if (issues.length) {
|
||||||
|
Loading…
Reference in New Issue
Block a user