updates for static words part 1

This commit is contained in:
mrbusysky 2022-09-19 17:49:03 -07:00
parent 34cb532e6b
commit eff3887f35
4 changed files with 22 additions and 10 deletions

View File

@ -77,6 +77,8 @@
"turbo-disc": "Generates images faster, but uses an additional 1 GB of GPU memory", "turbo-disc": "Generates images faster, but uses an additional 1 GB of GPU memory",
"cpu": "Use CPU instead of GPU", "cpu": "Use CPU instead of GPU",
"cpu-disc": "Warning: this will be *very* slow", "cpu-disc": "Warning: this will be *very* slow",
"gpu": "Use full precision",
"gpu-disc": "(for GPU-only. warning: this will consume more VRAM)",
"beta": "Beta Features", "beta": "Beta Features",
"beta-disc": "Get the latest features immediately (but could be less stable). \nPlease restart the program after changing this.", "beta-disc": "Get the latest features immediately (but could be less stable). \nPlease restart the program after changing this.",
"save": "SAVE" "save": "SAVE"

View File

@ -10,8 +10,11 @@ import {
import { import {
MenuButton, // @ts-expect-error MenuButton, // @ts-expect-error
} from "../advancedsettings.css.ts"; } from "../advancedsettings.css.ts";
import {useTranslation} from "react-i18next";
export default function GpuSettings() { export default function GpuSettings() {
const { t } = useTranslation();
const turbo = useImageCreate((state) => state.getValueForRequestKey("turbo")); const turbo = useImageCreate((state) => state.getValueForRequestKey("turbo"));
const useCpu = useImageCreate((state) => const useCpu = useImageCreate((state) =>
state.getValueForRequestKey("use_cpu") state.getValueForRequestKey("use_cpu")
@ -39,8 +42,7 @@ export default function GpuSettings() {
onChange={(e) => setRequestOption("turbo", e.target.checked)} onChange={(e) => setRequestOption("turbo", e.target.checked)}
type="checkbox" type="checkbox"
/> />
Turbo mode (generates images faster, but uses an additional 1 GB {t("advanced-settings.turbo")} {t("advanced-settings.turbo-disc")}
of GPU memory)
</label> </label>
</div> </div>
<div className={SettingItem}> <div className={SettingItem}>
@ -50,7 +52,7 @@ export default function GpuSettings() {
checked={useCpu} checked={useCpu}
onChange={(e) => setRequestOption("use_cpu", e.target.checked)} onChange={(e) => setRequestOption("use_cpu", e.target.checked)}
/> />
Use CPU instead of GPU (warning: this will be *very* slow) {t("advanced-settings.cpu")} {t("advanced-settings.cpu-disc")}
</label> </label>
</div> </div>
<div className={SettingItem}> <div className={SettingItem}>
@ -62,8 +64,7 @@ export default function GpuSettings() {
} }
type="checkbox" type="checkbox"
/> />
Use full precision (for GPU-only. warning: this will consume more {t("advanced-settings.gpu")} {t("advanced-settings.gpu-disc")}
VRAM)
</label> </label>
</div> </div>
</> </>

View File

@ -10,7 +10,11 @@ import SeedImage from "./seedImage";
import ActiveTags from "./activeTags"; import ActiveTags from "./activeTags";
import MakeButton from "./makeButton"; import MakeButton from "./makeButton";
import {useTranslation} from "react-i18next";
export default function BasicCreation() { export default function BasicCreation() {
const { t } = useTranslation();
const promptText = useImageCreate((state) => const promptText = useImageCreate((state) =>
state.getValueForRequestKey("prompt") state.getValueForRequestKey("prompt")
); );
@ -23,7 +27,7 @@ export default function BasicCreation() {
return ( return (
<div className={CreationBasicMain}> <div className={CreationBasicMain}>
<div className={PromptDisplay}> <div className={PromptDisplay}>
<p>Prompt </p> <p>{t("home.editor-title")}</p>
<textarea value={promptText} onChange={handlePromptChange}></textarea> <textarea value={promptText} onChange={handlePromptChange}></textarea>
</div> </div>

View File

@ -10,9 +10,13 @@ import {
} from "./seedImage.css.ts"; } from "./seedImage.css.ts";
import { useImageCreate } from "../../../../../stores/imageCreateStore"; import { useImageCreate } from "../../../../../stores/imageCreateStore";
import {useTranslation} from "react-i18next";
// TODO : figure out why this needs props to be passed in.. fixes a type error // TODO : figure out why this needs props to be passed in.. fixes a type error
// when the component is used in the parent component // when the component is used in the parent component
export default function SeedImage(_props: any) { export default function SeedImage(_props: any) {
const { t } = useTranslation();
const imageInputRef = useRef<HTMLInputElement>(null); const imageInputRef = useRef<HTMLInputElement>(null);
const initImage = useImageCreate((state) => const initImage = useImageCreate((state) =>
@ -55,7 +59,7 @@ export default function SeedImage(_props: any) {
<div className={ImageInputDisplay}> <div className={ImageInputDisplay}>
<div> <div>
<label className={InputLabel}> <label className={InputLabel}>
<b>Initial Image:</b> (optional) <b>{t("home.initial-img-txt")}</b>
</label> </label>
<input <input
ref={imageInputRef} ref={imageInputRef}
@ -65,7 +69,7 @@ export default function SeedImage(_props: any) {
onChange={_handleFileSelect} onChange={_handleFileSelect}
/> />
<button className={ImageInputButton} onClick={_startFileSelect}> <button className={ImageInputButton} onClick={_startFileSelect}>
Select File {t("home.initial-img-btn")}
</button> </button>
</div> </div>
@ -85,8 +89,9 @@ export default function SeedImage(_props: any) {
toggleInpainting(); toggleInpainting();
}} }}
checked={isInPaintingMode} checked={isInPaintingMode}
></input> >
Use for Inpainting </input>
{t("in-paint.txt")}
</label> </label>
</> </>
)} )}