fix(ui): use style preset prompts correctly

This commit is contained in:
psychedelicious 2024-08-17 16:18:01 +10:00
parent 533dd221f8
commit 1ea8aafca1
2 changed files with 4 additions and 6 deletions

View File

@ -28,7 +28,7 @@ import { addSeamless } from 'features/nodes/util/graph/generation/addSeamless';
import { addTextToImage } from 'features/nodes/util/graph/generation/addTextToImage';
import { addWatermarker } from 'features/nodes/util/graph/generation/addWatermarker';
import { Graph } from 'features/nodes/util/graph/generation/Graph';
import { getBoardField, getSizes } from 'features/nodes/util/graph/graphBuilderUtils';
import { getBoardField, getPresetModifiedPrompts, getSizes } from 'features/nodes/util/graph/graphBuilderUtils';
import type { Invocation } from 'services/api/types';
import { isNonRefinerMainModelConfig } from 'services/api/types';
import { assert } from 'tsafe';
@ -53,12 +53,12 @@ export const buildSD1Graph = async (state: RootState, manager: CanvasManager): P
vaePrecision,
seed,
vae,
positivePrompt,
negativePrompt,
} = params;
assert(model, 'No model found in state');
const { positivePrompt, negativePrompt } = getPresetModifiedPrompts(state);
const { originalSize, scaledSize } = getSizes(bbox);
const g = new Graph(CONTROL_LAYERS_GRAPH);

View File

@ -51,8 +51,6 @@ export const buildSDXLGraph = async (state: RootState, manager: CanvasManager):
shouldUseCpuNoise,
vaePrecision,
vae,
positivePrompt,
negativePrompt,
refinerModel,
refinerStart,
} = params;
@ -61,7 +59,7 @@ export const buildSDXLGraph = async (state: RootState, manager: CanvasManager):
const { originalSize, scaledSize } = getSizes(bbox);
const { positiveStylePrompt, negativeStylePrompt } = getPresetModifiedPrompts(state);
const { positivePrompt, negativePrompt, positiveStylePrompt, negativeStylePrompt } = getPresetModifiedPrompts(state);
const g = new Graph(SDXL_CONTROL_LAYERS_GRAPH);
const modelLoader = g.addNode({