face correctiona and scaling passing thru properly

This commit is contained in:
caranicas 2022-09-14 16:33:56 -04:00
parent 616167e08c
commit 2dda683aa6
3 changed files with 11 additions and 6 deletions

View File

@ -29,6 +29,7 @@ function SettingsList() {
const toggleUseFaceCorrection = useImageCreate(
(state) => state.toggleUseFaceCorrection
);
const isUsingFaceCorrection = useImageCreate((state) =>
state.isUsingFaceCorrection()
);

View File

@ -50,10 +50,12 @@ export default function DisplayPanel() {
})
.flat()
.reverse();
setCompletedImages(temp);
debugger;
setCompletedImages(temp);
} else {
setCompletedImages([]);
}
}, [setCompletedImages, queryClient, completedIds]);
return (

View File

@ -113,7 +113,7 @@ export const useImageCreate = create<ImageCreateState>(
use_cpu: false,
use_full_precision: true,
save_to_disk_path: "null",
use_face_correction: null,
use_face_correction: 'GFPGANv1.3',
use_upscale: "RealESRGAN_x4plus",
show_only_filtered_image: false,
} as ImageRequest,
@ -184,6 +184,8 @@ export const useImageCreate = create<ImageCreateState>(
if (!state.uiOptions.isCheckUseFaceCorrection) {
request.use_face_correction = null;
}
debugger;
// if we arent using upscaling clear the upscaling
if (!state.uiOptions.isCheckedUseUpscaling) {
request.use_upscale = null;
@ -259,10 +261,10 @@ export const useImageCreate = create<ImageCreateState>(
state.use_face_correction = state.uiOptions.isCheckUseFaceCorrection
? "GFPGANv1.3"
: null;
localStorage.setItem(
"ui:isCheckUseFaceCorrection",
state.uiOptions.isCheckUseFaceCorrection
);
// localStorage.setItem(
// "ui:isCheckUseFaceCorrection",
// state.uiOptions.isCheckUseFaceCorrection
// );
})
);
},