mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-01-15 06:18:03 -05:00
fix(ui): upscale builder
This commit is contained in:
committed by
Mary Hipp Rogers
parent
871271fde5
commit
273dfd86ab
@@ -18,9 +18,17 @@ export const addEnqueueRequestedUpscale = (startAppListening: AppStartListening)
|
||||
const state = getState();
|
||||
const { prepend } = action.payload;
|
||||
|
||||
const { g, noise, posCond } = await buildMultidiffusionUpscaleGraph(state);
|
||||
const { g, seedFieldIdentifier, positivePromptFieldIdentifier } = await buildMultidiffusionUpscaleGraph(state);
|
||||
|
||||
const batchConfig = prepareLinearUIBatch(state, g, prepend, noise, posCond, 'upscaling', 'gallery');
|
||||
const batchConfig = prepareLinearUIBatch(
|
||||
state,
|
||||
g,
|
||||
prepend,
|
||||
seedFieldIdentifier,
|
||||
positivePromptFieldIdentifier,
|
||||
'upscaling',
|
||||
'gallery'
|
||||
);
|
||||
|
||||
const req = dispatch(queueApi.endpoints.enqueueBatch.initiate(batchConfig, enqueueMutationFixedCacheKeyOptions));
|
||||
try {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { RootState } from 'app/store/store';
|
||||
import { getPrefixedId } from 'features/controlLayers/konva/util';
|
||||
import { fetchModelConfigWithTypeGuard } from 'features/metadata/util/modelFetchingHelpers';
|
||||
import type { FieldIdentifier } from 'features/nodes/types/field';
|
||||
import { addSDXLLoRAs } from 'features/nodes/util/graph/generation/addSDXLLoRAs';
|
||||
import { Graph } from 'features/nodes/util/graph/generation/Graph';
|
||||
import type { Invocation } from 'services/api/types';
|
||||
import { isNonRefinerMainModelConfig, isSpandrelImageToImageModelConfig } from 'services/api/types';
|
||||
import { assert } from 'tsafe';
|
||||
|
||||
@@ -12,7 +12,7 @@ import { getBoardField, selectPresetModifiedPrompts } from './graphBuilderUtils'
|
||||
|
||||
export const buildMultidiffusionUpscaleGraph = async (
|
||||
state: RootState
|
||||
): Promise<{ g: Graph; noise: Invocation<'noise'>; posCond: Invocation<'compel' | 'sdxl_compel_prompt'> }> => {
|
||||
): Promise<{ g: Graph; seedFieldIdentifier: FieldIdentifier; positivePromptFieldIdentifier: FieldIdentifier }> => {
|
||||
const {
|
||||
model,
|
||||
upscaleCfgScale: cfg_scale,
|
||||
@@ -243,5 +243,9 @@ export const buildMultidiffusionUpscaleGraph = async (
|
||||
|
||||
g.addEdge(controlNetCollector, 'collection', tiledMultidiffusion, 'control');
|
||||
|
||||
return { g, noise, posCond };
|
||||
return {
|
||||
g,
|
||||
seedFieldIdentifier: { nodeId: noise.id, fieldName: 'seed' },
|
||||
positivePromptFieldIdentifier: { nodeId: posCond.id, fieldName: 'prompt' },
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user