mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-11-27 02:33:10 +01:00
Merge pull request #9 from caranicas/beta-react-creation-options
Beta react creation options
This commit is contained in:
commit
d3c241d283
@ -29,6 +29,7 @@ function SettingsList() {
|
||||
const toggleUseFaceCorrection = useImageCreate(
|
||||
(state) => state.toggleUseFaceCorrection
|
||||
);
|
||||
|
||||
const isUsingFaceCorrection = useImageCreate((state) =>
|
||||
state.isUsingFaceCorrection()
|
||||
);
|
||||
@ -111,6 +112,9 @@ function SettingsList() {
|
||||
name="upscale_model"
|
||||
disabled={!isUsingUpscaling}
|
||||
value={use_upscale}
|
||||
onChange={(e) => {
|
||||
setRequestOption("use_upscale", e.target.value);
|
||||
}}
|
||||
>
|
||||
<option value="RealESRGAN_x4plus">RealESRGAN_x4plus</option>
|
||||
<option value="RealESRGAN_x4plus_anime_6B">
|
||||
|
@ -50,10 +50,11 @@ export default function DisplayPanel() {
|
||||
})
|
||||
.flat()
|
||||
.reverse();
|
||||
setCompletedImages(temp);
|
||||
setCompletedImages(temp);
|
||||
} else {
|
||||
setCompletedImages([]);
|
||||
}
|
||||
|
||||
}, [setCompletedImages, queryClient, completedIds]);
|
||||
|
||||
return (
|
||||
|
@ -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,7 @@ export const useImageCreate = create<ImageCreateState>(
|
||||
if (!state.uiOptions.isCheckUseFaceCorrection) {
|
||||
request.use_face_correction = null;
|
||||
}
|
||||
|
||||
// if we arent using upscaling clear the upscaling
|
||||
if (!state.uiOptions.isCheckedUseUpscaling) {
|
||||
request.use_upscale = null;
|
||||
@ -238,7 +239,7 @@ export const useImageCreate = create<ImageCreateState>(
|
||||
state.requestOptions.use_upscale = state.uiOptions
|
||||
.isCheckedUseUpscaling
|
||||
? "RealESRGAN_x4plus"
|
||||
: null;
|
||||
: undefined;
|
||||
localStorage.setItem(
|
||||
"ui:isCheckedUseUpscaling",
|
||||
state.uiOptions.isCheckedUseUpscaling
|
||||
@ -259,10 +260,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
|
||||
// );
|
||||
})
|
||||
);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user