feat(ui): rename tab identifiers

- "txt2img" -> "generation"
- "unifiedCanvas" -> "canvas"
- "modelManager" -> "models"
- "nodes" -> "workflows"
- Add UI slice migration setting the active tab to "generation"
This commit is contained in:
psychedelicious
2024-05-03 06:52:15 +10:00
committed by Kent Keirsey
parent 7c1f1076b4
commit 0f7fdabe9b
36 changed files with 80 additions and 77 deletions

View File

@@ -31,9 +31,9 @@ export const addControlNetToLinearGraph = async (
}
);
// The txt2img tab has special handling - its control adapters are set up in the Control Layers graph helper.
// The generation tab has special handling - its control adapters are set up in the Control Layers graph helper.
const activeTabName = activeTabNameSelector(state);
assert(activeTabName !== 'txt2img', 'Tried to use addControlNetToLinearGraph on txt2img tab');
assert(activeTabName !== 'generation', 'Tried to use addControlNetToLinearGraph on generation tab');
if (controlNets.length) {
// Even though denoise_latents' control input is collection or scalar, keep it simple and always use a collect

View File

@@ -106,7 +106,7 @@ export const addHrfToGraph = (state: RootState, graph: NonNullableGraph): void =
if (!state.hrf.hrfEnabled || state.config.disabledSDFeatures.includes('hrf')) {
return;
}
const log = logger('txt2img');
const log = logger('generation');
const { vae, seamlessXAxis, seamlessYAxis } = state.generation;
const { hrfStrength, hrfEnabled, hrfMethod } = state.hrf;

View File

@@ -20,9 +20,9 @@ export const addIPAdapterToLinearGraph = async (
graph: NonNullableGraph,
baseNodeId: string
): Promise<void> => {
// The txt2img tab has special handling - its control adapters are set up in the Control Layers graph helper.
// The generation tab has special handling - its control adapters are set up in the Control Layers graph helper.
const activeTabName = activeTabNameSelector(state);
assert(activeTabName !== 'txt2img', 'Tried to use addT2IAdaptersToLinearGraph on txt2img tab');
assert(activeTabName !== 'generation', 'Tried to use addT2IAdaptersToLinearGraph on generation tab');
const ipAdapters = selectValidIPAdapters(state.controlAdapters).filter(({ model, controlImage, isEnabled }) => {
const hasModel = Boolean(model);

View File

@@ -20,9 +20,9 @@ export const addT2IAdaptersToLinearGraph = async (
graph: NonNullableGraph,
baseNodeId: string
): Promise<void> => {
// The txt2img tab has special handling - its control adapters are set up in the Control Layers graph helper.
// The generation tab has special handling - its control adapters are set up in the Control Layers graph helper.
const activeTabName = activeTabNameSelector(state);
assert(activeTabName !== 'txt2img', 'Tried to use addT2IAdaptersToLinearGraph on txt2img tab');
assert(activeTabName !== 'generation', 'Tried to use addT2IAdaptersToLinearGraph on generation tab');
const t2iAdapters = selectValidT2IAdapters(state.controlAdapters).filter(
({ model, processedControlImage, processorType, controlImage, isEnabled }) => {

View File

@@ -31,7 +31,7 @@ export const getSDXLStylePrompts = (state: RootState): { positiveStylePrompt: st
*/
export const getIsIntermediate = (state: RootState) => {
const activeTabName = activeTabNameSelector(state);
if (activeTabName === 'unifiedCanvas') {
if (activeTabName === 'canvas') {
return !state.canvas.shouldAutoSave;
}
return false;