Minor bug fix

This commit is contained in:
psychedelicious 2022-09-18 21:13:42 +10:00
parent 09bf6dd7c1
commit e1f0ee819d
3 changed files with 11 additions and 5 deletions

View File

@ -94,8 +94,6 @@ export const frontendToBackendParameters = (
};
}
console.log(generationParameters)
return {
generationParameters,
esrganParameters,

View File

@ -43,9 +43,15 @@ const CurrentImageButtons = ({
setShouldShowImageDetails,
}: CurrentImageButtonsProps) => {
const dispatch = useAppDispatch();
const { intermediateImage } = useAppSelector(
(state: RootState) => state.gallery
);
const { upscalingLevel, gfpganStrength } = useAppSelector(
(state: RootState) => state.sd
);
const { isProcessing, isConnected, isGFPGANAvailable, isESRGANAvailable } =
useAppSelector(systemSelector);
@ -101,7 +107,8 @@ const CurrentImageButtons = ({
isDisabled={
!isESRGANAvailable ||
Boolean(intermediateImage) ||
!(isConnected && !isProcessing)
!(isConnected && !isProcessing) ||
!upscalingLevel
}
onClick={handleClickUpscale}
/>
@ -113,7 +120,8 @@ const CurrentImageButtons = ({
isDisabled={
!isGFPGANAvailable ||
Boolean(intermediateImage) ||
!(isConnected && !isProcessing)
!(isConnected && !isProcessing) ||
!gfpganStrength
}
onClick={handleClickFixFaces}
/>

View File

@ -2,7 +2,7 @@ import { createSlice } from '@reduxjs/toolkit';
import type { PayloadAction } from '@reduxjs/toolkit';
import { SDMetadata } from '../gallery/gallerySlice';
export type UpscalingLevel = 0 | 2 | 4;
export type UpscalingLevel = 2 | 4;
export interface SDState {
prompt: string;