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

@ -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';