diff --git a/api/onnx_web/diffusers/run.py b/api/onnx_web/diffusers/run.py index 5ef6c331..7f7c340b 100644 --- a/api/onnx_web/diffusers/run.py +++ b/api/onnx_web/diffusers/run.py @@ -107,7 +107,7 @@ def run_txt2img_pipeline( loras, ) - def highres(tile: Image.Image, dims): + def highres_tile(tile: Image.Image, dims): tile = tile.resize((size.height, size.width)) if params.lpw: logger.debug("using LPW pipeline for highres") @@ -147,7 +147,7 @@ def run_txt2img_pipeline( image, size.height // highres.scale, highres.scale, - [highres], + [highres_tile], ) image = run_upscale_correction( diff --git a/gui/src/components/control/HighresControl.tsx b/gui/src/components/control/HighresControl.tsx index 47e11af1..ff62432b 100644 --- a/gui/src/components/control/HighresControl.tsx +++ b/gui/src/components/control/HighresControl.tsx @@ -8,7 +8,7 @@ import { useStore } from 'zustand'; import { ConfigContext, StateContext } from '../../state.js'; import { NumericField } from '../input/NumericField.js'; -export function UpscaleControl() { +export function HighresControl() { const { params } = mustExist(useContext(ConfigContext)); const state = mustExist(useContext(StateContext)); const highres = useStore(state, (s) => s.highres); @@ -31,11 +31,10 @@ export function UpscaleControl() { /> { setHighres({ @@ -46,9 +45,9 @@ export function UpscaleControl() { { setHighres({ @@ -58,10 +57,11 @@ export function UpscaleControl() { /> { setHighres({ diff --git a/gui/src/components/tab/Txt2Img.tsx b/gui/src/components/tab/Txt2Img.tsx index 9794edc7..37aba706 100644 --- a/gui/src/components/tab/Txt2Img.tsx +++ b/gui/src/components/tab/Txt2Img.tsx @@ -7,6 +7,7 @@ import { useMutation, useQueryClient } from 'react-query'; import { useStore } from 'zustand'; import { ClientContext, ConfigContext, StateContext } from '../../state.js'; +import { HighresControl } from '../control/HighresControl.js'; import { ImageControl } from '../control/ImageControl.js'; import { UpscaleControl } from '../control/UpscaleControl.js'; import { NumericField } from '../input/NumericField.js'; @@ -15,8 +16,8 @@ export function Txt2Img() { const { params } = mustExist(useContext(ConfigContext)); async function generateImage() { - const { model, txt2img, upscale } = state.getState(); - const { image, retry } = await client.txt2img(model, txt2img, upscale); + const { model, txt2img, upscale, highres } = state.getState(); + const { image, retry } = await client.txt2img(model, txt2img, upscale, highres); pushHistory(image, retry); } @@ -65,6 +66,7 @@ export function Txt2Img() { }} /> +