fix(ui): use style preset prompts correctly

This commit is contained in:
psychedelicious 2024-08-17 16:18:01 +10:00
parent 8601fbb4ea
commit 4a355323b2
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 { addTextToImage } from 'features/nodes/util/graph/generation/addTextToImage';
import { addWatermarker } from 'features/nodes/util/graph/generation/addWatermarker'; import { addWatermarker } from 'features/nodes/util/graph/generation/addWatermarker';
import { Graph } from 'features/nodes/util/graph/generation/Graph'; 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 type { Invocation } from 'services/api/types';
import { isNonRefinerMainModelConfig } from 'services/api/types'; import { isNonRefinerMainModelConfig } from 'services/api/types';
import { assert } from 'tsafe'; import { assert } from 'tsafe';
@ -53,12 +53,12 @@ export const buildSD1Graph = async (state: RootState, manager: CanvasManager): P
vaePrecision, vaePrecision,
seed, seed,
vae, vae,
positivePrompt,
negativePrompt,
} = params; } = params;
assert(model, 'No model found in state'); assert(model, 'No model found in state');
const { positivePrompt, negativePrompt } = getPresetModifiedPrompts(state);
const { originalSize, scaledSize } = getSizes(bbox); const { originalSize, scaledSize } = getSizes(bbox);
const g = new Graph(CONTROL_LAYERS_GRAPH); const g = new Graph(CONTROL_LAYERS_GRAPH);

View File

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