Merge pull request #281 from bmaltais/dev

Fix issue 277
This commit is contained in:
bmaltais 2023-03-03 07:11:51 -05:00 committed by GitHub
commit e482ff0b1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View File

@ -163,6 +163,8 @@ This will store your a backup file with your current locally installed pip packa
## Change History
* 2023/03/03 (v21.1.2):
- Fix issue https://github.com/bmaltais/kohya_ss/issues/277
* 2023/03/02 (v21.1.1):
- Emergency fix for https://github.com/bmaltais/kohya_ss/issues/261
* 2023/03/02 (v21.1.0):

View File

@ -272,7 +272,7 @@ def save_inference_file(output_dir, v2, v_parameterization, output_name):
)
def set_pretrained_model_name_or_path_input(value, v2, v_parameterization):
def set_pretrained_model_name_or_path_input(value, pretrained_model_name_or_path, v2, v_parameterization):
# define a list of substrings to search for
substrings_v2 = [
'stabilityai/stable-diffusion-2-1-base',
@ -316,9 +316,10 @@ def set_pretrained_model_name_or_path_input(value, v2, v_parameterization):
return value, v2, v_parameterization
if value == 'custom':
value = ''
v2 = False
v_parameterization = False
if str(pretrained_model_name_or_path) in substrings_v1_model or str(pretrained_model_name_or_path) in substrings_v2 or str(pretrained_model_name_or_path) in substrings_v_parameterization:
value = ''
v2 = False
v_parameterization = False
return value, v2, v_parameterization
@ -405,7 +406,7 @@ def gradio_source_model():
)
model_list.change(
set_pretrained_model_name_or_path_input,
inputs=[model_list, v2, v_parameterization],
inputs=[model_list, pretrained_model_name_or_path, v2, v_parameterization],
outputs=[
pretrained_model_name_or_path,
v2,