This commit is contained in:
caranicas 2022-09-17 16:30:47 -04:00
parent 4fbc46b3b3
commit 1e9e9daeb3
3 changed files with 64 additions and 49 deletions

View File

@ -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;

View File

@ -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,13 +118,13 @@ export default function PropertySettings() {
<span>{guidance_scale}</span>
</div>
<div className="mb-4">
{init_image && (
<div>
<label>
Prompt Strength:{" "}
<input
value={prompt_strength}
onChange={(e) =>
// setImageOptions({ promptStrength: Number(e.target.value) })
setRequestOption("prompt_strength", e.target.value)
}
type="range"
@ -126,6 +135,7 @@ export default function PropertySettings() {
</label>
<span>{prompt_strength}</span>
</div>
)}
<div>
<label>

View File

@ -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;
},