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 { RootState } from 'app/store/store';
|
||||||
import type { GraphType } from 'features/nodes/util/graph/generation/Graph';
|
import type { GraphType } from 'features/nodes/util/graph/generation/Graph';
|
||||||
import { Graph } 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 { assert } from 'tsafe';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
CLIP_SKIP,
|
CLIP_SKIP,
|
||||||
CONTROL_NET_COLLECT,
|
CONTROL_NET_COLLECT,
|
||||||
ESRGAN,
|
|
||||||
IMAGE_TO_LATENTS,
|
IMAGE_TO_LATENTS,
|
||||||
LATENTS_TO_IMAGE,
|
LATENTS_TO_IMAGE,
|
||||||
MAIN_MODEL_LOADER,
|
MAIN_MODEL_LOADER,
|
||||||
@ -16,6 +14,7 @@ import {
|
|||||||
POSITIVE_CONDITIONING,
|
POSITIVE_CONDITIONING,
|
||||||
RESIZE,
|
RESIZE,
|
||||||
SDXL_MODEL_LOADER,
|
SDXL_MODEL_LOADER,
|
||||||
|
SPANDREL,
|
||||||
TILED_MULTI_DIFFUSION_DENOISE_LATENTS,
|
TILED_MULTI_DIFFUSION_DENOISE_LATENTS,
|
||||||
UNSHARP_MASK,
|
UNSHARP_MASK,
|
||||||
VAE_LOADER,
|
VAE_LOADER,
|
||||||
@ -33,7 +32,6 @@ export const buildMultidiffusionUpscsaleGraph = async (state: RootState): Promis
|
|||||||
assert(model, 'No model found in state');
|
assert(model, 'No model found in state');
|
||||||
assert(upscaleModel, 'No upscale model found in state');
|
assert(upscaleModel, 'No upscale model found in state');
|
||||||
assert(upscaleInitialImage, 'No initial image 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(scale, 'Scale is required');
|
||||||
assert(tileControlnetModel, 'Tile controlnet is required');
|
assert(tileControlnetModel, 'Tile controlnet is required');
|
||||||
|
|
||||||
@ -48,9 +46,9 @@ export const buildMultidiffusionUpscsaleGraph = async (state: RootState): Promis
|
|||||||
});
|
});
|
||||||
|
|
||||||
const upscaleNode = g.addNode({
|
const upscaleNode = g.addNode({
|
||||||
id: ESRGAN,
|
id: SPANDREL,
|
||||||
type: 'esrgan',
|
type: 'spandrel_image_to_image',
|
||||||
model_name: upscaleModel.name,
|
image_to_image_model: upscaleModel,
|
||||||
tile_size: 500,
|
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 T2I_ADAPTER_COLLECT = 't2i_adapter_collect';
|
||||||
export const METADATA = 'core_metadata';
|
export const METADATA = 'core_metadata';
|
||||||
export const ESRGAN = 'esrgan';
|
export const ESRGAN = 'esrgan';
|
||||||
|
export const SPANDREL = 'spandrel';
|
||||||
export const SDXL_MODEL_LOADER = 'sdxl_model_loader';
|
export const SDXL_MODEL_LOADER = 'sdxl_model_loader';
|
||||||
export const SDXL_DENOISE_LATENTS = 'sdxl_denoise_latents';
|
export const SDXL_DENOISE_LATENTS = 'sdxl_denoise_latents';
|
||||||
export const SDXL_REFINER_MODEL_LOADER = 'sdxl_refiner_model_loader';
|
export const SDXL_REFINER_MODEL_LOADER = 'sdxl_refiner_model_loader';
|
||||||
|
Loading…
Reference in New Issue
Block a user