Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
fix(upscale): offer only schedulers that honor Creativity
Alexander Eichhorn87db572fad15
diff --git a/docs/src/content/docs/Users Guide/04.Image Generation/upscale.mdx b/docs/src/content/docs/Users Guide/04.Image Generation/upscale.mdxindex 5a7954b52c..2b5cebacfa 100644--- a/docs/src/content/docs/Users Guide/04.Image Generation/upscale.mdx+++ b/docs/src/content/docs/Users Guide/04.Image Generation/upscale.mdx@@ -19,7 +19,7 @@ The panel is split into sections, top to bottom:- **Scale**: the output size is the source size multiplied by this value. The panel shows the resulting input and output size and warns when the output is large enough to need much more time and VRAM.- **Treatment preset**, or **Creativity** and **Structure** directly. Higher Creativity invents more detail and gives the prompt more influence. Higher Structure keeps the source composition more strictly; it is only shown when a Tile ControlNet is in use.- **Detail guidance**: the prompt. It is the project prompt shared with Generate. For upscaling, describe the medium, texture and style rather than new content.-- **Generation**: the **Main model** for the detail pass (**SD1.5**, **SDXL**, **FLUX.1**, **Z-Image** or **Anima**), steps, CFG scale, scheduler, seed, and LoRAs that match the main model.+- **Generation**: the **Main model** for the detail pass (**SD1.5**, **SDXL**, **FLUX.1**, **Z-Image** or **Anima**), steps, CFG scale, scheduler, seed, and LoRAs that match the main model. FLUX.1 and Z-Image always run **Euler**, so they show no scheduler.- **Advanced**: the components the main model needs (see below), tile size and tile overlap, VAE and VAE precision, and CLIP skip for SD1.5.## What each model family needs@@ -42,7 +42,7 @@ FLUX.1 and Z-Image need sizes that are a multiple of 16. When the enlarged imageZ-Image and Anima count the start of the detail pass in steps rather than in noise level, so the same Creativity setting would add much more noise there than on FLUX.1. The panel translates Creativity for them: it starts the pass on the step whose noise level is closest to where FLUX.1 would start. A preset therefore means the same thing on all three, and the pass runs fewer steps than the Steps setting suggests. For example, **Balanced** at 30 steps runs the last 7 or 8, and both need at least 2 steps.-This holds for the schedulers that follow the noise schedule they are given: on Z-Image only **Euler**, on Anima every scheduler except **LCM**. The others build their own schedule and do not start where the panel asks.+The panel offers only schedulers that start where Creativity puts the pass: **Euler** on FLUX.1 and Z-Image, and **Euler**, **DPM++ 2M**, **DPM++ 2M SDE** and **ER-SDE** on Anima. Heun and LCM build their own noise schedule, so they would treat the enlarged image as pure noise or leave noise in it.The Z-Image Tile ControlNet is optional because the detail pass runs over the whole image at once: there are no tile seams for it to hold together. Adding it lets **Structure** pull the result back toward the enlarged image, at the cost of a second network's memory and time.diff --git a/invokeai/frontend/webv2/performance/browser-baseline.json b/invokeai/frontend/webv2/performance/browser-baseline.jsonindex 99f91f948c..9e45cb2859 100644--- a/invokeai/frontend/webv2/performance/browser-baseline.json+++ b/invokeai/frontend/webv2/performance/browser-baseline.json@@ -1067,6 +1067,7 @@"source:src/features/generation/ui/reference-images/referenceImageConfig.ts","source:src/features/generation/ui/shared/AspectRatioPreview.tsx","source:src/features/generation/ui/shared/AspectRatioSelect.tsx",+ "source:src/features/generation/ui/shared/CapabilitiesGate.tsx","source:src/features/generation/ui/shared/ConceptRow.tsx","source:src/features/generation/ui/shared/ConditioningRebalanceBars.tsx","source:src/features/generation/ui/shared/ConditioningRebalanceSparkline.tsx",@@ -2154,6 +2155,7 @@"source:src/features/generation/ui/reference-images/referenceImageConfig.ts","source:src/features/generation/ui/shared/AspectRatioPreview.tsx","source:src/features/generation/ui/shared/AspectRatioSelect.tsx",+ "source:src/features/generation/ui/shared/CapabilitiesGate.tsx","source:src/features/generation/ui/shared/ConceptRow.tsx","source:src/features/generation/ui/shared/ConditioningRebalanceBars.tsx","source:src/features/generation/ui/shared/ConditioningRebalanceSparkline.tsx",@@ -3400,6 +3402,7 @@"source:src/features/generation/ui/reference-images/referenceImageConfig.ts","source:src/features/generation/ui/shared/AspectRatioPreview.tsx","source:src/features/generation/ui/shared/AspectRatioSelect.tsx",+ "source:src/features/generation/ui/shared/CapabilitiesGate.tsx","source:src/features/generation/ui/shared/ConceptRow.tsx","source:src/features/generation/ui/shared/ConditioningRebalanceBars.tsx","source:src/features/generation/ui/shared/ConditioningRebalanceSparkline.tsx",diff --git a/invokeai/frontend/webv2/public/locales/en.json b/invokeai/frontend/webv2/public/locales/en.jsonindex 5a894c0641..a71f0883be 100644--- a/invokeai/frontend/webv2/public/locales/en.json+++ b/invokeai/frontend/webv2/public/locales/en.json@@ -2692,6 +2692,9 @@"negativePromptAdd": "Negative prompt…","negativePromptHide": "Turn off negative prompt","notReady": "Upscale is not ready",+ "capabilitiesLoadFailed": "Could not load model capabilities from the backend. Upscale needs them to check its models and settings.",+ "loadingCapabilities": "Loading model capabilities…",+ "retry": "Retry","outputMegapixels": "Output area","outputSize": "Output","positivePrompt": "Positive prompt",diff --git a/invokeai/frontend/webv2/src/app/UpscaleCapabilityGate.browser.test.tsx b/invokeai/frontend/webv2/src/app/UpscaleCapabilityGate.browser.test.tsxnew file mode 100644index 0000000000..40c29fbab6--- /dev/null+++ b/invokeai/frontend/webv2/src/app/UpscaleCapabilityGate.browser.test.tsx@@ -0,0 +1,159 @@+import type { ArchitectureCapabilitiesRow } from '@features/generation/core/architectureCapabilities';+import type { ModelConfig } from '@features/models';+import type { Project } from '@workbench/projectContracts';+import type { WorkbenchInternalStore } from '@workbench/workbenchStore';++import { ChakraProvider } from '@chakra-ui/react';+import { architectureCapabilitiesFixture } from '@features/generation/core/architectureCapabilities.testing';+import { GenerationUiProvider, type GenerationUiAdapter } from '@features/generation/ui/GenerationUiContext';+import { createDefaultUpscaleWidgetValues } from '@features/upscale';+import { UpscaleWidgetView } from '@features/upscale/ui/UpscaleWidgetView';+import { accountLifecycle } from '@platform/state/accountLifecycle';+import { QueryClient, QueryClientProvider } from '@tanstack/react-query';+import { system } from '@theme/system';+import { getProjectWidgetValues } from '@workbench/widgetState';+import { createWorkbenchStore } from '@workbench/workbenchStore';+import { act, useSyncExternalStore } from 'react';+import { createRoot, type Root } from 'react-dom/client';+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';++import { UpscaleUiAdapterProvider } from './UpscaleUiAdapter';++const modelSnapshot = {+ models: [+ { base: 'z-image', format: 'diffusers', hash: 'z', key: 'z-turbo', name: 'Z-Image Turbo', type: 'main' },+ {+ base: 'any',+ format: 'checkpoint',+ hash: 's',+ key: 'spandrel',+ name: 'Spandrel',+ type: 'spandrel_image_to_image',+ },+ ] as ModelConfig[],+ status: 'loaded',+};+const getArchitectureCapabilities = vi.fn<() => Promise<ArchitectureCapabilitiesRow[]>>();+const noop = () => undefined;+const generationAdapter = {+ sectionPreferences: { sectionsOpen: {}, setSectionOpen: noop },+} as unknown as GenerationUiAdapter;++let store: WorkbenchInternalStore;+let host: HTMLDivElement;+let root: Root;++vi.mock('@features/generation/data/architectureCapabilitiesApi', () => ({+ getArchitectureCapabilities: () => getArchitectureCapabilities(),+}));+vi.mock('react-i18next', () => {+ const t = (key: string) => key;+ return { useTranslation: () => ({ i18n: { resolvedLanguage: 'en' }, t }) };+});+vi.mock('@features/models', async (importOriginal) => ({+ ...(await importOriginal<Record<string, unknown>>()),+ ensureModelsLoaded: () => Promise.resolve(),+ getModelImageUrl: () => '',+ useModelsSelector: (selector: (snapshot: typeof modelSnapshot) => unknown) => selector(modelSnapshot),+ useOpenModelInManager: () => undefined,+}));+// The pickers' transport is not under test; the form around them is.+vi.mock('@features/models/react', async (importOriginal) => ({+ ...(await importOriginal<Record<string, unknown>>()),+ ModelSelect: () => null,+}));+vi.mock('@features/gallery/mediaSlot', async (importOriginal) => ({+ ...(await importOriginal<Record<string, unknown>>()),+ GalleryMediaSlot: () => null,+}));+vi.mock('@features/generation/components', async (importOriginal) => ({+ ...(await importOriginal<Record<string, unknown>>()),+ NegativePromptField: () => null,+ PositivePromptField: () => null,+}));+vi.mock('@platform/ui/toaster', () => ({ toaster: { create: () => undefined } }));+vi.mock('@workbench/settings/store', async (importOriginal) => ({+ ...(await importOriginal<Record<string, unknown>>()),+ useWorkbenchPreferenceSelector: () => false,+}));+vi.mock('@workbench/image-actions/useFindGalleryItem', () => ({ useFindGalleryItem: () => noop }));+vi.mock('@workbench/useOpenWorkbenchWidget', () => ({ useOpenWorkbenchWidget: () => noop }));+vi.mock('@workbench/WorkbenchContext', () => ({+ useActiveProjectSelector: (selector: (project: Project) => unknown) =>+ selector(useSyncExternalStore(store.subscribe, store.getSnapshot).activeProject),+ useWorkbenchCommands: () => store.commands,+ useWorkbenchQueries: () => store.queries,+}));++(globalThis as typeof globalThis & { IS_REACT_ACT_ENVIRONMENT: boolean }).IS_REACT_ACT_ENVIRONMENT = true;++const settle = async (run: () => void = noop) => {+ await act(async () => {+ run();+ await new Promise<void>((resolve) => {+ globalThis.setTimeout(resolve, 0);+ });+ });+};++const storedValues = () => getProjectWidgetValues(store.getSnapshot().activeProject, 'upscale');++beforeEach(() => {+ store = createWorkbenchStore();+ host = document.createElement('div');+ document.body.append(host);+ root = createRoot(host);+ getArchitectureCapabilities.mockReset();+});++afterEach(async () => {+ await act(() => root.unmount());+ host.remove();+ // Returns the capability store and the core registry to their unloaded state.+ accountLifecycle.invalidate();+});++describe('Upscale without the served architecture table', () => {+ it("picks no model until the table loads, then gives the one it picks that model's CFG", async () => {+ // A fresh widget: no model yet, the widget's CFG 2.+ store.commands.widgets.patchValues('upscale', { ...createDefaultUpscaleWidgetValues() });+ getArchitectureCapabilities.mockRejectedValueOnce(new Error('Fixture capability outage.'));++ await settle(() =>+ root.render(+ <QueryClientProvider client={new QueryClient()}>+ <ChakraProvider value={system}>+ <GenerationUiProvider adapter={generationAdapter}>+ <UpscaleUiAdapterProvider>+ <UpscaleWidgetView />+ </UpscaleUiAdapterProvider>+ </GenerationUiProvider>+ </ChakraProvider>+ </QueryClientProvider>+ )+ );++ expect(host.querySelector('[role="alert"]')?.textContent).toContain('widgets.upscale.capabilitiesLoadFailed');+ // Turbo picked now would keep CFG 2 for good: nothing re-applies a default to a selected model.+ expect(storedValues()).toMatchObject({ cfgScale: 2, model: null });++ getArchitectureCapabilities.mockResolvedValueOnce(architectureCapabilitiesFixture);+ await settle(() =>+ [...host.querySelectorAll('button')].find((button) => button.textContent === 'widgets.upscale.retry')?.click()+ );++ expect(host.querySelector('[role="alert"]')).toBeNull();+ // Turbo is distilled for CFG 1, the default the backend serves for it.+ expect(storedValues()).toMatchObject({ cfgScale: 1, model: { key: 'z-turbo' } });++ await settle(() =>+ [...host.querySelectorAll('button')]+ .find((button) => button.textContent === 'widgets.upscale.generation')+ ?.click()+ );++ // Euler is all Z-Image has that keeps to the blend, so there is no choice to show.+ expect(host.textContent).toContain('widgets.upscale.cfgScale');+ expect(host.querySelector('[aria-label="widgets.upscale.scheduler"]')).toBeNull();+ });+});diff --git a/invokeai/frontend/webv2/src/features/generation/components.ts b/invokeai/frontend/webv2/src/features/generation/components.tsindex 27511deb8b..9f1edafdb2 100644--- a/invokeai/frontend/webv2/src/features/generation/components.ts+++ b/invokeai/frontend/webv2/src/features/generation/components.ts@@ -11,6 +11,7 @@ export { PROMPT_ATTENTION_TARGET_PROPS } from './ui/promptFields/promptAttentionexport { SeedField, type SeedFieldProps } from './ui/shared/SeedField';export { FluxReduxControls } from './ui/reference-images/ReferenceImageControls';export { GenerateCollapsibleSection as GenerationSettingsSection } from './ui/shared/GenerateCollapsibleSection';+export { CapabilitiesGate, type CapabilitiesGateProps } from './ui/shared/CapabilitiesGate';export {ConceptList,ConceptRow,diff --git a/invokeai/frontend/webv2/src/features/generation/ui/GenerateWidgetView.tsx b/invokeai/frontend/webv2/src/features/generation/ui/GenerateWidgetView.tsxindex 2b25b24cab..6469da4afd 100644--- a/invokeai/frontend/webv2/src/features/generation/ui/GenerateWidgetView.tsx+++ b/invokeai/frontend/webv2/src/features/generation/ui/GenerateWidgetView.tsx@@ -1,33 +1,25 @@import type { GenerationModelCatalogItem as ModelConfig } from '@features/generation/contracts';import type { GenerateModelConfig, GenerateSettings, LoraModelConfig } from '@features/generation/core/types';-import { Box, HStack, Spinner, Stack, Text } from '@chakra-ui/react';import {getDefaultGenerateSettings,isGenerateModelSelectable,} from '@features/generation/core/baseGenerationPolicies';import { isLoraModelConfig, normalizeGenerateSettings } from '@features/generation/core/settings';-import {- ensureArchitectureCapabilitiesLoaded,- getArchitectureCapabilitiesSnapshot,- useArchitectureCapabilitiesSelector,-} from '@features/generation/data/architectureCapabilitiesStore';+import { useArchitectureCapabilitiesSelector } from '@features/generation/data/architectureCapabilitiesStore';import { resolveGenerateWidgetValues } from '@features/generation/settings';-import { focusIfUnclaimed } from '@platform/react/focusIfUnclaimed';-import { Button } from '@platform/ui/Button';-import { useCallback, useMemo, useRef, useState } from 'react';+import { useCallback, useMemo } from 'react';import { useTranslation } from 'react-i18next';import { getGenerateFormCommitPatch } from './generateFormViewModel';import { GenerateSettingsForm } from './GenerateSettingsForm';import { useGenerateValues, useGenerationUi } from './GenerationUiContext';+import { CapabilitiesGate } from './shared/CapabilitiesGate';export const GenerateWidgetView = () => {const { t } = useTranslation();const ui = useGenerationUi();const capabilitiesStatus = useArchitectureCapabilitiesSelector((snapshot) => snapshot.status);- const capabilitiesError = useArchitectureCapabilitiesSelector((snapshot) => snapshot.error);- const [hasRequestedRetry, setHasRequestedRetry] = useState(false);const projectId = ui.project.activeProjectId;const storedValues = useGenerateValues();const error = ui.models.error;@@ -47,32 +39,14 @@ export const GenerateWidgetView = () => {const settings =resolved?.values ?? normalizeGenerateSettings(storedValues) ?? getDefaultGenerateSettings(supportedModels[0]);const selectedModel = resolved?.values.model;- // Keep the failure surface mounted during retry to preserve button focus.- const isRetrying = hasRequestedRetry && capabilitiesStatus === 'loading';-- // Set by the click, consumed when the form the retry revealed mounts.- const focusHandoffPending = useRef(false);-- const retryCapabilities = useCallback(() => {- if (isRetrying) {- return;- }-- focusHandoffPending.current = true;- setHasRequestedRetry(true);- // Only the initiating retry owns focus; unrelated later reloads must not take it.- void ensureArchitectureCapabilitiesLoaded().then(() => {- focusHandoffPending.current &&= getArchitectureCapabilitiesSnapshot().status === 'loaded';- setHasRequestedRetry(false);- });- }, [isRetrying]);-- const handOverFocus = useCallback((element: HTMLDivElement | null) => {- if (element && focusHandoffPending.current) {- focusHandoffPending.current = false;- focusIfUnclaimed(element);- }- }, []);+ const gateLabels = useMemo(+ () => ({+ loadFailed: t('widgets.generate.capabilitiesLoadFailed'),+ loading: t('widgets.generate.loadingCapabilities'),+ retry: t('widgets.generate.retry'),+ }),+ [t]+ );const commitSettings = useCallback((nextSettings: GenerateSettings) => {@@ -95,55 +69,8 @@ export const GenerateWidgetView = () => {);// Gate the form so edits cannot persist fallback architecture defaults.- if (capabilitiesStatus !== 'loaded') {- if (capabilitiesStatus === 'error' || isRetrying) {- return (- <Stack aria-busy={isRetrying} aria-live="polite" gap="2" justify="center" minH="8rem" p="1" role="alert">- <Text color="fg.error" fontSize="xs" textWrap="pretty">- {t('widgets.generate.capabilitiesLoadFailed')}- </Text>- {capabilitiesError ? (- <Text color="fg.muted" fontSize="xs" textWrap="pretty">- {capabilitiesError}- </Text>- ) : null}- {/* `aria-disabled` rather than `disabled`: a disabled button drops the focus it holds. */}- <Button- alignSelf="flex-start"- aria-busy={isRetrying}- aria-disabled={isRetrying}- variant="outline"- onClick={retryCapabilities}- >- {isRetrying ? <Spinner /> : null}- {t('widgets.generate.retry')}- </Button>- </Stack>- );- }-- return (- <HStack- align="center"- aria-atomic="true"- aria-busy="true"- aria-live="polite"- color="fg.muted"- gap="1.5"- justify="center"- minH="8rem"- p="1"- role="status"- >- <Spinner />- <Text fontSize="xs">{t('widgets.generate.loadingCapabilities')}</Text>- </HStack>- );- }-return (- // A successful retry unmounts the button that held focus; hand it to the form the retry revealed.- <Box ref={handOverFocus}>+ <CapabilitiesGate isReady={capabilitiesStatus === 'loaded'} labels={gateLabels}><GenerateSettingsFormisLoadingModels={status === 'idle' || status === 'loading'}loadError={error}@@ -156,6 +83,6 @@ export const GenerateWidgetView = () => {onCommitSettings={commitSettings}onPatchSettings={ui.settings.patchGenerateSettings}/>- </Box>+ </CapabilitiesGate>);};diff --git a/invokeai/frontend/webv2/src/features/generation/ui/shared/CapabilitiesGate.tsx b/invokeai/frontend/webv2/src/features/generation/ui/shared/CapabilitiesGate.tsxnew file mode 100644index 0000000000..5af8815e33--- /dev/null+++ b/invokeai/frontend/webv2/src/features/generation/ui/shared/CapabilitiesGate.tsx@@ -0,0 +1,109 @@+import type { ReactNode } from 'react';++import { Box, HStack, Spinner, Stack, Text } from '@chakra-ui/react';+import {+ ensureArchitectureCapabilitiesLoaded,+ getArchitectureCapabilitiesSnapshot,+ useArchitectureCapabilitiesSelector,+} from '@features/generation/data/architectureCapabilitiesStore';+import { focusIfUnclaimed } from '@platform/react/focusIfUnclaimed';+import { Button } from '@platform/ui/Button';+import { useCallback, useRef, useState } from 'react';++export interface CapabilitiesGateProps {+ /**+ * Whether the form can render. Until it can, the gate shows the load, and a retry once it fails.+ * Generate passes a finished load, which is also when its values resolve; Upscale passes the table+ * itself (a nonzero registry revision), which is what its sync and validation read. In the app the+ * two agree: the table arrives only with a successful load and leaves only with the account.+ */+ isReady: boolean;+ /** Translated copy, so each widget keeps its own strings. */+ labels: { loadFailed: string; loading: string; retry: string };+ children: ReactNode;+}++/**+ * Holds back a form whose defaults and validation come from the served architecture table, so no+ * edit made before it loads can persist a fallback in place of a served default.+ */+export const CapabilitiesGate = ({ children, isReady, labels }: CapabilitiesGateProps) => {+ const status = useArchitectureCapabilitiesSelector((snapshot) => snapshot.status);+ const error = useArchitectureCapabilitiesSelector((snapshot) => snapshot.error);+ const [hasRequestedRetry, setHasRequestedRetry] = useState(false);+ // Keep the failure surface mounted during retry to preserve button focus.+ const isRetrying = hasRequestedRetry && status === 'loading';++ // Set by the click, consumed when the form the retry revealed mounts.+ const focusHandoffPending = useRef(false);++ const retry = useCallback(() => {+ if (isRetrying) {+ return;+ }++ focusHandoffPending.current = true;+ setHasRequestedRetry(true);+ // Only the initiating retry owns focus; unrelated later reloads must not take it.+ void ensureArchitectureCapabilitiesLoaded().then(() => {+ focusHandoffPending.current &&= getArchitectureCapabilitiesSnapshot().status === 'loaded';+ setHasRequestedRetry(false);+ });+ }, [isRetrying]);++ const handOverFocus = useCallback((element: HTMLDivElement | null) => {+ if (element && focusHandoffPending.current) {+ focusHandoffPending.current = false;+ focusIfUnclaimed(element);+ }+ }, []);++ if (!isReady) {+ if (status === 'error' || isRetrying) {+ return (+ <Stack aria-busy={isRetrying} aria-live="polite" gap="2" justify="center" minH="8rem" p="1" role="alert">+ <Text color="fg.error" fontSize="xs" textWrap="pretty">+ {labels.loadFailed}+ </Text>+ {error ? (+ <Text color="fg.muted" fontSize="xs" textWrap="pretty">+ {error}+ </Text>+ ) : null}+ {/* `aria-disabled` rather than `disabled`: a disabled button drops the focus it holds. */}+ <Button+ alignSelf="flex-start"+ aria-busy={isRetrying}+ aria-disabled={isRetrying}+ variant="outline"+ onClick={retry}+ >+ {isRetrying ? <Spinner /> : null}+ {labels.retry}+ </Button>+ </Stack>+ );+ }++ return (+ <HStack+ align="center"+ aria-atomic="true"+ aria-busy="true"+ aria-live="polite"+ color="fg.muted"+ gap="1.5"+ justify="center"+ minH="8rem"+ p="1"+ role="status"+ >+ <Spinner />+ <Text fontSize="xs">{labels.loading}</Text>+ </HStack>+ );+ }++ // A successful retry unmounts the button that held focus; hand it to the form the retry revealed.+ return <Box ref={handOverFocus}>{children}</Box>;+};diff --git a/invokeai/frontend/webv2/src/features/upscale/core/__snapshots__/upscaleGraphNodeTypes.json b/invokeai/frontend/webv2/src/features/upscale/core/__snapshots__/upscaleGraphNodeTypes.jsonindex d0ea989f0f..c0bac49c30 100644--- a/invokeai/frontend/webv2/src/features/upscale/core/__snapshots__/upscaleGraphNodeTypes.json+++ b/invokeai/frontend/webv2/src/features/upscale/core/__snapshots__/upscaleGraphNodeTypes.json@@ -42,10 +42,12 @@"flux_text_encoder conditioning collect item","flux_vae_encode latents flux_denoise latents","i2l latents tiled_multi_diffusion_denoise_latents latents",+ "img_resize height core_metadata height","img_resize image anima_i2l image","img_resize image flux_vae_encode image","img_resize image z_image_control image","img_resize image z_image_i2l image",+ "img_resize width core_metadata width","integer value anima_denoise seed","integer value core_metadata seed","integer value flux_denoise seed",@@ -69,9 +71,7 @@"sdxl_model_loader unet sdxl_lora_collection_loader unet","sdxl_model_loader vae i2l vae","sdxl_model_loader vae l2i vae",- "spandrel_image_to_image_autoscale height core_metadata height","spandrel_image_to_image_autoscale image unsharp_mask image",- "spandrel_image_to_image_autoscale width core_metadata width","string value anima_text_encoder prompt","string value compel prompt","string value core_metadata negative_prompt",@@ -81,10 +81,12 @@"string value sdxl_compel_prompt style","string value z_image_text_encoder prompt","tiled_multi_diffusion_denoise_latents latents l2i latents",+ "unsharp_mask height core_metadata height","unsharp_mask height noise height","unsharp_mask image controlnet image","unsharp_mask image i2l image","unsharp_mask image img_resize image",+ "unsharp_mask width core_metadata width","unsharp_mask width noise width","z_image_control control z_image_denoise control","z_image_denoise latents z_image_l2i latents",@@ -682,7 +684,9 @@]},"outputs": [- "image"+ "height",+ "image",+ "width"]},"integer": {@@ -876,9 +880,7 @@]},"outputs": [- "height",- "image",- "width"+ "image"]},"string": {diff --git a/invokeai/frontend/webv2/src/features/upscale/core/__snapshots__/upscaleIndexClippedStarts.json b/invokeai/frontend/webv2/src/features/upscale/core/__snapshots__/upscaleIndexClippedStarts.jsonindex bcb7954433..6a604a1716 100644--- a/invokeai/frontend/webv2/src/features/upscale/core/__snapshots__/upscaleIndexClippedStarts.json+++ b/invokeai/frontend/webv2/src/features/upscale/core/__snapshots__/upscaleIndexClippedStarts.json@@ -1,5 +1,5 @@{- "_comment": "Generated by src/features/upscale/core/indexClippedStarts.test.ts; regenerate with `vitest -u`. Consumed by tests/app/invocations/test_upscale_index_clipped_starts.py, which drives the real z_image_denoise and anima_denoise with each denoisingStart and checks the pass enters at the step nearest fluxEntrySigma.",+ "_comment": "Generated by src/features/upscale/core/indexClippedStarts.test.ts; regenerate with `vitest -u`. Consumed by tests/app/invocations/test_upscale_index_clipped_starts.py, which drives the real z_image_denoise and anima_denoise with each denoisingStart and checks the pass enters at the step nearest fluxEntrySigma, and that the schedulers offered are the ones that start there.","cases": [{"base": "anima",@@ -481,5 +481,16 @@"side": 4096,"steps": 30}- ]+ ],+ "schedulers": {+ "anima": [+ "euler",+ "dpmpp_2m",+ "dpmpp_2m_sde",+ "er_sde"+ ],+ "z-image": [+ "euler"+ ]+ }}diff --git a/invokeai/frontend/webv2/src/features/upscale/core/graph.test.ts b/invokeai/frontend/webv2/src/features/upscale/core/graph.test.tsindex df8176afe7..79f1e46d7f 100644--- a/invokeai/frontend/webv2/src/features/upscale/core/graph.test.ts+++ b/invokeai/frontend/webv2/src/features/upscale/core/graph.test.ts@@ -108,8 +108,6 @@ describe('compileUpscaleGraph', () => {tile_size: 1024,upscale_scale: 4,});- expect(hasEdge(edges, 'spandrel_autoscale', 'width', 'core_metadata', 'width')).toBe(true);- expect(hasEdge(edges, 'spandrel_autoscale', 'height', 'core_metadata', 'height')).toBe(true);expect(hasEdge(edges, 'controlnet_collector', 'collection', 'tiled_multidiffusion_denoise_latents', 'control')).toBe(true);@@ -448,7 +446,45 @@ describe('Creativity on index-clipping architectures', () => {});});+describe('schedulers on the upscale pass', () => {+ // A stored Heun or LCM on a flow model -- left from SD, recalled, or picked before the list was+ // narrowed -- would start the pass from pure noise, or on Anima below the blend.+ it.each([+ ['flux', () => createFluxValues(), 'lcm', 'euler'],+ ['z-image', () => createZImageValues(), 'heun', 'euler'],+ ['anima', () => createAnimaValues(), 'heun', 'euler'],+ ['anima', () => createAnimaValues(), 'dpmpp_2m', 'dpmpp_2m'],+ ['sd-1', () => createValues('sd-1'), 'heun', 'heun'],+ ] as const)('runs %s with %s stored as %s, and records what ran', (_base, createBaseValues, stored, runs) => {+ const { nodes } = compileUpscaleGraph({ ...createBaseValues(), scheduler: stored }, 'gallery', {+ useCpuNoise: true,+ }).backendGraph;+ const denoise = nodes.denoise_latents ?? nodes.tiled_multidiffusion_denoise_latents;++ expect([denoise?.scheduler, nodes.core_metadata?.scheduler]).toEqual([runs, runs]);+ });+});+describe('upscale metadata', () => {+ it.each([+ ['sd-1', () => createValues('sd-1')],+ ['flux', () => createFluxValues()],+ ['z-image', () => createZImageValues()],+ ['anima', () => createAnimaValues()],+ ] as const)('records the size of the image the %s pass encoded, which is the size of the result', (_base, create) => {+ // Where a pass resizes Spandrel's frame, the result does not have Spandrel's size: a 1x+ // restoration model leaves the frame unscaled, and its multiple of 8 is not FLUX's or Z-Image's+ // 16. Recall restores the size recorded here.+ const { edges } = compileUpscaleGraph(create(), 'gallery', { useCpuNoise: true }).backendGraph;+ const sourceOf = (nodeId: string, field: string) =>+ edges.find((edge) => edge.destination.node_id === nodeId && edge.destination.field === field)?.source;+ const encoded = sourceOf('i2l', 'image')?.node_id;++ expect(encoded).toBeDefined();+ expect(sourceOf('core_metadata', 'width')).toEqual({ field: 'width', node_id: encoded });+ expect(sourceOf('core_metadata', 'height')).toEqual({ field: 'height', node_id: encoded });+ });+it.each([['sd-1', () => createValues('sd-1')],['sdxl', () => createValues('sdxl')],diff --git a/invokeai/frontend/webv2/src/features/upscale/core/graph.ts b/invokeai/frontend/webv2/src/features/upscale/core/graph.tsindex 86e1f4c9ff..8d606cbaac 100644--- a/invokeai/frontend/webv2/src/features/upscale/core/graph.ts+++ b/invokeai/frontend/webv2/src/features/upscale/core/graph.ts@@ -16,13 +16,14 @@ import {toGraphContract,toModelIdentifier,} from '@features/generation/graph';-import { coerceSchedulerForGraph, isBundledMainForBase } from '@features/generation/settings';+import { isBundledMainForBase } from '@features/generation/settings';import type { UpscaleBase } from './settings';import type { CompiledUpscaleGraph, UpscaleWidgetValues } from './types';import {activeUpscaleComponents,+ coerceUpscaleScheduler,getUpscaleValidationReasons,upscaleArchitectureFor,upscaleDenoiseDimension,@@ -92,7 +93,7 @@ export const getZImageTileControlValues = (structure: number) => ({const addUpscaleMetadata = (graph: BackendGraphContract,- output: BackendInvocationContract,+ { frame, output }: UpscalePathResult,settings: UpscaleWidgetValues,projectSettings: GenerationProjectSettings,randDevice: string@@ -118,7 +119,7 @@ const addUpscaleMetadata = (loras: getLoadedLoras(graph),model: toModelIdentifier(settings.model),rand_device: randDevice,- scheduler: coerceSchedulerForGraph(settings.model, settings.scheduler),+ scheduler: coerceUpscaleScheduler(settings.model, settings.scheduler),steps: settings.steps,structure: settings.structure,tile_overlap: settings.tileOverlap,@@ -139,8 +140,8 @@ const addUpscaleMetadata = (addEdge(graph, graph.nodes.negative_prompt, 'value', metadata, 'negative_prompt');}addEdge(graph, graph.nodes.seed, 'value', metadata, 'seed');- addEdge(graph, graph.nodes.spandrel_autoscale, 'width', metadata, 'width');- addEdge(graph, graph.nodes.spandrel_autoscale, 'height', metadata, 'height');+ addEdge(graph, frame, 'width', metadata, 'width');+ addEdge(graph, frame, 'height', metadata, 'height');addEdge(graph, metadata, 'metadata', output, 'metadata');};@@ -176,6 +177,11 @@ interface UpscalePathContext {interface UpscalePathResult {/** The node whose image is the result; the caller hangs metadata off it. */output: BackendInvocationContract;+ /**+ * The image the pass encoded, which the result matches in size: Spandrel's frame, or the one+ * resized to the denoise size. The metadata records its size, so Recall restores the real one.+ */+ frame: BackendInvocationContract;/** Names the pass in the queue, so "multi-diffusion" is not claimed where none runs. */title: string;}@@ -249,7 +255,7 @@ const buildSdUpscalePath: UpscalePathBuilder = ({denoising_end: 1,denoising_start: denoisingStart,id: 'tiled_multidiffusion_denoise_latents',- scheduler: coerceSchedulerForGraph(model, settings.scheduler),+ scheduler: coerceUpscaleScheduler(model, settings.scheduler),steps: settings.steps,tile_height: settings.tileSize,tile_overlap: settings.tileOverlap,@@ -354,7 +360,7 @@ const buildSdUpscalePath: UpscalePathBuilder = ({addEdge(graph, controlNet2, 'control', controlNetCollector, 'item');addEdge(graph, controlNetCollector, 'collection', denoise, 'control');- return { output, title: `${model.name} multi-diffusion upscale` };+ return { frame, output, title: `${model.name} multi-diffusion upscale` };};/**@@ -405,7 +411,7 @@ const buildFluxUpscalePath: UpscalePathBuilder = ({height: denoiseSize.height,id: 'denoise_latents',num_steps: settings.steps,- scheduler: coerceSchedulerForGraph(model, settings.scheduler),+ scheduler: coerceUpscaleScheduler(model, settings.scheduler),type: 'flux_denoise',width: denoiseSize.width,});@@ -427,13 +433,15 @@ const buildFluxUpscalePath: UpscalePathBuilder = ({addEdge(graph, loraSource, 'transformer', denoise, 'transformer');addEdge(graph, seed, 'value', denoise, 'seed');- addEdge(graph, fitFrameToDenoiseSize(graph, frame, denoiseSize), 'image', imageToLatents, 'image');+ const fitted = fitFrameToDenoiseSize(graph, frame, denoiseSize);++ addEdge(graph, fitted, 'image', imageToLatents, 'image');addEdge(graph, modelLoader, 'vae', imageToLatents, 'vae');addEdge(graph, imageToLatents, 'latents', denoise, 'latents');addEdge(graph, denoise, 'latents', output, 'latents');addEdge(graph, modelLoader, 'vae', output, 'vae');- return { output, title: `${model.name} upscale` };+ return { frame: fitted, output, title: `${model.name} upscale` };};/**@@ -484,7 +492,7 @@ const buildZImageUpscalePath: UpscalePathBuilder = ({guidance_scale: settings.cfgScale,height: denoiseSize.height,id: 'denoise_latents',- scheduler: coerceSchedulerForGraph(model, settings.scheduler),+ scheduler: coerceUpscaleScheduler(model, settings.scheduler),steps: settings.steps,type: 'z_image_denoise',width: denoiseSize.width,@@ -532,7 +540,7 @@ const buildZImageUpscalePath: UpscalePathBuilder = ({addEdge(graph, tileControl, 'control', denoise, 'control');}- return { output, title: `${model.name} upscale` };+ return { frame: fitted, output, title: `${model.name} upscale` };};/**@@ -580,7 +588,7 @@ const buildAnimaUpscalePath: UpscalePathBuilder = ({guidance_scale: settings.cfgScale,height: denoiseSize.height,id: 'denoise_latents',- scheduler: coerceSchedulerForGraph(model, settings.scheduler),+ scheduler: coerceUpscaleScheduler(model, settings.scheduler),steps: settings.steps,type: 'anima_denoise',width: denoiseSize.width,@@ -605,13 +613,15 @@ const buildAnimaUpscalePath: UpscalePathBuilder = ({});addEdge(graph, loraSource, 'transformer', denoise, 'transformer');addEdge(graph, seed, 'value', denoise, 'seed');- addEdge(graph, fitFrameToDenoiseSize(graph, frame, denoiseSize), 'image', imageToLatents, 'image');+ const fitted = fitFrameToDenoiseSize(graph, frame, denoiseSize);++ addEdge(graph, fitted, 'image', imageToLatents, 'image');addEdge(graph, modelLoader, 'vae', imageToLatents, 'vae');addEdge(graph, imageToLatents, 'latents', denoise, 'latents');addEdge(graph, denoise, 'latents', output, 'latents');addEdge(graph, modelLoader, 'vae', output, 'vae');- return { output, title: `${model.name} upscale` };+ return { frame: fitted, output, title: `${model.name} upscale` };};/**@@ -714,7 +724,7 @@ export const compileUpscaleGraph = (addEdge(graph, spandrelAutoscale, 'image', unsharpMask, 'image');- const { output, title } = buildPath({+ const path = buildPath({components: activeUpscaleComponents(settings),denoiseSize,denoisingStart,@@ -729,11 +739,11 @@ export const compileUpscaleGraph = (settings,});- addUpscaleMetadata(graph, output, settings, projectSettings, randDevice);+ addUpscaleMetadata(graph, path, settings, projectSettings, randDevice);return {backendGraph: graph,- graph: toGraphContract(graph, title),+ graph: toGraphContract(graph, path.title),negativePromptNodeId: 'negative_prompt',outputNodeId: 'upscale_output',positivePromptNodeId: 'positive_prompt',diff --git a/invokeai/frontend/webv2/src/features/upscale/core/indexClippedStarts.test.ts b/invokeai/frontend/webv2/src/features/upscale/core/indexClippedStarts.test.tsindex f9db4c6298..5ff37d3233 100644--- a/invokeai/frontend/webv2/src/features/upscale/core/indexClippedStarts.test.ts+++ b/invokeai/frontend/webv2/src/features/upscale/core/indexClippedStarts.test.ts@@ -46,8 +46,11 @@ describe('index-clipped denoising starts', () => {'Generated by src/features/upscale/core/indexClippedStarts.test.ts; regenerate with `vitest -u`. ' +'Consumed by tests/app/invocations/test_upscale_index_clipped_starts.py, which drives the real ' +'z_image_denoise and anima_denoise with each denoisingStart and checks the pass enters at the ' +- 'step nearest fluxEntrySigma.',+ 'step nearest fluxEntrySigma, and that the schedulers offered are the ones that start there.',cases,+ schedulers: Object.fromEntries(+ Object.keys(FRAME_SIDES).map((base) => [base, UPSCALE_ARCHITECTURES[base as UpscaleBase].schedulers])+ ),};await expect(`${JSON.stringify(fixture, null, 2)}\n`).toMatchFileSnapshot(diff --git a/invokeai/frontend/webv2/src/features/upscale/core/integration.test.ts b/invokeai/frontend/webv2/src/features/upscale/core/integration.test.tsindex 2555c05c9e..01b8c719c1 100644--- a/invokeai/frontend/webv2/src/features/upscale/core/integration.test.ts+++ b/invokeai/frontend/webv2/src/features/upscale/core/integration.test.ts@@ -1,5 +1,6 @@import type { ModelConfig } from '@features/models';+import { seedArchitectureCapabilities } from '@features/generation/core/architectureCapabilities.testing';import { createInitialWorkbenchState, workbenchReducer } from '@workbench/workbenchState.testing';import { describe, expect, it, vi } from 'vitest';@@ -24,6 +25,9 @@ const MODELS = [model('tile', 'controlnet', 'sdxl', 'SDXL Tile ControlNet'),];+// Upscale, like Generate, does not submit without the served architecture table.+seedArchitectureCapabilities();+describe('Upscale snapshot submission', () => {it('captures a resolved immutable snapshot, prompt history, graph preview, and generate-style backend request', () => {vi.spyOn(Math, 'random').mockReturnValue(0.25);diff --git a/invokeai/frontend/webv2/src/features/upscale/core/settings.test.ts b/invokeai/frontend/webv2/src/features/upscale/core/settings.test.tsindex 9482be0f55..0e8fa82abb 100644--- a/invokeai/frontend/webv2/src/features/upscale/core/settings.test.ts+++ b/invokeai/frontend/webv2/src/features/upscale/core/settings.test.ts@@ -6,6 +6,7 @@ import {architectureCapabilitiesFixture,seedArchitectureCapabilities,} from '@features/generation/core/architectureCapabilities.testing';+import { getSchedulerOptions } from '@features/generation/settings';import { describe, expect, it } from 'vitest';import {@@ -17,11 +18,13 @@ import {spandrelAutoscaleDimension,upscaleDenoiseDimension,activeUpscaleComponents,+ coerceUpscaleScheduler,isTileControlNetCandidate,selectUpscaleMainModel,syncUpscaleWidgetValuesWithModels,UPSCALE_ARCHITECTURES,UPSCALE_PRESETS,+ upscaleSchedulerOptions,} from './settings';// VAE compatibility is served by the backend now, and the accessor fails closed without it.@@ -91,7 +94,10 @@ describe('upscale settings', () => {scale: 4,tileSize: 1024,});- expect(getUpscaleOutputDimensions({ height: 101, width: 203 }, 2.5)).toEqual({ height: 248, width: 504 });+ expect(getUpscaleOutputDimensions({ height: 101, width: 203 }, 2.5, MODELS[0] as never)).toEqual({+ height: 248,+ width: 504,+ });});it('reconciles required models, refreshes configs, and removes incompatible selections', () => {@@ -385,12 +391,23 @@ describe('picking a main model', () => {expect([turbo.cfgScale, fellBack.model?.key, fellBack.cfgScale]).toEqual([1, 'sd15', 2]);});- it('leaves CFG alone while the served table is missing, rather than writing the fallback 7', () => {- resetArchitectureCapabilities();+ it('refuses to run without the served table, rather than compile its fallbacks', () => {+ // A model picked without the table would keep a fallback CFG for good, every VAE would read as+ // incompatible and the schedulers would fall back; the widget is gated on the table for the same reason.+ const turbo = selectUpscaleMainModel(+ {+ ...createDefaultUpscaleWidgetValues(MODELS_BY_BASE),+ inputImage: { height: 8, image_name: 'in.png', width: 8 },+ },+ MODELS_BY_BASE[2] as never,+ MODELS_BY_BASE+ );- const fresh = syncUpscaleWidgetValuesWithModels(createDefaultUpscaleWidgetValues(), [MODELS_BY_BASE[2]!]);+ resetArchitectureCapabilities();- expect([fresh.model?.key, fresh.cfgScale]).toEqual(['z-turbo', 2]);+ expect(getUpscaleValidationReasons(turbo)).toEqual([+ 'Model capabilities are not available. Upscale is blocked until they load; if this persists, retry from the Upscale panel.',+ ]);});it('keeps the CFG the user tuned when the same model is picked again', () => {@@ -415,6 +432,35 @@ describe('picking a main model', () => {});});+describe('schedulers per architecture', () => {+ it('offers only the schedulers that start where Creativity puts the pass', () => {+ const offered = (base: string) =>+ upscaleSchedulerOptions(model(base, 'main', base) as never).map((option) => option.value);++ // A single scheduler hides the field.+ expect(offered('flux')).toEqual(['euler']);+ expect(offered('z-image')).toEqual(['euler']);+ expect(offered('anima')).toEqual(['euler', 'dpmpp_2m', 'dpmpp_2m_sde', 'er_sde']);+ // SD's pass adds noise with the scheduler itself, so every one of its schedulers starts there.+ expect(offered('sdxl')).toEqual(+ getSchedulerOptions(model('sdxl', 'main', 'sdxl') as never).map((option) => option.value)+ );+ });++ it('runs one of the schedulers it shows, whatever is stored', () => {+ const stored = ['euler', 'heun', 'lcm', 'dpmpp_2m', 'dpmpp_2m_sde', 'er_sde', 'kdpm_2', 'euler_a'];++ for (const base of Object.keys(UPSCALE_ARCHITECTURES)) {+ const main = model(base, 'main', base) as never;+ const shown = upscaleSchedulerOptions(main).map((option) => option.value);++ for (const scheduler of stored) {+ expect(shown, `${base} with ${scheduler} stored`).toContain(coerceUpscaleScheduler(main, scheduler));+ }+ }+ });+});+describe('tile ControlNet per architecture', () => {const zImage = { base: 'z-image' };const tile = model('zt', 'controlnet', 'z-image', 'Z-Image ControlNet Tile');@@ -459,4 +505,13 @@ describe('upscaleDenoiseDimension', () => {it('never returns zero for a tiny frame', () => {expect(upscaleDenoiseDimension(4, 1, 16)).toBe(16);});++ it("shows the size the result comes out at, which a 16px pass makes smaller than Spandrel's", () => {+ // 1004 at 2x: Spandrel gives 2008, which FLUX.1 and Z-Image resize to 2000.+ const widths = ['sd-1', 'flux', 'z-image', 'anima'].map(+ (base) => getUpscaleOutputDimensions({ height: 1004, width: 1004 }, 2, model(base, 'main', base) as never).width+ );++ expect(widths).toEqual([2008, 2000, 2000, 2008]);+ });});diff --git a/invokeai/frontend/webv2/src/features/upscale/core/settings.ts b/invokeai/frontend/webv2/src/features/upscale/core/settings.tsindex 29a7ce8699..6d814e613e 100644--- a/invokeai/frontend/webv2/src/features/upscale/core/settings.ts+++ b/invokeai/frontend/webv2/src/features/upscale/core/settings.ts@@ -9,9 +9,11 @@ import type {import type { ModelConfig } from '@features/models';import {+ coerceSchedulerForGraph,DEFAULT_NEGATIVE_PROMPT_HEIGHT_PX,DEFAULT_POSITIVE_PROMPT_HEIGHT_PX,getDefaultGenerateSettings,+ getSchedulerOptions,hasArchitectureCapabilities,isAnimaQwen35Encoder,isAnimaQwen3Encoder,@@ -170,6 +172,14 @@ export interface UpscaleArchitecture {* start for the same Creativity; null where the node clips by value or runs its own schedule.*/readonly indexClippedShift: ((size: { width: number; height: number }) => number) | null;+ /**+ * The schedulers that start where Creativity puts the pass; null where all of the base's do. The+ * img2img blend noises the frame to the clipped schedule's first sigma, but Heun and LCM on the+ * flow models build their own schedule from pure noise and denoise the frame as if it were noise.+ * Anima's Heun clips its own schedule, which runs from 1 to nearly 0, so it starts below the blend+ * and leaves noise behind. `test_upscale_index_clipped_starts.py` checks the index-clipped lists.+ */+ readonly schedulers: readonly string[] | null;/*** Whether a new main model sets CFG to that model's served default. Z-Image Turbo is distilled for* CFG 1, and anything above runs a second, unconditional pass per step at upscale resolution;@@ -190,6 +200,7 @@ export const UPSCALE_ARCHITECTURES = {indexClippedShift: null,label: 'SD1.5',negativePrompt: 'always',+ schedulers: null,takesModelGuidance: false,tileControlNet: SD_TILE_CONTROLNET,},@@ -199,6 +210,7 @@ export const UPSCALE_ARCHITECTURES = {indexClippedShift: null,label: 'SDXL',negativePrompt: 'always',+ schedulers: null,takesModelGuidance: false,tileControlNet: SD_TILE_CONTROLNET,},@@ -212,6 +224,9 @@ export const UPSCALE_ARCHITECTURES = {indexClippedShift: null,label: 'FLUX.1',negativePrompt: 'never',+ // `flux/denoise.py` hands Heun and LCM to the same diffusers schedulers as `z_image_denoise`, so+ // when the backend contract finds Z-Image's Heun starting at the blend, this list is due as well.+ schedulers: ['euler'],takesModelGuidance: false,tileControlNet: null,},@@ -223,6 +238,7 @@ export const UPSCALE_ARCHITECTURES = {indexClippedShift: zImageScheduleShift,label: 'Z-Image',negativePrompt: 'cfg-gated',+ schedulers: ['euler'],takesModelGuidance: true,tileControlNet: { matchesName: nameIncludes('tile'), required: false },},@@ -236,6 +252,7 @@ export const UPSCALE_ARCHITECTURES = {indexClippedShift: () => ANIMA_SCHEDULE_SHIFT,label: 'Anima',negativePrompt: 'cfg-gated',+ schedulers: ['euler', 'dpmpp_2m', 'dpmpp_2m_sde', 'er_sde'],takesModelGuidance: true,tileControlNet: null,},@@ -283,6 +300,26 @@ export const wiresUpscaleNegativePrompt = (model: MainModelConfig | null, cfgScaexport const upscaleMinSteps = (model: MainModelConfig | null): number =>upscaleArchitectureFor(model)?.indexClippedShift ? 2 : 1;+/** The base's schedulers, less those that would ignore Creativity; see `schedulers`. */+export const upscaleSchedulerOptions = (model: MainModelConfig | null) => {+ const options = getSchedulerOptions(model ?? undefined);+ const allowed = upscaleArchitectureFor(model)?.schedulers;++ return allowed ? options.filter((option) => allowed.includes(option.value)) : options;+};++/**+ * The scheduler the pass runs with. The stored value is left alone, so a switch back to SD brings back+ * the SD scheduler the flow models do not have; until then the graph and the metadata record the one+ * that runs, and so does the field where there is more than one to choose.+ */+export const coerceUpscaleScheduler = (model: MainModelConfig | null, scheduler: string): string => {+ const coerced = coerceSchedulerForGraph(model ?? undefined, scheduler);+ const allowed = upscaleArchitectureFor(model)?.schedulers;++ return !allowed || allowed.includes(coerced) ? coerced : (allowed[0] ?? coerced);+};+/** What Spandrel's autoscale produces: the scaled dimension floored to a multiple of 8. */export const spandrelAutoscaleDimension = (dimension: number, scale: number): number =>Math.floor(Math.trunc(dimension * scale) / 8) * 8;@@ -455,17 +492,15 @@ const DEFAULT_UPSCALE_CFG_SCALE = 2;* The CFG a change of main model leaves, see `takesModelGuidance`. Leaving a model that took its* served guidance for one that keeps the user's restores the widget's default, so SD's tuned pass* does not inherit Turbo's 1, nor FLUX Anima-3.8B's 6.+ *+ * The default is applied once, at the change, so the change must not happen before the served table+ * has loaded: the widget is gated on it, and validation refuses to run without it.*/const guidanceAfterModelChange = (previous: MainModelConfig | null,next: MainModelConfig | null,current: number): number => {- // Without the served table the defaults fall back to a generic 7, which would burn a Turbo pass- // and then stick, since nothing re-applies a default to a model that is already selected.- if (!hasArchitectureCapabilities()) {- return current;- }if (next && upscaleArchitectureFor(next)?.takesModelGuidance) {return getDefaultGenerateSettings(next).cfgScale;}@@ -658,6 +693,14 @@ const addRangeReason = (reasons: string[], label: string, value: number, min: nu};export const getUpscaleValidationReasons = (values: UpscaleWidgetValues, models?: readonly ModelConfig[]): string[] => {+ // As in Generate: without the served table every VAE reads as incompatible and the schedulers fall+ // back, so the other reasons would mislead and the graph would be wrong.+ if (!hasArchitectureCapabilities()) {+ return [+ 'Model capabilities are not available. Upscale is blocked until they load; if this persists, retry from the Upscale panel.',+ ];+ }+const reasons: string[] = [];if (!values.inputImage) {@@ -787,13 +830,23 @@ export const getUpscaleValidationReasons = (values: UpscaleWidgetValues, models?return reasons;};+/**+ * The size the result comes out at: Spandrel's scaled frame, floored to the grid of a pass that+ * resizes it. One exception cannot be seen from here: a 1x restoration model leaves the frame at the+ * source size, and SD's pass keeps that size. Spandrel's model configs do not carry the scale.+ */export const getUpscaleOutputDimensions = (image: Pick<ImageWithDims, 'width' | 'height'>,- scale: number-): { width: number; height: number } => ({- height: Math.floor((image.height * scale) / 8) * 8,- width: Math.floor((image.width * scale) / 8) * 8,-});+ scale: number,+ model: MainModelConfig | null+): { width: number; height: number } => {+ const grid = upscaleArchitectureFor(model)?.denoiseGrid ?? 8;++ return {+ height: upscaleDenoiseDimension(image.height, scale, grid),+ width: upscaleDenoiseDimension(image.width, scale, grid),+ };+};export const clearDeletedUpscaleInput = (values: UpscaleWidgetValues,diff --git a/invokeai/frontend/webv2/src/features/upscale/ui/UpscaleWidgetView.tsx b/invokeai/frontend/webv2/src/features/upscale/ui/UpscaleWidgetView.tsxindex 9bf86c599f..5be831bdf1 100644--- a/invokeai/frontend/webv2/src/features/upscale/ui/UpscaleWidgetView.tsx+++ b/invokeai/frontend/webv2/src/features/upscale/ui/UpscaleWidgetView.tsx@@ -17,6 +17,7 @@ import {Text,} from '@chakra-ui/react';import {+ CapabilitiesGate,ConceptList,type ConceptModelPort,ConceptRow,@@ -34,8 +35,6 @@ import {isLoraCompatibleWithModel,isLoraModelConfig,isMainModelConfig,- coerceSchedulerForGraph,- getSchedulerOptions,isModelIdentifierConfig,isVaeCompatibleWithGenerateModel,isVaeModelConfig,@@ -50,6 +49,7 @@ import {} from '@features/models';import { ModelSelect } from '@features/models/react';import {+ coerceUpscaleScheduler,createDefaultUpscaleWidgetValues,getUpscaleOutputDimensions,isSpandrelModelConfig,@@ -72,6 +72,7 @@ import {UPSCALE_TILE_SIZE_MIN,upscaleComponentsFor,upscaleMinSteps,+ upscaleSchedulerOptions,} from '@features/upscale/core/settings';import { SEED_MAX } from '@platform/core/seed';import { useMountEffect } from '@platform/react/useMountEffect';@@ -146,7 +147,8 @@ const COMPONENT_FIELD_UI: Record<},};-const selectCapabilitiesStatus = (snapshot: ArchitectureCapabilitiesSnapshot) => snapshot.status;+// Revision zero means the table is absent, whatever its request's status.+const selectCapabilitiesRevision = (snapshot: ArchitectureCapabilitiesSnapshot) => snapshot.revision;const SCALE_MARKS = [1, 2, 4, 8, 16];const CREATIVITY_MARKS = [UPSCALE_CREATIVITY_MIN, 0, UPSCALE_CREATIVITY_MAX];const STRUCTURE_MARKS = [UPSCALE_STRUCTURE_MIN, 0, UPSCALE_STRUCTURE_MAX];@@ -200,9 +202,11 @@ const getRangeError = (label: string, value: number, min: number, max: number):const UpscaleOutputPreflight = memo(function UpscaleOutputPreflight({inputImage,+ model,scale,}: {inputImage: UpscaleWidgetValues['inputImage'];+ model: UpscaleWidgetValues['model'];scale: number;}) {const { t } = useTranslation();@@ -211,7 +215,7 @@ const UpscaleOutputPreflight = memo(return null;}- const output = getUpscaleOutputDimensions(inputImage, scale);+ const output = getUpscaleOutputDimensions(inputImage, scale, model);const outputMegapixels = (output.width * output.height) / 1_000_000;const isLargeOutput = outputMegapixels >= LARGE_OUTPUT_MEGAPIXELS;@@ -294,7 +298,11 @@ const UpscaleOutputPreflight = memo(</Stack>);},- (previous, next) => previous.scale === next.scale && areInputImagesEquivalent(previous.inputImage, next.inputImage)+ (previous, next) =>+ previous.scale === next.scale &&+ // The grid comes from the architecture, so another model of the same base changes nothing.+ previous.model?.base === next.model?.base &&+ areInputImagesEquivalent(previous.inputImage, next.inputImage));const UpscaleModelReconciler = ({@@ -334,14 +342,16 @@ export const UpscaleWidgetView = () => {const selection = useUpscaleUi();const models = useModelsSelector((snapshot) => snapshot.models);const modelsStatus = useModelsSelector((snapshot) => snapshot.status);- const capabilitiesStatus = useExternalStoreSelector(+ const capabilitiesRevision = useExternalStoreSelector(subscribeArchitectureCapabilities,getArchitectureCapabilitiesSnapshot,- selectCapabilitiesStatus+ selectCapabilitiesRevision);- // The sync picks VAEs and a new model's CFG from the served table, so like Generate's reconcile it- // waits for that table. A failed fetch still syncs; the CFG rule then leaves CFG alone.- const canSync = modelsStatus === 'loaded' && (capabilitiesStatus === 'loaded' || capabilitiesStatus === 'error');+ // The sync picks VAEs and a new model's CFG from the served table, and a default applied without it+ // would stick: nothing re-applies one to a model already selected. So the sync waits for the table,+ // and until then the gate holds back the form, its model picker included.+ const hasCapabilities = capabilitiesRevision > 0;+ const canSync = modelsStatus === 'loaded' && hasCapabilities;const { patchPromptDraft: patchDraft, patchValues, projectId, promptDraft, rawValues } = selection;// Reuse normalization/reconciliation results across unrelated renders to preserve section identities.const values = useMemo(() => {@@ -547,17 +557,25 @@ export const UpscaleWidgetView = () => {);const vaePrecisionValue = useMemo(() => [values.vaePrecision], [values.vaePrecision]);- // The architecture's own list, showing the scheduler the graph will really run. The stored value is- // left alone, so switching back to SD brings back an SD scheduler the flow models do not have.- const schedulerOptions = useMemo(() => getSchedulerOptions(values.model ?? undefined), [values.model]);- const scheduler = coerceSchedulerForGraph(values.model ?? undefined, values.scheduler);+ // The architecture's own list, less the schedulers that would ignore Creativity, showing the one the+ // graph will really run. Where one is left there is nothing to choose, and the field goes.+ const schedulerOptions = useMemo(() => upscaleSchedulerOptions(values.model), [values.model]);+ const scheduler = coerceUpscaleScheduler(values.model, values.scheduler);+ const gateLabels = useMemo(+ () => ({+ loadFailed: t('widgets.upscale.capabilitiesLoadFailed'),+ loading: t('widgets.upscale.loadingCapabilities'),+ retry: t('widgets.upscale.retry'),+ }),+ [t]+ );const sharedBadge = useMemo(() => <Badge fontFamily="mono">{t('widgets.upscale.shared')}</Badge>, [t]);- return (+ const form = (<Stack gap={1} minW={0} p="1"><UpscaleModelReconciler- key={`${projectId}:${modelsStatus}:${capabilitiesStatus}:${modelsFingerprint}`}+ key={`${projectId}:${modelsStatus}:${capabilitiesRevision}:${modelsFingerprint}`}rawValues={rawValues}values={values}/>@@ -565,7 +583,7 @@ export const UpscaleWidgetView = () => {<GenerationSettingsSection label={t('widgets.upscale.sourceAndTreatment')} defaultOpen><Stack gap="3" p="2"><UpscaleImageField inputImage={values.inputImage} onChange={set.inputImage} />- <UpscaleOutputPreflight inputImage={values.inputImage} scale={values.scale} />+ <UpscaleOutputPreflight inputImage={values.inputImage} model={values.model} scale={values.scale} /><Fielderror={values.upscaleModel ? undefined : t('widgets.upscale.spandrelModelRequired')}helpText={values.upscaleModel ? t('widgets.upscale.spandrelModelHelp') : undefined}@@ -702,14 +720,16 @@ export const UpscaleWidgetView = () => {value={values.cfgScale}onChange={set.cfgScale}/>- <Field hint="scheduler" label={t('widgets.upscale.scheduler')}>- <Combobox- aria-label={t('widgets.upscale.scheduler')}- options={schedulerOptions}- value={scheduler}- onValueChange={set.scheduler}- />- </Field>+ {schedulerOptions.length > 1 ? (+ <Field hint="scheduler" label={t('widgets.upscale.scheduler')}>+ <Combobox+ aria-label={t('widgets.upscale.scheduler')}+ options={schedulerOptions}+ value={scheduler}+ onValueChange={set.scheduler}+ />+ </Field>+ ) : null}<Separator borderColor="border.subtle" /><SeedFieldbatchCount={values.batchCount}@@ -851,4 +871,10 @@ export const UpscaleWidgetView = () => {</GenerationSettingsSection></Stack>);++ return (+ <CapabilitiesGate isReady={hasCapabilities} labels={gateLabels}>+ {form}+ </CapabilitiesGate>+ );};diff --git a/invokeai/frontend/webv2/src/workbench/workbenchState.ts b/invokeai/frontend/webv2/src/workbench/workbenchState.tsindex 6112f9212a..4a233f8afb 100644--- a/invokeai/frontend/webv2/src/workbench/workbenchState.ts+++ b/invokeai/frontend/webv2/src/workbench/workbenchState.ts@@ -3537,7 +3537,7 @@ const enqueueCompiledSnapshot = (route.sourceId === 'video' && videoSettings?.model ? getVideoDimensions(videoSettings.model, videoSettings) : null;const presentationDimensions =route.sourceId === 'upscale' && upscaleSettings?.inputImage- ? getUpscaleOutputDimensions(upscaleSettings.inputImage, upscaleSettings.scale)+ ? getUpscaleOutputDimensions(upscaleSettings.inputImage, upscaleSettings.scale, upscaleSettings.model): videoPresentationDimensions? videoPresentationDimensions: {diff --git a/tests/app/invocations/test_upscale_index_clipped_starts.py b/tests/app/invocations/test_upscale_index_clipped_starts.pyindex 3c4d39ea03..e17c3596c1 100644--- a/tests/app/invocations/test_upscale_index_clipped_starts.py+++ b/tests/app/invocations/test_upscale_index_clipped_starts.py@@ -12,6 +12,10 @@ real `_get_sigmas`, the real clipping and the real img2img blend -- and reads thof the blended tensor. It has to be the step nearest FLUX's entry. A change to either node's shift,schedule or clipping fails here instead of silently moving every Upscale preset; that includes a moveto value clipping, which would leave the translation entering far too late.++The blend only helps if the scheduler then starts where it left the latents. The fixture also records+which schedulers the widget offers each node, and that has to be exactly the set that does: one that+builds its own schedule would denoise the frame as if it were pure noise, or leave noise in it."""import json@@ -25,6 +29,8 @@ import torchfrom invokeai.app.invocations.anima.anima_denoise import AnimaDenoiseInvocationfrom invokeai.app.invocations.z_image.z_image_denoise import ZImageDenoiseInvocation+from invokeai.backend.anima.scheduler_driver import AnimaSchedulerDriver+from invokeai.backend.flux.schedulers import ANIMA_SCHEDULER_MAP, ZIMAGE_SCHEDULER_MAPFIXTURE = (Path(__file__).parents[3]@@ -38,11 +44,27 @@ FIXTURE = (/ "__snapshots__"/ "upscaleIndexClippedStarts.json")-CASES = json.loads(FIXTURE.read_text(encoding="utf-8"))["cases"]+FIXTURE_DATA = json.loads(FIXTURE.read_text(encoding="utf-8"))+CASES = FIXTURE_DATA["cases"]+OFFERED_SCHEDULERS = FIXTURE_DATA["schedulers"]+Z_IMAGE_MODULE = "invokeai.app.invocations.z_image.z_image_denoise"+ANIMA_MODULE = "invokeai.app.invocations.anima.anima_denoise"++class _Stop(Exception):+ """Ends the run at the probe that raised it."""-class _StopAfterBlend(Exception):- """Ends the run at the first call after the img2img blend."""++def _run_until_stopped(node, module: str, dtype_attr: str, context, noise: torch.Tensor, patches) -> None:+ with ExitStack() as stack:+ stack.enter_context(patch(f"{module}.TorchDevice.choose_torch_device", return_value=torch.device("cpu")))+ # float32: the entry sigma is read back out of the tensor, and bfloat16 keeps three digits.+ stack.enter_context(patch(f"{module}.TorchDevice.{dtype_attr}", return_value=torch.float32))+ stack.enter_context(patch.object(node, "_prepare_noise_tensor", return_value=noise))+ for extra in patches:+ stack.enter_context(extra)+ with pytest.raises(_Stop):+ node._run_diffusion(context)def _entry(node, module: str, dtype_attr: str, latents: torch.Tensor, noise: torch.Tensor, patches) -> tuple:@@ -62,28 +84,25 @@ def _entry(node, module: str, dtype_attr: str, latents: torch.Tensor, noise: tordef capture(_context, blended):captured["latents"] = blended- raise _StopAfterBlend+ raise _Stopcontext = MagicMock()context.tensors.load.return_value = latents- with ExitStack() as stack:- stack.enter_context(patch(f"{module}.TorchDevice.choose_torch_device", return_value=torch.device("cpu")))- # float32: the entry sigma is read back out of the tensor, and bfloat16 keeps three digits.- stack.enter_context(patch(f"{module}.TorchDevice.{dtype_attr}", return_value=torch.float32))- stack.enter_context(patch.object(node, "_prepare_noise_tensor", return_value=noise))- stack.enter_context(patch.object(node, "_get_sigmas", record))- stack.enter_context(patch.object(node, "_prep_inpaint_mask", capture))- for extra in patches:- stack.enter_context(extra)- with pytest.raises(_StopAfterBlend):- node._run_diffusion(context)+ _run_until_stopped(+ node,+ module,+ dtype_attr,+ context,+ noise,+ [patch.object(node, "_get_sigmas", record), patch.object(node, "_prep_inpaint_mask", capture), *patches],+ )blended = captured["latents"]assert torch.allclose(blended, blended.flatten()[:1].expand_as(blended)), "the blend should be uniform"return schedule["sigmas"], float(blended.flatten()[0])-def z_image_entry(side: int, steps: int, denoising_start: float) -> tuple[list[float], float]:+def _z_image_node(side: int, steps: int, denoising_start: float, scheduler: str) -> tuple:node = ZImageDenoiseInvocation.model_construct(id="upscale",latents=MagicMock(latents_name="latents"),@@ -97,30 +116,65 @@ def z_image_entry(side: int, steps: int, denoising_start: float) -> tuple[list[fpositive_conditioning=SimpleNamespace(conditioning_name="positive", mask=None),transformer=MagicMock(transformer="transformer"),seed=0,- scheduler="euler",+ scheduler=scheduler,)regional = SimpleNamespace(regional_text_conditioning=SimpleNamespace(prompt_embeds=torch.zeros(1, 4, 16)))+ conditioning = [+ patch(f"{Z_IMAGE_MODULE}.ZImageRegionalPromptingExtension.from_text_conditionings", return_value=regional),+ patch.object(+ node,+ "_load_text_conditioning",+ return_value=[SimpleNamespace(prompt_embeds=torch.zeros(1, 4, 16), mask=None)],+ ),+ ]+ return node, conditioning+++def z_image_entry(side: int, steps: int, denoising_start: float) -> tuple[list[float], float]:+ node, conditioning = _z_image_node(side, steps, denoising_start, "euler")return _entry(node,- "invokeai.app.invocations.z_image.z_image_denoise",+ Z_IMAGE_MODULE,"choose_bfloat16_safe_dtype",torch.zeros(1, 16, 8, 8),torch.ones(1, 16, 8, 8),+ conditioning,+ )+++def z_image_scheduler_entry(side: int, steps: int, denoising_start: float, scheduler: str) -> float:+ """The sigma `z_image_denoise` hands the transformer first, read off the scheduler it set up."""+ node, conditioning = _z_image_node(side, steps, denoising_start, scheduler)+ made = []++ def recording(scheduler_class):+ def make(**kwargs):+ made.append(scheduler_class(**kwargs))+ return made[-1]++ return make++ context = MagicMock()+ context.tensors.load.return_value = torch.zeros(1, 16, 8, 8)+ # The first call after the scheduler has its timesteps.+ context.models.get_config.side_effect = _Stop+ _run_until_stopped(+ node,+ Z_IMAGE_MODULE,+ "choose_bfloat16_safe_dtype",+ context,+ torch.ones(1, 16, 8, 8),[- patch(- "invokeai.app.invocations.z_image.z_image_denoise.ZImageRegionalPromptingExtension.from_text_conditionings",- return_value=regional,- ),- patch.object(- node,- "_load_text_conditioning",- return_value=[SimpleNamespace(prompt_embeds=torch.zeros(1, 4, 16), mask=None)],- ),+ patch.dict(ZIMAGE_SCHEDULER_MAP, {name: recording(cls) for name, cls in ZIMAGE_SCHEDULER_MAP.items()}),+ patch.object(node, "_prep_inpaint_mask", return_value=None),+ *conditioning,],)+ (scheduler_instance,) = made+ return scheduler_instance.timesteps[0].item() / scheduler_instance.config.num_train_timesteps-def anima_entry(side: int, steps: int, denoising_start: float) -> tuple[list[float], float]:+def _anima_node(side: int, steps: int, denoising_start: float, scheduler: str) -> tuple:node = AnimaDenoiseInvocation.model_construct(id="upscale",latents=MagicMock(latents_name="latents"),@@ -138,19 +192,56 @@ def anima_entry(side: int, steps: int, denoising_start: float) -> tuple[list[flotransformer=MagicMock(transformer="transformer"),control_lllite=None,seed=0,- scheduler="euler",+ scheduler=scheduler,)+ return node, [patch.object(node, "_load_text_conditionings", return_value=[SimpleNamespace(mask=None)])]+++def anima_entry(side: int, steps: int, denoising_start: float) -> tuple[list[float], float]:+ node, conditioning = _anima_node(side, steps, denoising_start, "euler")return _entry(node,- "invokeai.app.invocations.anima.anima_denoise",+ ANIMA_MODULE,"choose_anima_inference_dtype",torch.zeros(1, 16, 8, 8),torch.ones(1, 16, 1, 8, 8),- [patch.object(node, "_load_text_conditionings", return_value=[SimpleNamespace(mask=None)])],+ conditioning,)+def anima_scheduler_entry(side: int, steps: int, denoising_start: float, scheduler: str) -> float:+ """The sigma `anima_denoise` hands the transformer first, read off the real scheduler driver."""+ node, conditioning = _anima_node(side, steps, denoising_start, scheduler)+ first: dict[str, float] = {}++ def probe(**kwargs):+ first["sigma"] = next(AnimaSchedulerDriver(**kwargs).iterations()).sigma_curr+ raise _Stop++ context = MagicMock()+ context.tensors.load.return_value = torch.zeros(1, 16, 8, 8)+ _run_until_stopped(+ node,+ ANIMA_MODULE,+ "choose_anima_inference_dtype",+ context,+ torch.ones(1, 16, 1, 8, 8),+ [+ patch(f"{ANIMA_MODULE}.AnimaSchedulerDriver", probe),+ patch.object(node, "_prep_inpaint_mask", return_value=None),+ *conditioning,+ ],+ )+ return first["sigma"]++ENTRY = {"z-image": z_image_entry, "anima": anima_entry}+SCHEDULER_ENTRY = {"z-image": z_image_scheduler_entry, "anima": anima_scheduler_entry}+SCHEDULERS = {"z-image": ZIMAGE_SCHEDULER_MAP, "anima": ANIMA_SCHEDULER_MAP}+# Under half the narrowest step at any fixture entry (0.011), so no scheduler passes a step off. DPM+++# builds its own schedule, ending at 1/1000 rather than 0, and rounds its timesteps to integers: that+# moves its entry by up to 0.0013, which is not a step.+ENTRY_TOLERANCE = 0.005def test_the_fixture_covers_both_index_clipping_nodes():@@ -174,3 +265,30 @@ def test_the_pass_enters_at_the_step_nearest_where_flux_enters(case: dict) -> Nof"the widget sends denoising_start={case['denoisingStart']:.6f}, which enters at sigma {entry:.4f}; "f"the step nearest FLUX's {target:.4f} is at {nearest:.4f}")++[email protected]("base", sorted(ENTRY))+def test_the_widget_offers_exactly_the_schedulers_that_start_where_the_blend_left_the_latents(base: str) -> None:+ cases = [case for case in CASES if case["base"] == base]+ blends = [ENTRY[base](case["side"], case["steps"], case["denoisingStart"])[1] for case in cases]+ misses: dict[str, float] = {}++ for scheduler in SCHEDULERS[base]:+ # Euler is not handed to a diffusers scheduler: the node steps the schedule it blended from.+ if scheduler == "euler":+ continue+ entries = [+ SCHEDULER_ENTRY[base](case["side"], case["steps"], case["denoisingStart"], scheduler) for case in cases+ ]+ worst = max(abs(entry - blend) for entry, blend in zip(entries, blends, strict=True))+ if worst > ENTRY_TOLERANCE:+ misses[scheduler] = worst++ starting_at_the_blend = sorted(set(SCHEDULERS[base]) - set(misses))+ assert sorted(OFFERED_SCHEDULERS[base]) == starting_at_the_blend, (+ f"the widget offers {base} {sorted(OFFERED_SCHEDULERS[base])}, but the schedulers that start where the "+ f"blend left the latents are {starting_at_the_blend} (worst misses: "+ + ", ".join(f"{name} {miss:.3f}" for name, miss in sorted(misses.items()))+ + "). Update `schedulers` in `features/upscale/core/settings.ts`, and FLUX.1's with Z-Image's: "+ + "`flux/denoise.py` uses the same diffusers schedulers."+ )