v2 Conversion Support & Radio Picker

Converted the picker options to a Radio Group and also updated the backend to use the appropriate config if it is a v2 model that needs to be converted.
This commit is contained in:
blessedcoolant
2023-02-12 05:00:29 +13:00
parent 11e422cf29
commit 96926d6648
4 changed files with 56 additions and 50 deletions

View File

@ -422,14 +422,21 @@ class InvokeAIWebServer:
original_config_file = Path(
Globals.root, original_config_file)
if model_to_convert['is_inpainting']:
if model_to_convert['model_type'] == 'inpainting':
original_config_file = Path(
'configs',
'stable-diffusion',
'v1-inpainting-inference.yaml' if model_to_convert['is_inpainting'] else 'v1-inference.yaml'
'v1-inpainting-inference.yaml'
)
if model_to_convert['custom_config'] is not None:
if model_to_convert['model_type'] == '2':
original_config_file = Path(
'configs',
'stable-diffusion',
'v2-inference-v.yaml'
)
if model_to_convert['model_type'] == 'custom' and model_to_convert['custom_config'] is not None:
original_config_file = Path(
model_to_convert['custom_config'])