More Translations and Fixes

This commit is contained in:
mickr777 2023-09-15 13:43:32 +10:00
parent a1ef079d1f
commit 7481251127
26 changed files with 199 additions and 167 deletions

View File

@ -721,7 +721,6 @@
"noFieldType": "No field type",
"noImageFoundState": "No initial image found in state",
"noMatchingNodes": "No matching nodes",
"noModelFoundState": "No model found in state",
"noNodeSelected": "No node selected",
"noOpacity": "Node Opacity",
"noOutputRecorded": "No outputs recorded",
@ -964,8 +963,14 @@
"useSlidersForAll": "Use Sliders For All Options"
},
"toast": {
"addedToBoard": "Added to board",
"baseModelChangedCleared": "Base model changed, cleared",
"canceled": "Processing Canceled",
"canvasCopiedClipboard": "Canvas Copied to Clipboard",
"canvasDownloaded": "Canvas Downloaded",
"canvasMerged": "Canvas Merged",
"canvasSavedGallery": "Canvas Saved to Gallery",
"canvasSentControlnetAssets": "Canvas Sent to ControlNet & Assets",
"connected": "Connected to Server",
"disconnected": "Disconnected from Server",
"downloadImageStarted": "Image Download Started",
@ -974,10 +979,18 @@
"imageLinkCopied": "Image Link Copied",
"imageNotLoaded": "No Image Loaded",
"imageNotLoadedDesc": "Could not find image",
"imageSaved": "Image Saved",
"imageSavedToGallery": "Image Saved to Gallery",
"imageSavingFailed": "Image Saving Failed",
"imageUploaded": "Image Uploaded",
"imageUploadFailed": "Image Upload Failed",
"incompatibleSubmodel": "incompatible submodel",
"initialImageNotSet": "Initial Image Not Set",
"initialImageNotSetDesc": "Could not load initial image",
"initialImageSet": "Initial Image Set",
"loadedWithWarnings": "Workflow Loaded with Warnings",
"maskSavedAssets": "Mask Saved to Assets",
"maskSentControlnetAssets": "Mask Sent to ControlNet & Assets",
"metadataLoadFailed": "Failed to load metadata",
"modelAdded": "Model Added: {{modelName}}",
"modelAddedSimple": "Model Added",
@ -998,8 +1011,20 @@
"parametersNotSet": "Parameters Not Set",
"parametersNotSetDesc": "No metadata found for this image.",
"parametersSet": "Parameters Set",
"problemCopyingCanvas": "Problem Copying Canvas",
"problemCopyingCanvasDesc": "Unable to export base layer",
"problemCopyingImage": "Unable to Copy Image",
"problemCopyingImageLink": "Unable to Copy Image Link",
"problemDownloadingCanvas": "Problem Downloading Canvas",
"problemDownloadingCanvasDesc": "Unable to export base layer",
"problemImportingMask": "Problem Importing Mask",
"problemImportingMaskDesc": "Unable to export mask",
"problemMergingCanvas": "Problem Merging Canvas",
"problemMergingCanvasDesc": "Unable to export base layer",
"problemSavingCanvas": "Problem Saving Canvas",
"problemSavingCanvasDesc": "Unable to export base layer",
"problemSavingMask": "Problem Saving Mask",
"problemSavingMaskDesc": "Unable to export mask",
"promptNotSet": "Prompt Not Set",
"promptNotSetDesc": "Could not find prompt for this image.",
"promptSet": "Prompt Set",
@ -1009,11 +1034,16 @@
"sentToImageToImage": "Sent To Image To Image",
"sentToUnifiedCanvas": "Sent to Unified Canvas",
"serverError": "Server Error",
"setCanvasInitialImage": "Set as canvas initial image",
"setControlImage": "Set as control image",
"setInitialImage": "Set as initial image",
"setNodeField": "Set as node field",
"tempFoldersEmptied": "Temp Folder Emptied",
"uploadFailed": "Upload failed",
"uploadFailedInvalidUploadDesc": "Must be single PNG or JPEG image",
"uploadFailedUnableToLoadDesc": "Unable to load file",
"upscalingFailed": "Upscaling Failed"
"upscalingFailed": "Upscaling Failed",
"workflowLoaded": "Workflow Loaded"
},
"tooltip": {
"feature": {

View File

@ -4,6 +4,7 @@ import { $logger } from 'app/logging/logger';
import { getBaseLayerBlob } from 'features/canvas/util/getBaseLayerBlob';
import { addToast } from 'features/system/store/systemSlice';
import { copyBlobToClipboard } from 'features/canvas/util/copyBlobToClipboard';
import { t } from 'i18next';
export const addCanvasCopiedToClipboardListener = () => {
startAppListening({
@ -20,8 +21,8 @@ export const addCanvasCopiedToClipboardListener = () => {
moduleLog.error('Problem getting base layer blob');
dispatch(
addToast({
title: 'Problem Copying Canvas',
description: 'Unable to export base layer',
title: t('toast.problemCopyingCanvas'),
description: t('toast.problemCopyingCanvasDesc'),
status: 'error',
})
);
@ -32,7 +33,7 @@ export const addCanvasCopiedToClipboardListener = () => {
dispatch(
addToast({
title: 'Canvas Copied to Clipboard',
title: t('toast.canvasCopiedClipboard'),
status: 'success',
})
);

View File

@ -4,6 +4,7 @@ import { $logger } from 'app/logging/logger';
import { downloadBlob } from 'features/canvas/util/downloadBlob';
import { getBaseLayerBlob } from 'features/canvas/util/getBaseLayerBlob';
import { addToast } from 'features/system/store/systemSlice';
import { t } from 'i18next';
export const addCanvasDownloadedAsImageListener = () => {
startAppListening({
@ -20,8 +21,8 @@ export const addCanvasDownloadedAsImageListener = () => {
moduleLog.error('Problem getting base layer blob');
dispatch(
addToast({
title: 'Problem Downloading Canvas',
description: 'Unable to export base layer',
title: t('toast.problemDownloadingCanvas'),
description: t('toast.problemDownloadingCanvasDesc'),
status: 'error',
})
);
@ -29,7 +30,9 @@ export const addCanvasDownloadedAsImageListener = () => {
}
downloadBlob(blob, 'canvas.png');
dispatch(addToast({ title: 'Canvas Downloaded', status: 'success' }));
dispatch(
addToast({ title: t('toast.canvasDownloaded'), status: 'success' })
);
},
});
};

View File

@ -5,6 +5,7 @@ import { controlNetImageChanged } from 'features/controlNet/store/controlNetSlic
import { addToast } from 'features/system/store/systemSlice';
import { imagesApi } from 'services/api/endpoints/images';
import { startAppListening } from '..';
import { t } from 'i18next';
export const addCanvasImageToControlNetListener = () => {
startAppListening({
@ -19,8 +20,8 @@ export const addCanvasImageToControlNetListener = () => {
log.error('Problem getting base layer blob');
dispatch(
addToast({
title: 'Problem Saving Canvas',
description: 'Unable to export base layer',
title: t('toast.problemSavingCanvas'),
description: t('toast.problemSavingCanvasDesc'),
status: 'error',
})
);
@ -40,7 +41,7 @@ export const addCanvasImageToControlNetListener = () => {
crop_visible: true,
postUploadAction: {
type: 'TOAST',
toastOptions: { title: 'Canvas Sent to ControlNet & Assets' },
toastOptions: { title: t('toast.canvasSentControlnetAssets') },
},
})
).unwrap();

View File

@ -4,6 +4,7 @@ import { getCanvasData } from 'features/canvas/util/getCanvasData';
import { addToast } from 'features/system/store/systemSlice';
import { imagesApi } from 'services/api/endpoints/images';
import { startAppListening } from '..';
import { t } from 'i18next';
export const addCanvasMaskSavedToGalleryListener = () => {
startAppListening({
@ -30,8 +31,8 @@ export const addCanvasMaskSavedToGalleryListener = () => {
log.error('Problem getting mask layer blob');
dispatch(
addToast({
title: 'Problem Saving Mask',
description: 'Unable to export mask',
title: t('toast.problemSavingMask'),
description: t('toast.problemSavingMaskDesc'),
status: 'error',
})
);
@ -51,7 +52,7 @@ export const addCanvasMaskSavedToGalleryListener = () => {
crop_visible: true,
postUploadAction: {
type: 'TOAST',
toastOptions: { title: 'Mask Saved to Assets' },
toastOptions: { title: t('toast.maskSavedAssets') },
},
})
);

View File

@ -5,6 +5,7 @@ import { controlNetImageChanged } from 'features/controlNet/store/controlNetSlic
import { addToast } from 'features/system/store/systemSlice';
import { imagesApi } from 'services/api/endpoints/images';
import { startAppListening } from '..';
import { t } from 'i18next';
export const addCanvasMaskToControlNetListener = () => {
startAppListening({
@ -31,8 +32,8 @@ export const addCanvasMaskToControlNetListener = () => {
log.error('Problem getting mask layer blob');
dispatch(
addToast({
title: 'Problem Importing Mask',
description: 'Unable to export mask',
title: t('toast.problemImportingMask'),
description: t('toast.problemImportingMaskDesc'),
status: 'error',
})
);
@ -52,7 +53,7 @@ export const addCanvasMaskToControlNetListener = () => {
crop_visible: true,
postUploadAction: {
type: 'TOAST',
toastOptions: { title: 'Mask Sent to ControlNet & Assets' },
toastOptions: { title: t('toast.maskSentControlnetAssets') },
},
})
).unwrap();

View File

@ -6,6 +6,7 @@ import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider';
import { addToast } from 'features/system/store/systemSlice';
import { imagesApi } from 'services/api/endpoints/images';
import { startAppListening } from '..';
import { t } from 'i18next';
export const addCanvasMergedListener = () => {
startAppListening({
@ -20,8 +21,8 @@ export const addCanvasMergedListener = () => {
moduleLog.error('Problem getting base layer blob');
dispatch(
addToast({
title: 'Problem Merging Canvas',
description: 'Unable to export base layer',
title: t('toast.problemMergingCanvas'),
description: t('toast.problemMergingCanvasDesc'),
status: 'error',
})
);
@ -34,8 +35,8 @@ export const addCanvasMergedListener = () => {
moduleLog.error('Problem getting canvas base layer');
dispatch(
addToast({
title: 'Problem Merging Canvas',
description: 'Unable to export base layer',
title: t('toast.problemMergingCanvas'),
description: t('toast.problemMergingCanvasDesc'),
status: 'error',
})
);
@ -55,7 +56,7 @@ export const addCanvasMergedListener = () => {
is_intermediate: true,
postUploadAction: {
type: 'TOAST',
toastOptions: { title: 'Canvas Merged' },
toastOptions: { title: t('toast.canvasMerged') },
},
})
).unwrap();

View File

@ -4,6 +4,7 @@ import { getBaseLayerBlob } from 'features/canvas/util/getBaseLayerBlob';
import { addToast } from 'features/system/store/systemSlice';
import { imagesApi } from 'services/api/endpoints/images';
import { startAppListening } from '..';
import { t } from 'i18next';
export const addCanvasSavedToGalleryListener = () => {
startAppListening({
@ -18,8 +19,8 @@ export const addCanvasSavedToGalleryListener = () => {
log.error('Problem getting base layer blob');
dispatch(
addToast({
title: 'Problem Saving Canvas',
description: 'Unable to export base layer',
title: t('toast.problemSavingCanvas'),
description: t('toast.problemSavingCanvasDesc'),
status: 'error',
})
);
@ -39,7 +40,7 @@ export const addCanvasSavedToGalleryListener = () => {
crop_visible: true,
postUploadAction: {
type: 'TOAST',
toastOptions: { title: 'Canvas Saved to Gallery' },
toastOptions: { title: t('toast.canvasSavedGallery') },
},
})
);

View File

@ -9,9 +9,10 @@ import { omit } from 'lodash-es';
import { boardsApi } from 'services/api/endpoints/boards';
import { startAppListening } from '..';
import { imagesApi } from '../../../../../services/api/endpoints/images';
import { t } from 'i18next';
const DEFAULT_UPLOADED_TOAST: UseToastOptions = {
title: 'Image Uploaded',
title: t('toast.imageUploaded'),
status: 'success',
};
@ -57,8 +58,8 @@ export const addImageUploadedFulfilledListener = () => {
// Fall back to just the board id if we can't find the board for some reason
const board = data?.find((b) => b.board_id === autoAddBoardId);
const description = board
? `Added to board ${board.board_name}`
: `Added to board ${autoAddBoardId}`;
? `${t('toast.addedToBoard')} ${board.board_name}`
: `${t('toast.addedToBoard')} ${autoAddBoardId}`;
dispatch(
addToast({
@ -75,7 +76,7 @@ export const addImageUploadedFulfilledListener = () => {
dispatch(
addToast({
...DEFAULT_UPLOADED_TOAST,
description: 'Set as canvas initial image',
description: t('toast.setCanvasInitialImage'),
})
);
return;
@ -92,7 +93,7 @@ export const addImageUploadedFulfilledListener = () => {
dispatch(
addToast({
...DEFAULT_UPLOADED_TOAST,
description: 'Set as control image',
description: t('toast.setControlImage'),
})
);
return;
@ -103,7 +104,7 @@ export const addImageUploadedFulfilledListener = () => {
dispatch(
addToast({
...DEFAULT_UPLOADED_TOAST,
description: 'Set as initial image',
description: t('toast.setInitialImage'),
})
);
return;
@ -117,7 +118,7 @@ export const addImageUploadedFulfilledListener = () => {
dispatch(
addToast({
...DEFAULT_UPLOADED_TOAST,
description: `Set as node field ${fieldName}`,
description: `${t('toast.setNodeField')} ${fieldName}`,
})
);
return;
@ -140,7 +141,7 @@ export const addImageUploadedRejectedListener = () => {
log.error({ ...sanitizedData }, 'Image upload failed');
dispatch(
addToast({
title: 'Image Upload Failed',
title: t('toast.imageUploadFailed'),
description: action.error.message,
status: 'error',
})

View File

@ -14,6 +14,7 @@ import { addToast } from 'features/system/store/systemSlice';
import { makeToast } from 'features/system/util/makeToast';
import { forEach } from 'lodash-es';
import { startAppListening } from '..';
import { t } from 'i18next';
export const addModelSelectedListener = () => {
startAppListening({
@ -67,7 +68,9 @@ export const addModelSelectedListener = () => {
dispatch(
addToast(
makeToast({
title: `Base model changed, cleared ${modelsCleared} incompatible submodel${
title: `${t(
'toast.baseModelChangedCleared'
)} ${modelsCleared} ${t('toast.incompatibleSubmodel')}${
modelsCleared === 1 ? '' : 's'
}`,
status: 'warning',

View File

@ -2,6 +2,7 @@ import { stagingAreaImageSaved } from 'features/canvas/store/actions';
import { addToast } from 'features/system/store/systemSlice';
import { imagesApi } from 'services/api/endpoints/images';
import { startAppListening } from '..';
import { t } from 'i18next';
export const addStagingAreaImageSavedListener = () => {
startAppListening({
@ -28,11 +29,11 @@ export const addStagingAreaImageSavedListener = () => {
})
);
}
dispatch(addToast({ title: 'Image Saved', status: 'success' }));
dispatch(addToast({ title: t('toast.imageSaved'), status: 'success' }));
} catch (error) {
dispatch(
addToast({
title: 'Image Saving Failed',
title: t('toast.imageSavingFailed'),
description: (error as Error)?.message,
status: 'error',
})

View File

@ -7,6 +7,7 @@ import { addToast } from 'features/system/store/systemSlice';
import { makeToast } from 'features/system/util/makeToast';
import { setActiveTab } from 'features/ui/store/uiSlice';
import { startAppListening } from '..';
import { t } from 'i18next';
export const addWorkflowLoadedListener = () => {
startAppListening({
@ -27,7 +28,7 @@ export const addWorkflowLoadedListener = () => {
dispatch(
addToast(
makeToast({
title: 'Workflow Loaded',
title: t('toast.workflowLoaded'),
status: 'success',
})
)
@ -36,7 +37,7 @@ export const addWorkflowLoadedListener = () => {
dispatch(
addToast(
makeToast({
title: 'Workflow Loaded with Warnings',
title: t('toast.loadedWithWarnings'),
status: 'warning',
})
)

View File

@ -1,5 +1,5 @@
import { FieldType, FieldUIConfig } from './types';
import i18n from 'i18next';
import { t } from 'i18next';
export const HANDLE_TOOLTIP_OPEN_DELAY = 500;
export const COLOR_TOKEN_VALUE = 500;
@ -103,73 +103,73 @@ export const isPolymorphicItemType = (
export const FIELDS: Record<FieldType, FieldUIConfig> = {
boolean: {
color: 'green.500',
description: i18n.t('nodes.booleanDescription'),
title: i18n.t('nodes.boolean'),
description: t('nodes.booleanDescription'),
title: t('nodes.boolean'),
},
BooleanCollection: {
color: 'green.500',
description: i18n.t('nodes.booleanCollectionDescription'),
title: i18n.t('nodes.booleanCollection'),
description: t('nodes.booleanCollectionDescription'),
title: t('nodes.booleanCollection'),
},
BooleanPolymorphic: {
color: 'green.500',
description: i18n.t('nodes.booleanPolymorphicDescription'),
title: i18n.t('nodes.booleanPolymorphic'),
description: t('nodes.booleanPolymorphicDescription'),
title: t('nodes.booleanPolymorphic'),
},
ClipField: {
color: 'green.500',
description: i18n.t('nodes.clipFieldDescription'),
title: i18n.t('nodes.clipField'),
description: t('nodes.clipFieldDescription'),
title: t('nodes.clipField'),
},
Collection: {
color: 'base.500',
description: i18n.t('nodes.collectionDescription'),
title: i18n.t('nodes.collection'),
description: t('nodes.collectionDescription'),
title: t('nodes.collection'),
},
CollectionItem: {
color: 'base.500',
description: i18n.t('nodes.collectionItemDescription'),
title: i18n.t('nodes.collectionItem'),
description: t('nodes.collectionItemDescription'),
title: t('nodes.collectionItem'),
},
ColorCollection: {
color: 'pink.300',
description: i18n.t('nodes.colorCollectionDescription'),
title: i18n.t('nodes.colorCollection'),
description: t('nodes.colorCollectionDescription'),
title: t('nodes.colorCollection'),
},
ColorField: {
color: 'pink.300',
description: i18n.t('nodes.colorFieldDescription'),
title: i18n.t('nodes.colorField'),
description: t('nodes.colorFieldDescription'),
title: t('nodes.colorField'),
},
ColorPolymorphic: {
color: 'pink.300',
description: i18n.t('nodes.colorPolymorphicDescription'),
title: i18n.t('nodes.colorPolymorphic'),
description: t('nodes.colorPolymorphicDescription'),
title: t('nodes.colorPolymorphic'),
},
ConditioningCollection: {
color: 'cyan.500',
description: i18n.t('nodes.conditioningCollectionDescription'),
title: i18n.t('nodes.conditioningCollection'),
description: t('nodes.conditioningCollectionDescription'),
title: t('nodes.conditioningCollection'),
},
ConditioningField: {
color: 'cyan.500',
description: i18n.t('nodes.conditioningFieldDescription'),
title: i18n.t('nodes.conditioningField'),
description: t('nodes.conditioningFieldDescription'),
title: t('nodes.conditioningField'),
},
ConditioningPolymorphic: {
color: 'cyan.500',
description: i18n.t('nodes.conditioningPolymorphicDescription'),
title: i18n.t('nodes.conditioningPolymorphic'),
description: t('nodes.conditioningPolymorphicDescription'),
title: t('nodes.conditioningPolymorphic'),
},
ControlCollection: {
color: 'teal.500',
description: i18n.t('nodes.controlCollectionDescription'),
title: i18n.t('nodes.controlCollection'),
description: t('nodes.controlCollectionDescription'),
title: t('nodes.controlCollection'),
},
ControlField: {
color: 'teal.500',
description: i18n.t('nodes.controlFieldDescription'),
title: i18n.t('nodes.controlField'),
description: t('nodes.controlFieldDescription'),
title: t('nodes.controlField'),
},
ControlNetModelField: {
color: 'teal.500',
@ -183,132 +183,132 @@ export const FIELDS: Record<FieldType, FieldUIConfig> = {
},
DenoiseMaskField: {
color: 'blue.300',
description: i18n.t('nodes.denoiseMaskFieldDescription'),
title: i18n.t('nodes.denoiseMaskField'),
description: t('nodes.denoiseMaskFieldDescription'),
title: t('nodes.denoiseMaskField'),
},
enum: {
color: 'blue.500',
description: i18n.t('nodes.enumDescription'),
title: i18n.t('nodes.enum'),
description: t('nodes.enumDescription'),
title: t('nodes.enum'),
},
float: {
color: 'orange.500',
description: i18n.t('nodes.floatDescription'),
title: i18n.t('nodes.float'),
description: t('nodes.floatDescription'),
title: t('nodes.float'),
},
FloatCollection: {
color: 'orange.500',
description: i18n.t('nodes.floatCollectionDescription'),
title: i18n.t('nodes.floatCollection'),
description: t('nodes.floatCollectionDescription'),
title: t('nodes.floatCollection'),
},
FloatPolymorphic: {
color: 'orange.500',
description: i18n.t('nodes.floatPolymorphicDescription'),
title: i18n.t('nodes.floatPolymorphic'),
description: t('nodes.floatPolymorphicDescription'),
title: t('nodes.floatPolymorphic'),
},
ImageCollection: {
color: 'purple.500',
description: i18n.t('nodes.imageCollectionDescription'),
title: i18n.t('nodes.imageCollection'),
description: t('nodes.imageCollectionDescription'),
title: t('nodes.imageCollection'),
},
ImageField: {
color: 'purple.500',
description: i18n.t('nodes.imageFieldDescription'),
title: i18n.t('nodes.imageField'),
description: t('nodes.imageFieldDescription'),
title: t('nodes.imageField'),
},
ImagePolymorphic: {
color: 'purple.500',
description: i18n.t('nodes.imagePolymorphicDescription'),
title: i18n.t('nodes.imagePolymorphic'),
description: t('nodes.imagePolymorphicDescription'),
title: t('nodes.imagePolymorphic'),
},
integer: {
color: 'red.500',
description: i18n.t('nodes.integerDescription'),
title: i18n.t('nodes.integer'),
description: t('nodes.integerDescription'),
title: t('nodes.integer'),
},
IntegerCollection: {
color: 'red.500',
description: i18n.t('nodes.integerCollectionDescription'),
title: i18n.t('nodes.integerCollection'),
description: t('nodes.integerCollectionDescription'),
title: t('nodes.integerCollection'),
},
IntegerPolymorphic: {
color: 'red.500',
description: i18n.t('nodes.integerPolymorphicDescription'),
title: i18n.t('nodes.integerPolymorphic'),
description: t('nodes.integerPolymorphicDescription'),
title: t('nodes.integerPolymorphic'),
},
LatentsCollection: {
color: 'pink.500',
description: i18n.t('nodes.latentsCollectionDescription'),
title: i18n.t('nodes.latentsCollection'),
description: t('nodes.latentsCollectionDescription'),
title: t('nodes.latentsCollection'),
},
LatentsField: {
color: 'pink.500',
description: i18n.t('nodes.latentsFieldDescription'),
title: i18n.t('nodes.latentsField'),
description: t('nodes.latentsFieldDescription'),
title: t('nodes.latentsField'),
},
LatentsPolymorphic: {
color: 'pink.500',
description: i18n.t('nodes.latentsPolymorphicDescription'),
title: i18n.t('nodes.latentsPolymorphic'),
description: t('nodes.latentsPolymorphicDescription'),
title: t('nodes.latentsPolymorphic'),
},
LoRAModelField: {
color: 'teal.500',
description: i18n.t('nodes.loRAModelFieldDescription'),
title: i18n.t('nodes.loRAModelField'),
description: t('nodes.loRAModelFieldDescription'),
title: t('nodes.loRAModelField'),
},
MainModelField: {
color: 'teal.500',
description: i18n.t('nodes.mainModelFieldDescription'),
title: i18n.t('nodes.mainModelField'),
description: t('nodes.mainModelFieldDescription'),
title: t('nodes.mainModelField'),
},
ONNXModelField: {
color: 'teal.500',
description: i18n.t('nodes.oNNXModelFieldDescription'),
title: i18n.t('nodes.oNNXModelField'),
description: t('nodes.oNNXModelFieldDescription'),
title: t('nodes.oNNXModelField'),
},
Scheduler: {
color: 'base.500',
description: i18n.t('nodes.schedulerDescription'),
title: i18n.t('nodes.scheduler'),
description: t('nodes.schedulerDescription'),
title: t('nodes.scheduler'),
},
SDXLMainModelField: {
color: 'teal.500',
description: i18n.t('nodes.sDXLMainModelFieldDescription'),
title: i18n.t('nodes.sDXLMainModelField'),
description: t('nodes.sDXLMainModelFieldDescription'),
title: t('nodes.sDXLMainModelField'),
},
SDXLRefinerModelField: {
color: 'teal.500',
description: i18n.t('nodes.sDXLRefinerModelFieldDescription'),
title: i18n.t('nodes.sDXLRefinerModelField'),
description: t('nodes.sDXLRefinerModelFieldDescription'),
title: t('nodes.sDXLRefinerModelField'),
},
string: {
color: 'yellow.500',
description: i18n.t('nodes.stringDescription'),
title: i18n.t('nodes.string'),
description: t('nodes.stringDescription'),
title: t('nodes.string'),
},
StringCollection: {
color: 'yellow.500',
description: i18n.t('nodes.stringCollectionDescription'),
title: i18n.t('nodes.stringCollection'),
description: t('nodes.stringCollectionDescription'),
title: t('nodes.stringCollection'),
},
StringPolymorphic: {
color: 'yellow.500',
description: i18n.t('nodes.stringPolymorphicDescription'),
title: i18n.t('nodes.stringPolymorphic'),
description: t('nodes.stringPolymorphicDescription'),
title: t('nodes.stringPolymorphic'),
},
UNetField: {
color: 'red.500',
description: i18n.t('nodes.uNetFieldDescription'),
title: i18n.t('nodes.uNetField'),
description: t('nodes.uNetFieldDescription'),
title: t('nodes.uNetField'),
},
VaeField: {
color: 'blue.500',
description: i18n.t('nodes.vaeFieldDescription'),
title: i18n.t('nodes.vaeField'),
description: t('nodes.vaeFieldDescription'),
title: t('nodes.vaeField'),
},
VaeModelField: {
color: 'teal.500',
description: i18n.t('nodes.vaeModelFieldDescription'),
title: i18n.t('nodes.vaeModelField'),
description: t('nodes.vaeModelFieldDescription'),
title: t('nodes.vaeModelField'),
},
};

View File

@ -9,7 +9,6 @@ import { buildCanvasSDXLInpaintGraph } from './buildCanvasSDXLInpaintGraph';
import { buildCanvasSDXLOutpaintGraph } from './buildCanvasSDXLOutpaintGraph';
import { buildCanvasSDXLTextToImageGraph } from './buildCanvasSDXLTextToImageGraph';
import { buildCanvasTextToImageGraph } from './buildCanvasTextToImageGraph';
import i18n from 'i18next';
export const buildCanvasGraph = (
state: RootState,
@ -30,7 +29,7 @@ export const buildCanvasGraph = (
}
} else if (generationMode === 'img2img') {
if (!canvasInitImage) {
throw new Error(i18n.t('nodes.missingCanvaInitImage'));
throw new Error('Missing canvas init image');
}
if (
state.generation.model &&
@ -42,7 +41,7 @@ export const buildCanvasGraph = (
}
} else if (generationMode === 'inpaint') {
if (!canvasInitImage || !canvasMaskImage) {
throw new Error(i18n.t('nodes.missingCanvaInitMaskImages'));
throw new Error('Missing canvas init and mask images');
}
if (
state.generation.model &&
@ -58,7 +57,7 @@ export const buildCanvasGraph = (
}
} else {
if (!canvasInitImage) {
throw new Error(i18n.t('nodes.missingCanvaInitImage'));
throw new Error('Missing canvas init image');
}
if (
state.generation.model &&
@ -75,4 +74,4 @@ export const buildCanvasGraph = (
}
return graph;
};
};

View File

@ -25,7 +25,6 @@ import {
POSITIVE_CONDITIONING,
SEAMLESS,
} from './constants';
import i18n from 'i18next';
/**
* Builds the Canvas tab's Image to Image graph.
@ -67,8 +66,8 @@ export const buildCanvasImageToImageGraph = (
);
if (!model) {
log.error(i18n.t('nodes.noModelFoundState'));
throw new Error(i18n.t('nodes.noModelFoundState'));
log.error('No model found in state');
throw new Error('No model found in state');
}
let modelLoaderNodeId = MAIN_MODEL_LOADER;

View File

@ -44,7 +44,6 @@ import {
RANGE_OF_SIZE,
SEAMLESS,
} from './constants';
import i18n from 'i18next';
/**
* Builds the Canvas tab's Inpaint graph.
@ -80,8 +79,8 @@ export const buildCanvasInpaintGraph = (
} = state.generation;
if (!model) {
log.error(i18n.t('nodes.noImageFoundState'));
throw new Error(i18n.t('nodes.noImageFoundState'));
log.error('No Image found in state');
throw new Error('No Image found in state');
}
// The bounding box determines width and height, not the width and height params

View File

@ -46,7 +46,6 @@ import {
RANGE_OF_SIZE,
SEAMLESS,
} from './constants';
import i18n from 'i18next';
/**
* Builds the Canvas tab's Outpaint graph.
@ -84,8 +83,8 @@ export const buildCanvasOutpaintGraph = (
} = state.generation;
if (!model) {
log.error(i18n.t('nodes.noImageFoundState'));
throw new Error(i18n.t('nodes.noImageFoundState'));
log.error('No model found in state');
throw new Error('No model found in state');
}
// The bounding box determines width and height, not the width and height params
@ -851,4 +850,4 @@ export const buildCanvasOutpaintGraph = (
}
return graph;
};
};

View File

@ -27,7 +27,6 @@ import {
SEAMLESS,
} from './constants';
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
import i18n from 'i18next';
/**
* Builds the Canvas tab's Image to Image graph.
@ -75,8 +74,8 @@ export const buildCanvasSDXLImageToImageGraph = (
);
if (!model) {
log.error(i18n.t('nodes.noModelFoundState'));
throw new Error(i18n.t('nodes.noModelFoundState'));
log.error('No model found in state');
throw new Error('No model found in state');
}
// Model Loader ID

View File

@ -46,7 +46,6 @@ import {
SEAMLESS,
} from './constants';
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
import i18n from 'i18next';
/**
* Builds the Canvas tab's Inpaint graph.
@ -87,8 +86,8 @@ export const buildCanvasSDXLInpaintGraph = (
} = state.sdxl;
if (!model) {
log.error(i18n.t('nodes.noModelFoundState'));
throw new Error(i18n.t('nodes.noModelFoundState'));
log.error('No model found in state');
throw new Error('No model found in state');
}
// The bounding box determines width and height, not the width and height params

View File

@ -48,7 +48,6 @@ import {
SEAMLESS,
} from './constants';
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
import i18n from 'i18next';
/**
* Builds the Canvas tab's Outpaint graph.
@ -91,8 +90,8 @@ export const buildCanvasSDXLOutpaintGraph = (
} = state.sdxl;
if (!model) {
log.error(i18n.t('nodes.noModelFoundState'));
throw new Error(i18n.t('nodes.noModelFoundState'));
log.error('No model found in state');
throw new Error('No model found in state');
}
// The bounding box determines width and height, not the width and height params

View File

@ -29,7 +29,6 @@ import {
SEAMLESS,
} from './constants';
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
import i18n from 'i18next';
/**
* Builds the Canvas tab's Text to Image graph.
@ -72,8 +71,8 @@ export const buildCanvasSDXLTextToImageGraph = (
state.sdxl;
if (!model) {
log.error(i18n.t('nodes.noModelFoundState'));
throw new Error(i18n.t('nodes.noModelFoundState'));
log.error('No model found in state');
throw new Error('No model found in state');
}
const use_cpu = shouldUseNoiseSettings

View File

@ -27,7 +27,6 @@ import {
POSITIVE_CONDITIONING,
SEAMLESS,
} from './constants';
import i18n from 'i18next';
/**
* Builds the Canvas tab's Text to Image graph.
@ -67,8 +66,8 @@ export const buildCanvasTextToImageGraph = (
);
if (!model) {
log.error(i18n.t('nodes.noModelFoundState'));
throw new Error(i18n.t('nodes.noModelFoundState'));
log.error('No model found in state');
throw new Error('No model found in state');
}
const use_cpu = shouldUseNoiseSettings

View File

@ -27,7 +27,6 @@ import {
RESIZE,
SEAMLESS,
} from './constants';
import i18n from 'i18next';
/**
* Builds the Image to Image tab graph.
@ -76,13 +75,13 @@ export const buildLinearImageToImageGraph = (
*/
if (!initialImage) {
log.error(i18n.t('nodes.noImageFoundState'));
throw new Error(i18n.t('nodes.noImageFoundState'));
log.error('No initial image found in state');
throw new Error('No initial image found in state');
}
if (!model) {
log.error(i18n.t('nodes.noModelFoundState'));
throw new Error(i18n.t('nodes.noModelFoundState'));
log.error('No model found in state');
throw new Error('No model found in state');
}
const fp32 = vaePrecision === 'fp32';
@ -377,4 +376,4 @@ export const buildLinearImageToImageGraph = (
}
return graph;
};
};

View File

@ -29,7 +29,6 @@ import {
SEAMLESS,
} from './constants';
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
import i18n from 'i18next';
/**
* Builds the Image to Image tab graph.
@ -76,13 +75,13 @@ export const buildLinearSDXLImageToImageGraph = (
*/
if (!initialImage) {
log.error(i18n.t('nodes.noImageFoundState'));
throw new Error(i18n.t('nodes.noImageFoundState'));
log.error('No initial image found in state');
throw new Error('No initial image found in state');
}
if (!model) {
log.error(i18n.t('nodes.noModelFoundState'));
throw new Error(i18n.t('nodes.noModelFoundState'));
log.error('No model found in state');
throw new Error('No model found in state');
}
const fp32 = vaePrecision === 'fp32';
@ -400,4 +399,4 @@ export const buildLinearSDXLImageToImageGraph = (
}
return graph;
};
};

View File

@ -23,7 +23,6 @@ import {
SEAMLESS,
} from './constants';
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
import i18n from 'i18next';
export const buildLinearSDXLTextToImageGraph = (
state: RootState
@ -59,8 +58,8 @@ export const buildLinearSDXLTextToImageGraph = (
: initialGenerationState.shouldUseCpuNoise;
if (!model) {
log.error(i18n.t('nodes.noModelFoundState'));
throw new Error(i18n.t('nodes.noModelFoundState'));
log.error('No model found in state');
throw new Error('No model found in state');
}
const fp32 = vaePrecision === 'fp32';

View File

@ -26,7 +26,6 @@ import {
SEAMLESS,
TEXT_TO_IMAGE_GRAPH,
} from './constants';
import i18n from 'i18next';
export const buildLinearTextToImageGraph = (
state: RootState
@ -54,8 +53,8 @@ export const buildLinearTextToImageGraph = (
: initialGenerationState.shouldUseCpuNoise;
if (!model) {
log.error(i18n.t('nodes.noModelFoundState'));
throw new Error(i18n.t('nodes.noModelFoundState'));
log.error('No model found in state');
throw new Error('No model found in state');
}
const fp32 = vaePrecision === 'fp32';