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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user