mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Revert some test Changes
This commit is contained in:
parent
368bd6f778
commit
54dc912c83
@ -7,7 +7,6 @@ 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
|
||||||
@ -24,7 +23,7 @@ export const getMetadataAndWorkflowFromImageBlob = async (
|
|||||||
} else {
|
} else {
|
||||||
logger('system').error(
|
logger('system').error(
|
||||||
{ error: parseify(metadataResult.error) },
|
{ error: parseify(metadataResult.error) },
|
||||||
i18n.t('nodes.problemReadingMetadata')
|
'Problem reading metadata from image'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -37,7 +36,7 @@ export const getMetadataAndWorkflowFromImageBlob = async (
|
|||||||
} else {
|
} else {
|
||||||
logger('system').error(
|
logger('system').error(
|
||||||
{ error: parseify(workflowResult.error) },
|
{ error: parseify(workflowResult.error) },
|
||||||
i18n.t('nodes.problemReadingWorkflow')
|
'Problem reading workflow from image'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@ 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'];
|
||||||
@ -98,7 +97,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) },
|
||||||
i18n.t('nodes.skippedReservedInput')
|
'Skipped reserved input field'
|
||||||
);
|
);
|
||||||
return inputsAccumulator;
|
return inputsAccumulator;
|
||||||
}
|
}
|
||||||
@ -106,7 +105,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) },
|
||||||
i18n.t('nodes.unhandledInputProperty')
|
'Unhandled input property'
|
||||||
);
|
);
|
||||||
return inputsAccumulator;
|
return inputsAccumulator;
|
||||||
}
|
}
|
||||||
@ -121,7 +120,7 @@ export const parseSchema = (
|
|||||||
fieldType,
|
fieldType,
|
||||||
field: parseify(property),
|
field: parseify(property),
|
||||||
},
|
},
|
||||||
i18n.t('nodes.skippingUnknownInputType')
|
'Skipping unknown input field type'
|
||||||
);
|
);
|
||||||
return inputsAccumulator;
|
return inputsAccumulator;
|
||||||
}
|
}
|
||||||
@ -134,7 +133,7 @@ export const parseSchema = (
|
|||||||
fieldType,
|
fieldType,
|
||||||
field: parseify(property),
|
field: parseify(property),
|
||||||
},
|
},
|
||||||
i18n.t('nodes.skippingReservedFieldType')
|
'Skipping reserved field type'
|
||||||
);
|
);
|
||||||
return inputsAccumulator;
|
return inputsAccumulator;
|
||||||
}
|
}
|
||||||
@ -154,7 +153,7 @@ export const parseSchema = (
|
|||||||
fieldType,
|
fieldType,
|
||||||
field: parseify(property),
|
field: parseify(property),
|
||||||
},
|
},
|
||||||
i18n.t('nodes.skippingInputNoTemplate')
|
'Skipping input field with no template'
|
||||||
);
|
);
|
||||||
return inputsAccumulator;
|
return inputsAccumulator;
|
||||||
}
|
}
|
||||||
@ -170,24 +169,21 @@ export const parseSchema = (
|
|||||||
if (!outputSchemaName) {
|
if (!outputSchemaName) {
|
||||||
logger('nodes').warn(
|
logger('nodes').warn(
|
||||||
{ outputRefObject: parseify(schema.output) },
|
{ outputRefObject: parseify(schema.output) },
|
||||||
i18n.t('nodes.noOutputSchemaName')
|
'No output schema name found in ref object'
|
||||||
);
|
);
|
||||||
return invocationsAccumulator;
|
return invocationsAccumulator;
|
||||||
}
|
}
|
||||||
|
|
||||||
const outputSchema = openAPI.components?.schemas?.[outputSchemaName];
|
const outputSchema = openAPI.components?.schemas?.[outputSchemaName];
|
||||||
if (!outputSchema) {
|
if (!outputSchema) {
|
||||||
logger('nodes').warn(
|
logger('nodes').warn({ outputSchemaName }, 'Output schema not found');
|
||||||
{ 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) },
|
||||||
i18n.t('nodes.invalidOutputSchema')
|
'Invalid output schema'
|
||||||
);
|
);
|
||||||
return invocationsAccumulator;
|
return invocationsAccumulator;
|
||||||
}
|
}
|
||||||
@ -200,7 +196,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) },
|
||||||
i18n.t('nodes.skippedReservedOutput')
|
'Skipped reserved output field'
|
||||||
);
|
);
|
||||||
return outputsAccumulator;
|
return outputsAccumulator;
|
||||||
}
|
}
|
||||||
@ -208,7 +204,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) },
|
||||||
i18n.t('nodes.unhandledOutputProperty')
|
'Unhandled output property'
|
||||||
);
|
);
|
||||||
return outputsAccumulator;
|
return outputsAccumulator;
|
||||||
}
|
}
|
||||||
@ -218,7 +214,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) },
|
||||||
i18n.t('nodes.skippingUnknownOutputType')
|
'Skipping unknown output field type'
|
||||||
);
|
);
|
||||||
return outputsAccumulator;
|
return outputsAccumulator;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user