diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/buildMultidiffusionUpscaleGraph.ts b/invokeai/frontend/web/src/features/nodes/util/graph/buildMultidiffusionUpscaleGraph.ts index 77c757bb57..f6eb4cbad5 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/buildMultidiffusionUpscaleGraph.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/buildMultidiffusionUpscaleGraph.ts @@ -1,13 +1,11 @@ import type { RootState } from 'app/store/store'; import type { GraphType } from 'features/nodes/util/graph/generation/Graph'; import { Graph } from 'features/nodes/util/graph/generation/Graph'; -import { isParamESRGANModelName } from 'features/parameters/store/postprocessingSlice'; import { assert } from 'tsafe'; import { CLIP_SKIP, CONTROL_NET_COLLECT, - ESRGAN, IMAGE_TO_LATENTS, LATENTS_TO_IMAGE, MAIN_MODEL_LOADER, @@ -16,6 +14,7 @@ import { POSITIVE_CONDITIONING, RESIZE, SDXL_MODEL_LOADER, + SPANDREL, TILED_MULTI_DIFFUSION_DENOISE_LATENTS, UNSHARP_MASK, VAE_LOADER, @@ -33,7 +32,6 @@ export const buildMultidiffusionUpscsaleGraph = async (state: RootState): Promis assert(model, 'No model found in state'); assert(upscaleModel, 'No upscale model found in state'); assert(upscaleInitialImage, 'No initial image found in state'); - assert(isParamESRGANModelName(upscaleModel.name), 'Model must be valid upscale model'); assert(scale, 'Scale is required'); assert(tileControlnetModel, 'Tile controlnet is required'); @@ -48,9 +46,9 @@ export const buildMultidiffusionUpscsaleGraph = async (state: RootState): Promis }); const upscaleNode = g.addNode({ - id: ESRGAN, - type: 'esrgan', - model_name: upscaleModel.name, + id: SPANDREL, + type: 'spandrel_image_to_image', + image_to_image_model: upscaleModel, tile_size: 500, }); diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/constants.ts b/invokeai/frontend/web/src/features/nodes/util/graph/constants.ts index b08ed5365a..200b8305e3 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/constants.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/constants.ts @@ -37,6 +37,7 @@ export const IP_ADAPTER_COLLECT = 'ip_adapter_collect'; export const T2I_ADAPTER_COLLECT = 't2i_adapter_collect'; export const METADATA = 'core_metadata'; export const ESRGAN = 'esrgan'; +export const SPANDREL = 'spandrel'; export const SDXL_MODEL_LOADER = 'sdxl_model_loader'; export const SDXL_DENOISE_LATENTS = 'sdxl_denoise_latents'; export const SDXL_REFINER_MODEL_LOADER = 'sdxl_refiner_model_loader';