forked from extern/easydiffusion
commit
161eea3e9e
@ -43,6 +43,7 @@
|
|||||||
"how-many": "How many at once:",
|
"how-many": "How many at once:",
|
||||||
"width": "Width:",
|
"width": "Width:",
|
||||||
"height": "Height:",
|
"height": "Height:",
|
||||||
|
"sampler": "Sampler:",
|
||||||
"steps": "Number of inference steps:",
|
"steps": "Number of inference steps:",
|
||||||
"guide-scale": "Guidance Scale:",
|
"guide-scale": "Guidance Scale:",
|
||||||
"prompt-str": "Prompt Strength:",
|
"prompt-str": "Prompt Strength:",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React, { useState } from "react";
|
import React from "react";
|
||||||
import { useImageCreate } from "../../../../../stores/imageCreateStore";
|
import { useImageCreate, SAMPLER_OPTIONS } from "../../../../../stores/imageCreateStore";
|
||||||
import { useCreateUI } from "../../creationPanelUIStore";
|
import { useCreateUI } from "../../creationPanelUIStore";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@ -61,6 +61,10 @@ export default function PropertySettings() {
|
|||||||
state.getValueForRequestKey("height")
|
state.getValueForRequestKey("height")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const sampler = useImageCreate((state) =>
|
||||||
|
state.getValueForRequestKey("sampler")
|
||||||
|
);
|
||||||
|
|
||||||
const propertyOpen = useCreateUI((state) => state.isOpenAdvPropertySettings);
|
const propertyOpen = useCreateUI((state) => state.isOpenAdvPropertySettings);
|
||||||
const togglePropertyOpen = useCreateUI(
|
const togglePropertyOpen = useCreateUI(
|
||||||
(state) => state.toggleAdvPropertySettings
|
(state) => state.toggleAdvPropertySettings
|
||||||
@ -178,6 +182,22 @@ export default function PropertySettings() {
|
|||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className={SettingItem}>
|
||||||
|
<label>
|
||||||
|
{t("settings.sampler")}
|
||||||
|
<select
|
||||||
|
value={sampler}
|
||||||
|
onChange={(e) => setRequestOption("sampler", e.target.value)}
|
||||||
|
>
|
||||||
|
{SAMPLER_OPTIONS.map((sampler) => (
|
||||||
|
<option key={`sampler-option_${sampler}`} value={sampler}>
|
||||||
|
{sampler}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,6 +10,17 @@ export interface ImageCreationUiOptions {
|
|||||||
isSoundEnabled: boolean;
|
isSoundEnabled: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const SAMPLER_OPTIONS = [
|
||||||
|
'plms',
|
||||||
|
'ddim',
|
||||||
|
'heun',
|
||||||
|
'euler',
|
||||||
|
'euler_a',
|
||||||
|
'dpm2',
|
||||||
|
'dpm2_a',
|
||||||
|
'lms',
|
||||||
|
] as const;
|
||||||
|
|
||||||
export interface ImageRequest {
|
export interface ImageRequest {
|
||||||
prompt: string;
|
prompt: string;
|
||||||
seed: number;
|
seed: number;
|
||||||
@ -58,6 +69,7 @@ export interface ImageRequest {
|
|||||||
show_only_filtered_image: boolean;
|
show_only_filtered_image: boolean;
|
||||||
init_image: undefined | string;
|
init_image: undefined | string;
|
||||||
prompt_strength: undefined | number;
|
prompt_strength: undefined | number;
|
||||||
|
sampler: typeof SAMPLER_OPTIONS[number];
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModifiersList = string[];
|
type ModifiersList = string[];
|
||||||
@ -121,6 +133,7 @@ export const useImageCreate = create<ImageCreateState>(
|
|||||||
use_upscale: "RealESRGAN_x4plus",
|
use_upscale: "RealESRGAN_x4plus",
|
||||||
show_only_filtered_image: true,
|
show_only_filtered_image: true,
|
||||||
init_image: undefined,
|
init_image: undefined,
|
||||||
|
sampler: "plms",
|
||||||
},
|
},
|
||||||
|
|
||||||
// selected tags
|
// selected tags
|
||||||
|
38
ui/frontend/dist/index.js
vendored
38
ui/frontend/dist/index.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user