fix(nodes): fix missing generation modes

Lax typing on the metadata util functions allowed a typing issue to slip through. Fixed the lax typing, updated core metadata node.
This commit is contained in:
psychedelicious
2023-10-20 16:22:56 +11:00
parent 7b066681f0
commit 8615d53e65
4 changed files with 126 additions and 40 deletions

View File

@ -7,7 +7,7 @@ import {
SaveImageInvocation,
} from 'services/api/types';
import { REALESRGAN as ESRGAN, SAVE_IMAGE } from './constants';
import { addCoreMetadataNode } from './metadata';
import { addCoreMetadataNode, upsertMetadata } from './metadata';
type Arg = {
image_name: string;
@ -56,7 +56,8 @@ export const buildAdHocUpscaleGraph = ({
],
};
addCoreMetadataNode(graph, {
addCoreMetadataNode(graph, {});
upsertMetadata(graph, {
esrgan_model: esrganModelName,
});

View File

@ -5,7 +5,7 @@ import { METADATA, SAVE_IMAGE } from './constants';
export const addCoreMetadataNode = (
graph: NonNullableGraph,
metadata: Partial<CoreMetadataInvocation> | JsonObject
metadata: Partial<CoreMetadataInvocation>
): void => {
graph.nodes[METADATA] = {
id: METADATA,