File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -520,10 +520,14 @@ def init_temp_path(path: str | None, default_path: str) -> str:
520
520
image_count += 1
521
521
default_ip_images [image_count ] = get_config_item_or_set_default (
522
522
key = f'default_ip_image_{ image_count } ' ,
523
- default_value = None ,
524
- validator = lambda x : x is None or isinstance (x , str ) and os .path .exists (x ),
523
+ default_value = ' None' ,
524
+ validator = lambda x : x == ' None' or isinstance (x , str ) and os .path .exists (x ),
525
525
expected_type = str
526
526
)
527
+
528
+ if default_ip_images [image_count ] == 'None' :
529
+ default_ip_images [image_count ] = None
530
+
527
531
default_ip_types [image_count ] = get_config_item_or_set_default (
528
532
key = f'default_ip_type_{ image_count } ' ,
529
533
default_value = modules .flags .default_ip ,
@@ -698,7 +702,7 @@ def init_temp_path(path: str | None, default_path: str) -> str:
698
702
default_inpaint_mask_sam_model = get_config_item_or_set_default (
699
703
key = 'default_inpaint_mask_sam_model' ,
700
704
default_value = 'vit_b' ,
701
- validator = lambda x : x in [ y [ 1 ] for y in modules .flags .inpaint_mask_sam_model if y [ 1 ] == x ] ,
705
+ validator = lambda x : x in modules .flags .inpaint_mask_sam_model ,
702
706
expected_type = str
703
707
)
704
708
You can’t perform that action at this time.
0 commit comments