mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
revert(ui): restore metadata parsers for created_by
This commit is contained in:
parent
aa2c404cab
commit
acca197893
@ -174,6 +174,7 @@ const buildHandlers: BuildMetadataHandlers = ({
|
||||
|
||||
export const handlers = {
|
||||
// Misc
|
||||
createdBy: buildHandlers({ getLabel: () => t('metadata.createdBy'), parser: parsers.createdBy }),
|
||||
generationMode: buildHandlers({ getLabel: () => t('metadata.generationMode'), parser: parsers.generationMode }),
|
||||
|
||||
// Core parameters
|
||||
|
@ -108,6 +108,8 @@ const getProperty = <T = unknown>(
|
||||
});
|
||||
};
|
||||
|
||||
const parseCreatedBy: MetadataParseFunc<string> = (metadata) => getProperty(metadata, 'created_by', isString);
|
||||
|
||||
const parseGenerationMode: MetadataParseFunc<string> = (metadata) => getProperty(metadata, 'generation_mode', isString);
|
||||
|
||||
const parsePositivePrompt: MetadataParseFunc<ParameterPositivePrompt> = (metadata) =>
|
||||
@ -389,6 +391,7 @@ const parseAllIPAdapters: MetadataParseFunc<IPAdapterConfigMetadata[]> = async (
|
||||
};
|
||||
|
||||
export const parsers = {
|
||||
createdBy: parseCreatedBy,
|
||||
generationMode: parseGenerationMode,
|
||||
positivePrompt: parsePositivePrompt,
|
||||
negativePrompt: parseNegativePrompt,
|
||||
|
Loading…
Reference in New Issue
Block a user