mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): conflicts after rebasing
This commit is contained in:
parent
c220dd8987
commit
592eb2886c
@ -7,7 +7,6 @@ import type { ImageDTO } from 'services/api/types';
|
||||
import { isSpandrelImageToImageModelConfig } from 'services/api/types';
|
||||
import { assert } from 'tsafe';
|
||||
|
||||
import { getModelMetadataField } from './canvas/metadata';
|
||||
import { SPANDREL } from './constants';
|
||||
|
||||
type Arg = {
|
||||
@ -33,7 +32,7 @@ export const buildAdHocPostProcessingGraph = async ({ image, state }: Arg): Prom
|
||||
const modelConfig = await fetchModelConfigWithTypeGuard(postProcessingModel.key, isSpandrelImageToImageModelConfig);
|
||||
|
||||
g.upsertMetadata({
|
||||
upscale_model: getModelMetadataField(modelConfig),
|
||||
upscale_model: Graph.getModelMetadataField(modelConfig),
|
||||
});
|
||||
|
||||
return g.getGraph();
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { RootState } from 'app/store/store';
|
||||
import { fetchModelConfigWithTypeGuard } from 'features/metadata/util/modelFetchingHelpers';
|
||||
import type { GraphType } from 'features/nodes/util/graph/generation/Graph';
|
||||
import { addSDXLLoRAs } from 'features/nodes/util/graph/generation/addSDXLLoRAs';
|
||||
import { Graph } from 'features/nodes/util/graph/generation/Graph';
|
||||
import { isNonRefinerMainModelConfig, isSpandrelImageToImageModelConfig } from 'services/api/types';
|
||||
import { assert } from 'tsafe';
|
||||
@ -21,11 +21,10 @@ import {
|
||||
VAE_LOADER,
|
||||
} from './constants';
|
||||
import { addLoRAs } from './generation/addLoRAs';
|
||||
import { addSDXLLoRas } from './generation/addSDXLLoRAs';
|
||||
import { getBoardField, getPresetModifiedPrompts } from './graphBuilderUtils';
|
||||
|
||||
export const buildMultidiffusionUpscaleGraph = async (state: RootState): Promise<GraphType> => {
|
||||
const { model, cfgScale: cfg_scale, scheduler, steps, vaePrecision, seed, vae } = state.generation;
|
||||
export const buildMultidiffusionUpscaleGraph = async (state: RootState): Promise<Graph> => {
|
||||
const { model, cfgScale: cfg_scale, scheduler, steps, vaePrecision, seed, vae } = state.canvasV2.params;
|
||||
const { upscaleModel, upscaleInitialImage, structure, creativity, tileControlnetModel, scale } = state.upscale;
|
||||
|
||||
assert(model, 'No model found in state');
|
||||
@ -123,7 +122,7 @@ export const buildMultidiffusionUpscaleGraph = async (state: RootState): Promise
|
||||
g.addEdge(modelNode, 'clip2', posCondNode, 'clip2');
|
||||
g.addEdge(modelNode, 'clip2', negCondNode, 'clip2');
|
||||
g.addEdge(modelNode, 'unet', tiledMultidiffusionNode, 'unet');
|
||||
addSDXLLoRas(state, g, tiledMultidiffusionNode, modelNode, null, posCondNode, negCondNode);
|
||||
addSDXLLoRAs(state, g, tiledMultidiffusionNode, modelNode, null, posCondNode, negCondNode);
|
||||
|
||||
g.upsertMetadata({
|
||||
positive_prompt: positivePrompt,
|
||||
@ -245,5 +244,5 @@ export const buildMultidiffusionUpscaleGraph = async (state: RootState): Promise
|
||||
|
||||
g.addEdge(collectNode, 'collection', tiledMultidiffusionNode, 'control');
|
||||
|
||||
return g.getGraph();
|
||||
return g;
|
||||
};
|
||||
|
@ -600,7 +600,7 @@ describe('Graph', () => {
|
||||
});
|
||||
g.upsertMetadata({ test: 'test' });
|
||||
g.addEdgeToMetadata(n1, 'width', 'width');
|
||||
const metadata = g._getMetadataNode();
|
||||
const metadata = g.getMetadataNode();
|
||||
expect(g.getEdgesFrom(n1).length).toBe(1);
|
||||
expect(g.getEdgesTo(metadata as unknown as AnyInvocation).length).toBe(1);
|
||||
});
|
||||
|
@ -409,7 +409,7 @@ export class Graph {
|
||||
metadataField: string
|
||||
): Edge {
|
||||
// @ts-expect-error `Graph` excludes `core_metadata` nodes due to its excessively wide typing
|
||||
return this.addEdge(fromNode, fromField, this._getMetadataNode(), metadataField);
|
||||
return this.addEdge(fromNode, fromField, this.getMetadataNode(), metadataField);
|
||||
}
|
||||
/**
|
||||
* Set the node that should receive metadata. All other edges from the metadata node are deleted.
|
||||
|
@ -54,7 +54,7 @@ export const AdvancedSettingsAccordion = memo(() => {
|
||||
if (params.seamlessXAxis || params.seamlessYAxis) {
|
||||
badges.push('seamless');
|
||||
}
|
||||
if (activeTabName === 'upscaling' && !generation.shouldRandomizeSeed) {
|
||||
if (activeTabName === 'upscaling' && !params.shouldRandomizeSeed) {
|
||||
badges.push('Manual Seed');
|
||||
}
|
||||
return badges;
|
||||
|
@ -10,7 +10,7 @@ import { useControlNetModels } from 'services/api/hooks/modelsByType';
|
||||
|
||||
export const UpscaleWarning = () => {
|
||||
const { t } = useTranslation();
|
||||
const model = useAppSelector((s) => s.generation.model);
|
||||
const model = useAppSelector((s) => s.canvasV2.params.model);
|
||||
const upscaleModel = useAppSelector((s) => s.upscale.upscaleModel);
|
||||
const tileControlnetModel = useAppSelector((s) => s.upscale.tileControlnetModel);
|
||||
const upscaleInitialImage = useAppSelector((s) => s.upscale.upscaleInitialImage);
|
||||
|
@ -20,6 +20,7 @@ const overlayScrollbarsStyles: CSSProperties = {
|
||||
|
||||
const ParametersPanelUpscale = () => {
|
||||
const isMenuOpen = useStore($isMenuOpen);
|
||||
|
||||
return (
|
||||
<Flex w="full" h="full" flexDir="column" gap={2}>
|
||||
<QueueControls />
|
||||
|
Loading…
Reference in New Issue
Block a user