forked from extern/easydiffusion
commit
161eea3e9e
@ -43,6 +43,7 @@
|
||||
"how-many": "How many at once:",
|
||||
"width": "Width:",
|
||||
"height": "Height:",
|
||||
"sampler": "Sampler:",
|
||||
"steps": "Number of inference steps:",
|
||||
"guide-scale": "Guidance Scale:",
|
||||
"prompt-str": "Prompt Strength:",
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { useState } from "react";
|
||||
import { useImageCreate } from "../../../../../stores/imageCreateStore";
|
||||
import React from "react";
|
||||
import { useImageCreate, SAMPLER_OPTIONS } from "../../../../../stores/imageCreateStore";
|
||||
import { useCreateUI } from "../../creationPanelUIStore";
|
||||
|
||||
import {
|
||||
@ -61,6 +61,10 @@ export default function PropertySettings() {
|
||||
state.getValueForRequestKey("height")
|
||||
);
|
||||
|
||||
const sampler = useImageCreate((state) =>
|
||||
state.getValueForRequestKey("sampler")
|
||||
);
|
||||
|
||||
const propertyOpen = useCreateUI((state) => state.isOpenAdvPropertySettings);
|
||||
const togglePropertyOpen = useCreateUI(
|
||||
(state) => state.toggleAdvPropertySettings
|
||||
@ -178,6 +182,22 @@ export default function PropertySettings() {
|
||||
</select>
|
||||
</label>
|
||||
</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>
|
||||
|
@ -10,6 +10,17 @@ export interface ImageCreationUiOptions {
|
||||
isSoundEnabled: boolean;
|
||||
}
|
||||
|
||||
export const SAMPLER_OPTIONS = [
|
||||
'plms',
|
||||
'ddim',
|
||||
'heun',
|
||||
'euler',
|
||||
'euler_a',
|
||||
'dpm2',
|
||||
'dpm2_a',
|
||||
'lms',
|
||||
] as const;
|
||||
|
||||
export interface ImageRequest {
|
||||
prompt: string;
|
||||
seed: number;
|
||||
@ -58,6 +69,7 @@ export interface ImageRequest {
|
||||
show_only_filtered_image: boolean;
|
||||
init_image: undefined | string;
|
||||
prompt_strength: undefined | number;
|
||||
sampler: typeof SAMPLER_OPTIONS[number];
|
||||
}
|
||||
|
||||
type ModifiersList = string[];
|
||||
@ -121,6 +133,7 @@ export const useImageCreate = create<ImageCreateState>(
|
||||
use_upscale: "RealESRGAN_x4plus",
|
||||
show_only_filtered_image: true,
|
||||
init_image: undefined,
|
||||
sampler: "plms",
|
||||
},
|
||||
|
||||
// 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