mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
disable invoke button properly for upscaling tab
This commit is contained in:
committed by
psychedelicious
parent
ce5b1103ed
commit
3a2707ac02
@ -21,6 +21,7 @@ import i18n from 'i18next';
|
|||||||
import { forEach, upperFirst } from 'lodash-es';
|
import { forEach, upperFirst } from 'lodash-es';
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import { getConnectedEdges } from 'reactflow';
|
import { getConnectedEdges } from 'reactflow';
|
||||||
|
import { selectUpscalelice } from '../../features/parameters/store/upscaleSlice';
|
||||||
|
|
||||||
const LAYER_TYPE_TO_TKEY: Record<Layer['type'], string> = {
|
const LAYER_TYPE_TO_TKEY: Record<Layer['type'], string> = {
|
||||||
initial_image_layer: 'controlLayers.globalInitialImage',
|
initial_image_layer: 'controlLayers.globalInitialImage',
|
||||||
@ -40,8 +41,9 @@ const createSelector = (templates: Templates) =>
|
|||||||
selectDynamicPromptsSlice,
|
selectDynamicPromptsSlice,
|
||||||
selectControlLayersSlice,
|
selectControlLayersSlice,
|
||||||
activeTabNameSelector,
|
activeTabNameSelector,
|
||||||
|
selectUpscalelice
|
||||||
],
|
],
|
||||||
(controlAdapters, generation, system, nodes, workflowSettings, dynamicPrompts, controlLayers, activeTabName) => {
|
(controlAdapters, generation, system, nodes, workflowSettings, dynamicPrompts, controlLayers, activeTabName, upscale) => {
|
||||||
const { model } = generation;
|
const { model } = generation;
|
||||||
const { size } = controlLayers.present;
|
const { size } = controlLayers.present;
|
||||||
const { positivePrompt } = controlLayers.present;
|
const { positivePrompt } = controlLayers.present;
|
||||||
@ -194,6 +196,13 @@ const createSelector = (templates: Templates) =>
|
|||||||
reasons.push({ prefix, content });
|
reasons.push({ prefix, content });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else if (activeTabName == "upscaling") {
|
||||||
|
if (!upscale.upscaleInitialImage) {
|
||||||
|
reasons.push({ content: "No Initial image" })
|
||||||
|
}
|
||||||
|
if (!upscale.upscaleModel) {
|
||||||
|
reasons.push({ content: "No upscale model selected" })
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Handling for all other tabs
|
// Handling for all other tabs
|
||||||
selectControlAdapterAll(controlAdapters)
|
selectControlAdapterAll(controlAdapters)
|
||||||
|
@ -38,7 +38,6 @@ const ParamSpandrelModel = () => {
|
|||||||
options={options}
|
options={options}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
noOptionsMessage={noOptionsMessage}
|
noOptionsMessage={noOptionsMessage}
|
||||||
isClearable
|
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user