mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): use spandrel node for upscaling
This commit is contained in:
parent
3126e8e49a
commit
d0265e21b0
@ -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,
|
||||
});
|
||||
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user