mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-02-17 02:40:56 +01:00
wip
This commit is contained in:
parent
4fbc46b3b3
commit
1e9e9daeb3
@ -17,7 +17,7 @@
|
||||
<!-- WE NEED TO PORT OVER THE STYLES OVER TO THE REACT COMPONENTS -->
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
/* font-family: Arial, Helvetica, sans-serif; */
|
||||
font-size: 11pt;
|
||||
background-color: rgb(32, 33, 36);
|
||||
color: #eee;
|
||||
|
@ -38,9 +38,18 @@ export default function PropertySettings() {
|
||||
const guidance_scale = useImageCreate((state) =>
|
||||
state.getValueForRequestKey("guidance_scale")
|
||||
);
|
||||
|
||||
|
||||
const init_image = useImageCreate((state) =>
|
||||
state.getValueForRequestKey("init_image")
|
||||
);
|
||||
|
||||
|
||||
const prompt_strength = useImageCreate((state) =>
|
||||
state.getValueForRequestKey("prompt_strength")
|
||||
);
|
||||
|
||||
|
||||
const width = useImageCreate((state) => state.getValueForRequestKey("width"));
|
||||
const height = useImageCreate((state) =>
|
||||
state.getValueForRequestKey("height")
|
||||
@ -109,23 +118,24 @@ export default function PropertySettings() {
|
||||
<span>{guidance_scale}</span>
|
||||
</div>
|
||||
|
||||
<div className="mb-4">
|
||||
<label>
|
||||
Prompt Strength:{" "}
|
||||
<input
|
||||
value={prompt_strength}
|
||||
onChange={(e) =>
|
||||
// setImageOptions({ promptStrength: Number(e.target.value) })
|
||||
setRequestOption("prompt_strength", e.target.value)
|
||||
}
|
||||
type="range"
|
||||
min="0"
|
||||
max="1"
|
||||
step=".05"
|
||||
/>
|
||||
</label>
|
||||
<span>{prompt_strength}</span>
|
||||
</div>
|
||||
{init_image && (
|
||||
<div>
|
||||
<label>
|
||||
Prompt Strength:{" "}
|
||||
<input
|
||||
value={prompt_strength}
|
||||
onChange={(e) =>
|
||||
setRequestOption("prompt_strength", e.target.value)
|
||||
}
|
||||
type="range"
|
||||
min="0"
|
||||
max="1"
|
||||
step=".05"
|
||||
/>
|
||||
</label>
|
||||
<span>{prompt_strength}</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div>
|
||||
<label>
|
||||
|
@ -17,37 +17,37 @@ export type ImageRequest = {
|
||||
num_inference_steps: number;
|
||||
guidance_scale: number;
|
||||
width:
|
||||
| 128
|
||||
| 192
|
||||
| 256
|
||||
| 320
|
||||
| 384
|
||||
| 448
|
||||
| 512
|
||||
| 576
|
||||
| 640
|
||||
| 704
|
||||
| 768
|
||||
| 832
|
||||
| 896
|
||||
| 960
|
||||
| 1024;
|
||||
| 128
|
||||
| 192
|
||||
| 256
|
||||
| 320
|
||||
| 384
|
||||
| 448
|
||||
| 512
|
||||
| 576
|
||||
| 640
|
||||
| 704
|
||||
| 768
|
||||
| 832
|
||||
| 896
|
||||
| 960
|
||||
| 1024;
|
||||
height:
|
||||
| 128
|
||||
| 192
|
||||
| 256
|
||||
| 320
|
||||
| 384
|
||||
| 448
|
||||
| 512
|
||||
| 576
|
||||
| 640
|
||||
| 704
|
||||
| 768
|
||||
| 832
|
||||
| 896
|
||||
| 960
|
||||
| 1024;
|
||||
| 128
|
||||
| 192
|
||||
| 256
|
||||
| 320
|
||||
| 384
|
||||
| 448
|
||||
| 512
|
||||
| 576
|
||||
| 640
|
||||
| 704
|
||||
| 768
|
||||
| 832
|
||||
| 896
|
||||
| 960
|
||||
| 1024;
|
||||
// allow_nsfw: boolean;
|
||||
turbo: boolean;
|
||||
use_cpu: boolean;
|
||||
@ -211,6 +211,11 @@ export const useImageCreate = create<ImageCreateState>(
|
||||
request.use_upscale = null;
|
||||
}
|
||||
|
||||
if (void 0 === requestOptions.init_image) {
|
||||
request.prompt_strength = undefined;
|
||||
}
|
||||
|
||||
|
||||
return request;
|
||||
},
|
||||
|
||||
@ -219,7 +224,7 @@ export const useImageCreate = create<ImageCreateState>(
|
||||
produce((state) => {
|
||||
const isSeting =
|
||||
typeof state.getValueForRequestKey("use_face_correction") ===
|
||||
"string"
|
||||
"string"
|
||||
? null
|
||||
: "GFPGANv1.3";
|
||||
state.requestOptions.use_face_correction = isSeting;
|
||||
|
Loading…
Reference in New Issue
Block a user