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",
"cpu": "Use CPU instead of GPU",
"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-disc": "Get the latest features immediately (but could be less stable). \nPlease restart the program after changing this.",
"save": "SAVE"

View File

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

View File

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

View File

@ -10,9 +10,13 @@ import {
} from "./seedImage.css.ts";
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
// when the component is used in the parent component
export default function SeedImage(_props: any) {
const { t } = useTranslation();
const imageInputRef = useRef<HTMLInputElement>(null);
const initImage = useImageCreate((state) =>
@ -55,7 +59,7 @@ export default function SeedImage(_props: any) {
<div className={ImageInputDisplay}>
<div>
<label className={InputLabel}>
<b>Initial Image:</b> (optional)
<b>{t("home.initial-img-txt")}</b>
</label>
<input
ref={imageInputRef}
@ -65,7 +69,7 @@ export default function SeedImage(_props: any) {
onChange={_handleFileSelect}
/>
<button className={ImageInputButton} onClick={_startFileSelect}>
Select File
{t("home.initial-img-btn")}
</button>
</div>
@ -85,8 +89,9 @@ export default function SeedImage(_props: any) {
toggleInpainting();
}}
checked={isInPaintingMode}
></input>
Use for Inpainting
>
</input>
{t("in-paint.txt")}
</label>
</>
)}