turn controlnet into a select list and localize its label, fix name lookup on server
This commit is contained in:
parent
948bec6d0f
commit
555ec5a644
|
@ -122,6 +122,7 @@ def load_pipeline(
|
|||
):
|
||||
inversions = inversions or []
|
||||
loras = loras or []
|
||||
control_key = control.name if control is not None else None
|
||||
|
||||
torch_dtype = (
|
||||
torch.float16 if "torch-fp16" in server.optimizations else torch.float32
|
||||
|
@ -133,6 +134,7 @@ def load_pipeline(
|
|||
device.device,
|
||||
device.provider,
|
||||
lpw,
|
||||
control_key,
|
||||
inversions,
|
||||
loras,
|
||||
)
|
||||
|
@ -282,7 +284,7 @@ def load_pipeline(
|
|||
if control is not None:
|
||||
components["controlnet"] = OnnxRuntimeModel(
|
||||
OnnxRuntimeModel.load_model(
|
||||
path.join(server.model_path, "control", f"{control}.onnx"),
|
||||
path.join(server.model_path, "control", f"{control.name}.onnx"),
|
||||
provider=device.ort_provider(),
|
||||
sess_options=device.sess_options(),
|
||||
)
|
||||
|
|
|
@ -210,7 +210,7 @@ class ImageParams:
|
|||
"lpw": self.lpw,
|
||||
"eta": self.eta,
|
||||
"batch": self.batch,
|
||||
"control": self.control,
|
||||
"control": self.control.name,
|
||||
}
|
||||
|
||||
def with_args(self, **kwargs):
|
||||
|
|
|
@ -116,7 +116,7 @@ export function ModelControl() {
|
|||
});
|
||||
}}
|
||||
/>
|
||||
<QueryMenu
|
||||
<QueryList
|
||||
id='control'
|
||||
labelKey='model'
|
||||
name={t('modelType.control')}
|
||||
|
@ -124,7 +124,8 @@ export function ModelControl() {
|
|||
result: models,
|
||||
selector: (result) => result.networks.filter((network) => network.type === 'control').map((network) => network.name),
|
||||
}}
|
||||
onSelect={(control) => {
|
||||
value={params.control}
|
||||
onChange={(control) => {
|
||||
setModel({
|
||||
control,
|
||||
});
|
||||
|
|
|
@ -70,6 +70,7 @@ export const I18N_STRINGS_DE = {
|
|||
'none': 'Keiner',
|
||||
},
|
||||
modelType: {
|
||||
control: '',
|
||||
correction: 'Korrekturmodelle',
|
||||
diffusion: 'Diffusionsmodelle',
|
||||
inversion: '',
|
||||
|
|
|
@ -111,6 +111,7 @@ export const I18N_STRINGS_EN = {
|
|||
'diffusion-unstable-ink-dream-v6': 'Unstable Ink Dream v6',
|
||||
},
|
||||
modelType: {
|
||||
control: 'ControlNet',
|
||||
correction: 'Correction Model',
|
||||
diffusion: 'Diffusion Model',
|
||||
inversion: 'Textual Inversion',
|
||||
|
|
|
@ -70,6 +70,7 @@ export const I18N_STRINGS_ES = {
|
|||
'none': 'Ninguno',
|
||||
},
|
||||
modelType: {
|
||||
control: '',
|
||||
correction: 'Modelo de corrección',
|
||||
diffusion: 'Modelo de difusión',
|
||||
inversion: '',
|
||||
|
|
|
@ -70,6 +70,7 @@ export const I18N_STRINGS_FR = {
|
|||
'none': '',
|
||||
},
|
||||
modelType: {
|
||||
control: '',
|
||||
correction: 'modèle de correction',
|
||||
diffusion: 'modèle de diffusion',
|
||||
inversion: '',
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
"ckpt",
|
||||
"codebook",
|
||||
"codeformer",
|
||||
"controlnet",
|
||||
"CUDA",
|
||||
"ddim",
|
||||
"ddpm",
|
||||
|
|
Loading…
Reference in New Issue