ldm add plms sampler
This commit is contained in:
@@ -11,6 +11,11 @@ export enum HDStrategy {
|
||||
CROP = 'Crop',
|
||||
}
|
||||
|
||||
export enum LDMSampler {
|
||||
ddim = 'ddim',
|
||||
plms = 'plms',
|
||||
}
|
||||
|
||||
function HDSettingBlock() {
|
||||
const [setting, setSettingState] = useRecoilState(settingState)
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import React, { ReactNode } from 'react'
|
||||
import { useRecoilState } from 'recoil'
|
||||
import { settingState } from '../../store/Atoms'
|
||||
import Selector from '../shared/Selector'
|
||||
import { LDMSampler } from './HDSettingBlock'
|
||||
import NumberInputSetting from './NumberInputSetting'
|
||||
import SettingBlock from './SettingBlock'
|
||||
|
||||
@@ -19,6 +20,12 @@ function ModelSettingBlock() {
|
||||
})
|
||||
}
|
||||
|
||||
const onLDMSamplerChange = (value: LDMSampler) => {
|
||||
setSettingState(old => {
|
||||
return { ...old, ldmSampler: value }
|
||||
})
|
||||
}
|
||||
|
||||
const renderModelDesc = (
|
||||
name: string,
|
||||
paperUrl: string,
|
||||
@@ -65,6 +72,19 @@ function ModelSettingBlock() {
|
||||
})
|
||||
}}
|
||||
/>
|
||||
|
||||
<SettingBlock
|
||||
className="sub-setting-block"
|
||||
title="Sampler"
|
||||
input={
|
||||
<Selector
|
||||
width={80}
|
||||
value={setting.ldmSampler as string}
|
||||
options={Object.values(LDMSampler)}
|
||||
onChange={val => onLDMSamplerChange(val as LDMSampler)}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ export default function ShortcutsModal() {
|
||||
/>
|
||||
<ShortCut content="Undo Inpainting" keys={[CmdOrCtrl, 'Z']} />
|
||||
<ShortCut content="Pan" keys={['Space & Drag']} />
|
||||
<ShortCut content="View Original Image" keys={['Hold Tag']} />
|
||||
<ShortCut content="View Original Image" keys={['Hold Tab']} />
|
||||
<ShortCut content="Reset Zoom/Pan" keys={['Esc']} />
|
||||
<ShortCut content="Cancel Mask Drawing" keys={['Esc']} />
|
||||
<ShortCut content="Run Inpainting Manually" keys={['Shift', 'R']} />
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
all: unset;
|
||||
flex: 1 0 auto;
|
||||
border-radius: 0.5rem;
|
||||
padding: 0.4rem 0.8rem;
|
||||
padding: 0 0.8rem;
|
||||
outline: 1px solid var(--border-color);
|
||||
height: 36px;
|
||||
|
||||
&:focus-visible {
|
||||
outline: 1px solid var(--yellow-accent);
|
||||
|
||||
Reference in New Issue
Block a user