Class: StableDiffusion::Flags

Inherits:
Object
  • Object
show all
Defined in:
lib/stable_diffusion/models/flags.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Flags

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
# File 'lib/stable_diffusion/models/flags.rb', line 631

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `StableDiffusion::Flags` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `StableDiffusion::Flags`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'f')
    self.f = attributes[:'f']
  else
    self.f = false
  end

  if attributes.key?(:'update_all_extensions')
    self.update_all_extensions = attributes[:'update_all_extensions']
  else
    self.update_all_extensions = false
  end

  if attributes.key?(:'skip_python_version_check')
    self.skip_python_version_check = attributes[:'skip_python_version_check']
  else
    self.skip_python_version_check = false
  end

  if attributes.key?(:'skip_torch_cuda_test')
    self.skip_torch_cuda_test = attributes[:'skip_torch_cuda_test']
  else
    self.skip_torch_cuda_test = false
  end

  if attributes.key?(:'reinstall_xformers')
    self.reinstall_xformers = attributes[:'reinstall_xformers']
  else
    self.reinstall_xformers = false
  end

  if attributes.key?(:'reinstall_torch')
    self.reinstall_torch = attributes[:'reinstall_torch']
  else
    self.reinstall_torch = false
  end

  if attributes.key?(:'update_check')
    self.update_check = attributes[:'update_check']
  else
    self.update_check = false
  end

  if attributes.key?(:'test_server')
    self.test_server = attributes[:'test_server']
  else
    self.test_server = false
  end

  if attributes.key?(:'log_startup')
    self.log_startup = attributes[:'log_startup']
  else
    self.log_startup = false
  end

  if attributes.key?(:'skip_prepare_environment')
    self.skip_prepare_environment = attributes[:'skip_prepare_environment']
  else
    self.skip_prepare_environment = false
  end

  if attributes.key?(:'skip_install')
    self.skip_install = attributes[:'skip_install']
  else
    self.skip_install = false
  end

  if attributes.key?(:'dump_sysinfo')
    self.dump_sysinfo = attributes[:'dump_sysinfo']
  else
    self.dump_sysinfo = false
  end

  if attributes.key?(:'loglevel')
    self.loglevel = attributes[:'loglevel']
  end

  if attributes.key?(:'do_not_download_clip')
    self.do_not_download_clip = attributes[:'do_not_download_clip']
  else
    self.do_not_download_clip = false
  end

  if attributes.key?(:'data_dir')
    self.data_dir = attributes[:'data_dir']
  else
    self.data_dir = '/home/ubuntu/stable-diffusion-webui'
  end

  if attributes.key?(:'config')
    self.config = attributes[:'config']
  else
    self.config = '/home/ubuntu/stable-diffusion-webui/configs/v1-inference.yaml'
  end

  if attributes.key?(:'ckpt')
    self.ckpt = attributes[:'ckpt']
  else
    self.ckpt = '/home/ubuntu/stable-diffusion-webui/model.ckpt'
  end

  if attributes.key?(:'ckpt_dir')
    self.ckpt_dir = attributes[:'ckpt_dir']
  end

  if attributes.key?(:'vae_dir')
    self.vae_dir = attributes[:'vae_dir']
  end

  if attributes.key?(:'gfpgan_dir')
    self.gfpgan_dir = attributes[:'gfpgan_dir']
  else
    self.gfpgan_dir = './GFPGAN'
  end

  if attributes.key?(:'gfpgan_model')
    self.gfpgan_model = attributes[:'gfpgan_model']
  end

  if attributes.key?(:'no_half')
    self.no_half = attributes[:'no_half']
  else
    self.no_half = false
  end

  if attributes.key?(:'no_half_vae')
    self.no_half_vae = attributes[:'no_half_vae']
  else
    self.no_half_vae = false
  end

  if attributes.key?(:'no_progressbar_hiding')
    self.no_progressbar_hiding = attributes[:'no_progressbar_hiding']
  else
    self.no_progressbar_hiding = false
  end

  if attributes.key?(:'max_batch_count')
    self.max_batch_count = attributes[:'max_batch_count']
  else
    self.max_batch_count = 16
  end

  if attributes.key?(:'embeddings_dir')
    self.embeddings_dir = attributes[:'embeddings_dir']
  else
    self.embeddings_dir = '/home/ubuntu/stable-diffusion-webui/embeddings'
  end

  if attributes.key?(:'textual_inversion_templates_dir')
    self.textual_inversion_templates_dir = attributes[:'textual_inversion_templates_dir']
  else
    self.textual_inversion_templates_dir = '/home/ubuntu/stable-diffusion-webui/textual_inversion_templates'
  end

  if attributes.key?(:'hypernetwork_dir')
    self.hypernetwork_dir = attributes[:'hypernetwork_dir']
  else
    self.hypernetwork_dir = '/home/ubuntu/stable-diffusion-webui/models/hypernetworks'
  end

  if attributes.key?(:'localizations_dir')
    self.localizations_dir = attributes[:'localizations_dir']
  else
    self.localizations_dir = '/home/ubuntu/stable-diffusion-webui/localizations'
  end

  if attributes.key?(:'allow_code')
    self.allow_code = attributes[:'allow_code']
  else
    self.allow_code = false
  end

  if attributes.key?(:'medvram')
    self.medvram = attributes[:'medvram']
  else
    self.medvram = false
  end

  if attributes.key?(:'medvram_sdxl')
    self.medvram_sdxl = attributes[:'medvram_sdxl']
  else
    self.medvram_sdxl = false
  end

  if attributes.key?(:'lowvram')
    self.lowvram = attributes[:'lowvram']
  else
    self.lowvram = false
  end

  if attributes.key?(:'lowram')
    self.lowram = attributes[:'lowram']
  else
    self.lowram = false
  end

  if attributes.key?(:'always_batch_cond_uncond')
    self.always_batch_cond_uncond = attributes[:'always_batch_cond_uncond']
  else
    self.always_batch_cond_uncond = false
  end

  if attributes.key?(:'unload_gfpgan')
    self.unload_gfpgan = attributes[:'unload_gfpgan']
  else
    self.unload_gfpgan = false
  end

  if attributes.key?(:'precision')
    self.precision = attributes[:'precision']
  else
    self.precision = 'autocast'
  end

  if attributes.key?(:'upcast_sampling')
    self.upcast_sampling = attributes[:'upcast_sampling']
  else
    self.upcast_sampling = false
  end

  if attributes.key?(:'share')
    self.share = attributes[:'share']
  else
    self.share = false
  end

  if attributes.key?(:'ngrok')
    self.ngrok = attributes[:'ngrok']
  end

  if attributes.key?(:'ngrok_region')
    self.ngrok_region = attributes[:'ngrok_region']
  else
    self.ngrok_region = ''
  end

  if attributes.key?(:'ngrok_options')
    self.ngrok_options = attributes[:'ngrok_options']
  end

  if attributes.key?(:'enable_insecure_extension_access')
    self.enable_insecure_extension_access = attributes[:'enable_insecure_extension_access']
  else
    self.enable_insecure_extension_access = false
  end

  if attributes.key?(:'codeformer_models_path')
    self.codeformer_models_path = attributes[:'codeformer_models_path']
  else
    self.codeformer_models_path = '/home/ubuntu/stable-diffusion-webui/models/Codeformer'
  end

  if attributes.key?(:'gfpgan_models_path')
    self.gfpgan_models_path = attributes[:'gfpgan_models_path']
  else
    self.gfpgan_models_path = '/home/ubuntu/stable-diffusion-webui/models/GFPGAN'
  end

  if attributes.key?(:'esrgan_models_path')
    self.esrgan_models_path = attributes[:'esrgan_models_path']
  else
    self.esrgan_models_path = '/home/ubuntu/stable-diffusion-webui/models/ESRGAN'
  end

  if attributes.key?(:'bsrgan_models_path')
    self.bsrgan_models_path = attributes[:'bsrgan_models_path']
  else
    self.bsrgan_models_path = '/home/ubuntu/stable-diffusion-webui/models/BSRGAN'
  end

  if attributes.key?(:'realesrgan_models_path')
    self.realesrgan_models_path = attributes[:'realesrgan_models_path']
  else
    self.realesrgan_models_path = '/home/ubuntu/stable-diffusion-webui/models/RealESRGAN'
  end

  if attributes.key?(:'clip_models_path')
    self.clip_models_path = attributes[:'clip_models_path']
  end

  if attributes.key?(:'xformers')
    self.xformers = attributes[:'xformers']
  else
    self.xformers = false
  end

  if attributes.key?(:'force_enable_xformers')
    self.force_enable_xformers = attributes[:'force_enable_xformers']
  else
    self.force_enable_xformers = false
  end

  if attributes.key?(:'xformers_flash_attention')
    self.xformers_flash_attention = attributes[:'xformers_flash_attention']
  else
    self.xformers_flash_attention = false
  end

  if attributes.key?(:'deepdanbooru')
    self.deepdanbooru = attributes[:'deepdanbooru']
  else
    self.deepdanbooru = false
  end

  if attributes.key?(:'opt_split_attention')
    self.opt_split_attention = attributes[:'opt_split_attention']
  else
    self.opt_split_attention = false
  end

  if attributes.key?(:'opt_sub_quad_attention')
    self.opt_sub_quad_attention = attributes[:'opt_sub_quad_attention']
  else
    self.opt_sub_quad_attention = false
  end

  if attributes.key?(:'sub_quad_q_chunk_size')
    self.sub_quad_q_chunk_size = attributes[:'sub_quad_q_chunk_size']
  else
    self.sub_quad_q_chunk_size = 1024
  end

  if attributes.key?(:'sub_quad_kv_chunk_size')
    self.sub_quad_kv_chunk_size = attributes[:'sub_quad_kv_chunk_size']
  end

  if attributes.key?(:'sub_quad_chunk_threshold')
    self.sub_quad_chunk_threshold = attributes[:'sub_quad_chunk_threshold']
  end

  if attributes.key?(:'opt_split_attention_invokeai')
    self.opt_split_attention_invokeai = attributes[:'opt_split_attention_invokeai']
  else
    self.opt_split_attention_invokeai = false
  end

  if attributes.key?(:'opt_split_attention_v1')
    self.opt_split_attention_v1 = attributes[:'opt_split_attention_v1']
  else
    self.opt_split_attention_v1 = false
  end

  if attributes.key?(:'opt_sdp_attention')
    self.opt_sdp_attention = attributes[:'opt_sdp_attention']
  else
    self.opt_sdp_attention = false
  end

  if attributes.key?(:'opt_sdp_no_mem_attention')
    self.opt_sdp_no_mem_attention = attributes[:'opt_sdp_no_mem_attention']
  else
    self.opt_sdp_no_mem_attention = false
  end

  if attributes.key?(:'disable_opt_split_attention')
    self.disable_opt_split_attention = attributes[:'disable_opt_split_attention']
  else
    self.disable_opt_split_attention = false
  end

  if attributes.key?(:'disable_nan_check')
    self.disable_nan_check = attributes[:'disable_nan_check']
  else
    self.disable_nan_check = false
  end

  if attributes.key?(:'use_cpu')
    if (value = attributes[:'use_cpu']).is_a?(Array)
      self.use_cpu = value
    end
  end

  if attributes.key?(:'use_ipex')
    self.use_ipex = attributes[:'use_ipex']
  else
    self.use_ipex = false
  end

  if attributes.key?(:'disable_model_loading_ram_optimization')
    self.disable_model_loading_ram_optimization = attributes[:'disable_model_loading_ram_optimization']
  else
    self.disable_model_loading_ram_optimization = false
  end

  if attributes.key?(:'listen')
    self.listen = attributes[:'listen']
  else
    self.listen = false
  end

  if attributes.key?(:'port')
    self.port = attributes[:'port']
  end

  if attributes.key?(:'show_negative_prompt')
    self.show_negative_prompt = attributes[:'show_negative_prompt']
  else
    self.show_negative_prompt = false
  end

  if attributes.key?(:'ui_config_file')
    self.ui_config_file = attributes[:'ui_config_file']
  else
    self.ui_config_file = '/home/ubuntu/stable-diffusion-webui/ui-config.json'
  end

  if attributes.key?(:'hide_ui_dir_config')
    self.hide_ui_dir_config = attributes[:'hide_ui_dir_config']
  else
    self.hide_ui_dir_config = false
  end

  if attributes.key?(:'freeze_settings')
    self.freeze_settings = attributes[:'freeze_settings']
  else
    self.freeze_settings = false
  end

  if attributes.key?(:'ui_settings_file')
    self.ui_settings_file = attributes[:'ui_settings_file']
  else
    self.ui_settings_file = '/home/ubuntu/stable-diffusion-webui/config.json'
  end

  if attributes.key?(:'gradio_debug')
    self.gradio_debug = attributes[:'gradio_debug']
  else
    self.gradio_debug = false
  end

  if attributes.key?(:'gradio_auth')
    self.gradio_auth = attributes[:'gradio_auth']
  end

  if attributes.key?(:'gradio_auth_path')
    self.gradio_auth_path = attributes[:'gradio_auth_path']
  end

  if attributes.key?(:'gradio_img2img_tool')
    self.gradio_img2img_tool = attributes[:'gradio_img2img_tool']
  end

  if attributes.key?(:'gradio_inpaint_tool')
    self.gradio_inpaint_tool = attributes[:'gradio_inpaint_tool']
  end

  if attributes.key?(:'gradio_allowed_path')
    if (value = attributes[:'gradio_allowed_path']).is_a?(Array)
      self.gradio_allowed_path = value
    end
  end

  if attributes.key?(:'opt_channelslast')
    self.opt_channelslast = attributes[:'opt_channelslast']
  else
    self.opt_channelslast = false
  end

  if attributes.key?(:'styles_file')
    self.styles_file = attributes[:'styles_file']
  else
    self.styles_file = '/home/ubuntu/stable-diffusion-webui/styles.csv'
  end

  if attributes.key?(:'autolaunch')
    self.autolaunch = attributes[:'autolaunch']
  else
    self.autolaunch = false
  end

  if attributes.key?(:'theme')
    self.theme = attributes[:'theme']
  end

  if attributes.key?(:'use_textbox_seed')
    self.use_textbox_seed = attributes[:'use_textbox_seed']
  else
    self.use_textbox_seed = false
  end

  if attributes.key?(:'disable_console_progressbars')
    self.disable_console_progressbars = attributes[:'disable_console_progressbars']
  else
    self.disable_console_progressbars = false
  end

  if attributes.key?(:'enable_console_prompts')
    self.enable_console_prompts = attributes[:'enable_console_prompts']
  else
    self.enable_console_prompts = false
  end

  if attributes.key?(:'vae_path')
    self.vae_path = attributes[:'vae_path']
  end

  if attributes.key?(:'disable_safe_unpickle')
    self.disable_safe_unpickle = attributes[:'disable_safe_unpickle']
  else
    self.disable_safe_unpickle = false
  end

  if attributes.key?(:'api')
    self.api = attributes[:'api']
  else
    self.api = false
  end

  if attributes.key?(:'api_auth')
    self.api_auth = attributes[:'api_auth']
  end

  if attributes.key?(:'api_log')
    self.api_log = attributes[:'api_log']
  else
    self.api_log = false
  end

  if attributes.key?(:'nowebui')
    self.nowebui = attributes[:'nowebui']
  else
    self.nowebui = false
  end

  if attributes.key?(:'ui_debug_mode')
    self.ui_debug_mode = attributes[:'ui_debug_mode']
  else
    self.ui_debug_mode = false
  end

  if attributes.key?(:'device_id')
    self.device_id = attributes[:'device_id']
  end

  if attributes.key?(:'administrator')
    self.administrator = attributes[:'administrator']
  else
    self.administrator = false
  end

  if attributes.key?(:'cors_allow_origins')
    self.cors_allow_origins = attributes[:'cors_allow_origins']
  end

  if attributes.key?(:'cors_allow_origins_regex')
    self.cors_allow_origins_regex = attributes[:'cors_allow_origins_regex']
  end

  if attributes.key?(:'tls_keyfile')
    self.tls_keyfile = attributes[:'tls_keyfile']
  end

  if attributes.key?(:'tls_certfile')
    self.tls_certfile = attributes[:'tls_certfile']
  end

  if attributes.key?(:'disable_tls_verify')
    self.disable_tls_verify = attributes[:'disable_tls_verify']
  end

  if attributes.key?(:'server_name')
    self.server_name = attributes[:'server_name']
  end

  if attributes.key?(:'gradio_queue')
    self.gradio_queue = attributes[:'gradio_queue']
  else
    self.gradio_queue = true
  end

  if attributes.key?(:'no_gradio_queue')
    self.no_gradio_queue = attributes[:'no_gradio_queue']
  else
    self.no_gradio_queue = false
  end

  if attributes.key?(:'skip_version_check')
    self.skip_version_check = attributes[:'skip_version_check']
  else
    self.skip_version_check = false
  end

  if attributes.key?(:'no_hashing')
    self.no_hashing = attributes[:'no_hashing']
  else
    self.no_hashing = false
  end

  if attributes.key?(:'no_download_sd_model')
    self.no_download_sd_model = attributes[:'no_download_sd_model']
  else
    self.no_download_sd_model = false
  end

  if attributes.key?(:'subpath')
    self.subpath = attributes[:'subpath']
  end

  if attributes.key?(:'add_stop_route')
    self.add_stop_route = attributes[:'add_stop_route']
  else
    self.add_stop_route = false
  end

  if attributes.key?(:'api_server_stop')
    self.api_server_stop = attributes[:'api_server_stop']
  else
    self.api_server_stop = false
  end

  if attributes.key?(:'timeout_keep_alive')
    self.timeout_keep_alive = attributes[:'timeout_keep_alive']
  else
    self.timeout_keep_alive = 30
  end

  if attributes.key?(:'disable_all_extensions')
    self.disable_all_extensions = attributes[:'disable_all_extensions']
  else
    self.disable_all_extensions = false
  end

  if attributes.key?(:'disable_extra_extensions')
    self.disable_extra_extensions = attributes[:'disable_extra_extensions']
  else
    self.disable_extra_extensions = false
  end

  if attributes.key?(:'skip_load_model_at_start')
    self.skip_load_model_at_start = attributes[:'skip_load_model_at_start']
  else
    self.skip_load_model_at_start = false
  end

  if attributes.key?(:'ldsr_models_path')
    self.ldsr_models_path = attributes[:'ldsr_models_path']
  else
    self.ldsr_models_path = '/home/ubuntu/stable-diffusion-webui/models/LDSR'
  end

  if attributes.key?(:'lora_dir')
    self.lora_dir = attributes[:'lora_dir']
  else
    self.lora_dir = '/home/ubuntu/stable-diffusion-webui/models/Lora'
  end

  if attributes.key?(:'lyco_dir_backcompat')
    self.lyco_dir_backcompat = attributes[:'lyco_dir_backcompat']
  else
    self.lyco_dir_backcompat = '/home/ubuntu/stable-diffusion-webui/models/LyCORIS'
  end

  if attributes.key?(:'scunet_models_path')
    self.scunet_models_path = attributes[:'scunet_models_path']
  else
    self.scunet_models_path = '/home/ubuntu/stable-diffusion-webui/models/ScuNET'
  end

  if attributes.key?(:'swinir_models_path')
    self.swinir_models_path = attributes[:'swinir_models_path']
  else
    self.swinir_models_path = '/home/ubuntu/stable-diffusion-webui/models/SwinIR'
  end
end

Instance Attribute Details

#add_stop_routeObject

does not do anything



341
342
343
# File 'lib/stable_diffusion/models/flags.rb', line 341

def add_stop_route
  @add_stop_route
end

#administratorObject

Administrator rights



302
303
304
# File 'lib/stable_diffusion/models/flags.rb', line 302

def administrator
  @administrator
end

#allow_codeObject

allow custom script execution from webui



104
105
106
# File 'lib/stable_diffusion/models/flags.rb', line 104

def allow_code
  @allow_code
end

#always_batch_cond_uncondObject

does not do anything



119
120
121
# File 'lib/stable_diffusion/models/flags.rb', line 119

def always_batch_cond_uncond
  @always_batch_cond_uncond
end

#apiObject

use api=True to launch the API together with the webui (use –nowebui instead for only the API)



284
285
286
# File 'lib/stable_diffusion/models/flags.rb', line 284

def api
  @api
end

#api_authObject

Set authentication for API like "username:password"; or comma-delimit multiple like "u1:p1,u2:p2,u3:p3"



287
288
289
# File 'lib/stable_diffusion/models/flags.rb', line 287

def api_auth
  @api_auth
end

#api_logObject

use api-log=True to enable logging of all API requests



290
291
292
# File 'lib/stable_diffusion/models/flags.rb', line 290

def api_log
  @api_log
end

#api_server_stopObject

enable server stop/restart/kill via api



344
345
346
# File 'lib/stable_diffusion/models/flags.rb', line 344

def api_server_stop
  @api_server_stop
end

#autolaunchObject

open the webui URL in the system’s default browser upon launch



263
264
265
# File 'lib/stable_diffusion/models/flags.rb', line 263

def autolaunch
  @autolaunch
end

#bsrgan_models_pathObject

Path to directory with BSRGAN model file(s).



155
156
157
# File 'lib/stable_diffusion/models/flags.rb', line 155

def bsrgan_models_path
  @bsrgan_models_path
end

#ckptObject

path to checkpoint of stable diffusion model; if specified, this checkpoint will be added to the list of checkpoints and loaded



65
66
67
# File 'lib/stable_diffusion/models/flags.rb', line 65

def ckpt
  @ckpt
end

#ckpt_dirObject

Path to directory with stable diffusion checkpoints



68
69
70
# File 'lib/stable_diffusion/models/flags.rb', line 68

def ckpt_dir
  @ckpt_dir
end

#clip_models_pathObject

Path to directory with CLIP model file(s).



161
162
163
# File 'lib/stable_diffusion/models/flags.rb', line 161

def clip_models_path
  @clip_models_path
end

#codeformer_models_pathObject

Path to directory with codeformer model file(s).



146
147
148
# File 'lib/stable_diffusion/models/flags.rb', line 146

def codeformer_models_path
  @codeformer_models_path
end

#configObject

path to config which constructs model



62
63
64
# File 'lib/stable_diffusion/models/flags.rb', line 62

def config
  @config
end

#cors_allow_originsObject

Allowed CORS origin(s) in the form of a comma-separated list (no spaces)



305
306
307
# File 'lib/stable_diffusion/models/flags.rb', line 305

def cors_allow_origins
  @cors_allow_origins
end

#cors_allow_origins_regexObject

Allowed CORS origin(s) in the form of a single regular expression



308
309
310
# File 'lib/stable_diffusion/models/flags.rb', line 308

def cors_allow_origins_regex
  @cors_allow_origins_regex
end

#data_dirObject

base path where all user data is stored



59
60
61
# File 'lib/stable_diffusion/models/flags.rb', line 59

def data_dir
  @data_dir
end

#deepdanbooruObject

does not do anything



173
174
175
# File 'lib/stable_diffusion/models/flags.rb', line 173

def deepdanbooru
  @deepdanbooru
end

#device_idObject

Select the default CUDA device to use (export CUDA_VISIBLE_DEVICES=0,1,etc might be needed before)



299
300
301
# File 'lib/stable_diffusion/models/flags.rb', line 299

def device_id
  @device_id
end

#disable_all_extensionsObject

prevent all extensions from running regardless of any other settings



350
351
352
# File 'lib/stable_diffusion/models/flags.rb', line 350

def disable_all_extensions
  @disable_all_extensions
end

#disable_console_progressbarsObject

do not output progressbars to console



272
273
274
# File 'lib/stable_diffusion/models/flags.rb', line 272

def disable_console_progressbars
  @disable_console_progressbars
end

#disable_extra_extensionsObject

prevent all extensions except built-in from running regardless of any other settings



353
354
355
# File 'lib/stable_diffusion/models/flags.rb', line 353

def disable_extra_extensions
  @disable_extra_extensions
end

#disable_model_loading_ram_optimizationObject

disable an optimization that reduces RAM use when loading a model



215
216
217
# File 'lib/stable_diffusion/models/flags.rb', line 215

def disable_model_loading_ram_optimization
  @disable_model_loading_ram_optimization
end

#disable_nan_checkObject

do not check if produced images/latent spaces have nans; useful for running without a checkpoint in CI



206
207
208
# File 'lib/stable_diffusion/models/flags.rb', line 206

def disable_nan_check
  @disable_nan_check
end

#disable_opt_split_attentionObject

prefer no cross-attention layer optimization for automatic choice of optimization



203
204
205
# File 'lib/stable_diffusion/models/flags.rb', line 203

def disable_opt_split_attention
  @disable_opt_split_attention
end

#disable_safe_unpickleObject

disable checking pytorch models for malicious code



281
282
283
# File 'lib/stable_diffusion/models/flags.rb', line 281

def disable_safe_unpickle
  @disable_safe_unpickle
end

#disable_tls_verifyObject

When passed, enables the use of self-signed certificates.



317
318
319
# File 'lib/stable_diffusion/models/flags.rb', line 317

def disable_tls_verify
  @disable_tls_verify
end

#do_not_download_clipObject

do not download CLIP model even if it’s not included in the checkpoint



56
57
58
# File 'lib/stable_diffusion/models/flags.rb', line 56

def do_not_download_clip
  @do_not_download_clip
end

#dump_sysinfoObject

launch.py argument: dump limited sysinfo file (without information about extensions, options) to disk and quit



50
51
52
# File 'lib/stable_diffusion/models/flags.rb', line 50

def dump_sysinfo
  @dump_sysinfo
end

#embeddings_dirObject

embeddings directory for textual inversion (default: embeddings)



92
93
94
# File 'lib/stable_diffusion/models/flags.rb', line 92

def embeddings_dir
  @embeddings_dir
end

#enable_console_promptsObject

does not do anything



275
276
277
# File 'lib/stable_diffusion/models/flags.rb', line 275

def enable_console_prompts
  @enable_console_prompts
end

#enable_insecure_extension_accessObject

enable extensions tab regardless of other options



143
144
145
# File 'lib/stable_diffusion/models/flags.rb', line 143

def enable_insecure_extension_access
  @enable_insecure_extension_access
end

#esrgan_models_pathObject

Path to directory with ESRGAN model file(s).



152
153
154
# File 'lib/stable_diffusion/models/flags.rb', line 152

def esrgan_models_path
  @esrgan_models_path
end

#fObject

SUPPRESS==



17
18
19
# File 'lib/stable_diffusion/models/flags.rb', line 17

def f
  @f
end

#force_enable_xformersObject

enable xformers for cross attention layers regardless of whether the checking code thinks you can run it; do not make bug reports if this fails to work



167
168
169
# File 'lib/stable_diffusion/models/flags.rb', line 167

def force_enable_xformers
  @force_enable_xformers
end

#freeze_settingsObject

disable editing settings



233
234
235
# File 'lib/stable_diffusion/models/flags.rb', line 233

def freeze_settings
  @freeze_settings
end

#gfpgan_dirObject

GFPGAN directory



74
75
76
# File 'lib/stable_diffusion/models/flags.rb', line 74

def gfpgan_dir
  @gfpgan_dir
end

#gfpgan_modelObject

GFPGAN model file name



77
78
79
# File 'lib/stable_diffusion/models/flags.rb', line 77

def gfpgan_model
  @gfpgan_model
end

#gfpgan_models_pathObject

Path to directory with GFPGAN model file(s).



149
150
151
# File 'lib/stable_diffusion/models/flags.rb', line 149

def gfpgan_models_path
  @gfpgan_models_path
end

#gradio_allowed_pathObject

add path to gradio’s allowed_paths, make it possible to serve files from it



254
255
256
# File 'lib/stable_diffusion/models/flags.rb', line 254

def gradio_allowed_path
  @gradio_allowed_path
end

#gradio_authObject

set gradio authentication like "username:password"; or comma-delimit multiple like "u1:p1,u2:p2,u3:p3"



242
243
244
# File 'lib/stable_diffusion/models/flags.rb', line 242

def gradio_auth
  @gradio_auth
end

#gradio_auth_pathObject

set gradio authentication file path ex. "/path/to/auth/file" same auth format as –gradio-auth



245
246
247
# File 'lib/stable_diffusion/models/flags.rb', line 245

def gradio_auth_path
  @gradio_auth_path
end

#gradio_debugObject

launch gradio with –debug option



239
240
241
# File 'lib/stable_diffusion/models/flags.rb', line 239

def gradio_debug
  @gradio_debug
end

#gradio_img2img_toolObject

does not do anything



248
249
250
# File 'lib/stable_diffusion/models/flags.rb', line 248

def gradio_img2img_tool
  @gradio_img2img_tool
end

#gradio_inpaint_toolObject

does not do anything



251
252
253
# File 'lib/stable_diffusion/models/flags.rb', line 251

def gradio_inpaint_tool
  @gradio_inpaint_tool
end

#gradio_queueObject

does not do anything



323
324
325
# File 'lib/stable_diffusion/models/flags.rb', line 323

def gradio_queue
  @gradio_queue
end

#hide_ui_dir_configObject

hide directory configuration from webui



230
231
232
# File 'lib/stable_diffusion/models/flags.rb', line 230

def hide_ui_dir_config
  @hide_ui_dir_config
end

#hypernetwork_dirObject

hypernetwork directory



98
99
100
# File 'lib/stable_diffusion/models/flags.rb', line 98

def hypernetwork_dir
  @hypernetwork_dir
end

#ldsr_models_pathObject

Path to directory with LDSR model file(s).



359
360
361
# File 'lib/stable_diffusion/models/flags.rb', line 359

def ldsr_models_path
  @ldsr_models_path
end

#listenObject

launch gradio with 0.0.0.0 as server name, allowing to respond to network requests



218
219
220
# File 'lib/stable_diffusion/models/flags.rb', line 218

def listen
  @listen
end

#localizations_dirObject

localizations directory



101
102
103
# File 'lib/stable_diffusion/models/flags.rb', line 101

def localizations_dir
  @localizations_dir
end

#log_startupObject

launch.py argument: print a detailed log of what’s happening at startup



41
42
43
# File 'lib/stable_diffusion/models/flags.rb', line 41

def log_startup
  @log_startup
end

#loglevelObject

log level; one of: CRITICAL, ERROR, WARNING, INFO, DEBUG



53
54
55
# File 'lib/stable_diffusion/models/flags.rb', line 53

def loglevel
  @loglevel
end

#lora_dirObject

Path to directory with Lora networks.



362
363
364
# File 'lib/stable_diffusion/models/flags.rb', line 362

def lora_dir
  @lora_dir
end

#lowramObject

load stable diffusion checkpoint weights to VRAM instead of RAM



116
117
118
# File 'lib/stable_diffusion/models/flags.rb', line 116

def lowram
  @lowram
end

#lowvramObject

enable stable diffusion model optimizations for sacrificing a lot of speed for very low VRM usage



113
114
115
# File 'lib/stable_diffusion/models/flags.rb', line 113

def lowvram
  @lowvram
end

#lyco_dir_backcompatObject

Path to directory with LyCORIS networks (for backawards compatibility; can also use –lyco-dir).



365
366
367
# File 'lib/stable_diffusion/models/flags.rb', line 365

def lyco_dir_backcompat
  @lyco_dir_backcompat
end

#max_batch_countObject

maximum batch count value for the UI



89
90
91
# File 'lib/stable_diffusion/models/flags.rb', line 89

def max_batch_count
  @max_batch_count
end

#medvramObject

enable stable diffusion model optimizations for sacrificing a little speed for low VRM usage



107
108
109
# File 'lib/stable_diffusion/models/flags.rb', line 107

def medvram
  @medvram
end

#medvram_sdxlObject

enable –medvram optimization just for SDXL models



110
111
112
# File 'lib/stable_diffusion/models/flags.rb', line 110

def medvram_sdxl
  @medvram_sdxl
end

#ngrokObject

ngrok authtoken, alternative to gradio –share



134
135
136
# File 'lib/stable_diffusion/models/flags.rb', line 134

def ngrok
  @ngrok
end

#ngrok_optionsObject

The options to pass to ngrok in JSON format, e.g.: ‘"basic_auth":"user:password", "oauth_provider":"google", "oauth_allow_emails":"[email protected]"’



140
141
142
# File 'lib/stable_diffusion/models/flags.rb', line 140

def ngrok_options
  @ngrok_options
end

#ngrok_regionObject

does not do anything.



137
138
139
# File 'lib/stable_diffusion/models/flags.rb', line 137

def ngrok_region
  @ngrok_region
end

#no_download_sd_modelObject

don’t download SD1.5 model even if no model is found in –ckpt-dir



335
336
337
# File 'lib/stable_diffusion/models/flags.rb', line 335

def no_download_sd_model
  @no_download_sd_model
end

#no_gradio_queueObject

Disables gradio queue; causes the webpage to use http requests instead of websockets; was the default in earlier versions



326
327
328
# File 'lib/stable_diffusion/models/flags.rb', line 326

def no_gradio_queue
  @no_gradio_queue
end

#no_halfObject

do not switch the model to 16-bit floats



80
81
82
# File 'lib/stable_diffusion/models/flags.rb', line 80

def no_half
  @no_half
end

#no_half_vaeObject

do not switch the VAE model to 16-bit floats



83
84
85
# File 'lib/stable_diffusion/models/flags.rb', line 83

def no_half_vae
  @no_half_vae
end

#no_hashingObject

disable sha256 hashing of checkpoints to help loading performance



332
333
334
# File 'lib/stable_diffusion/models/flags.rb', line 332

def no_hashing
  @no_hashing
end

#no_progressbar_hidingObject

do not hide progressbar in gradio UI (we hide it because it slows down ML if you have hardware acceleration in browser)



86
87
88
# File 'lib/stable_diffusion/models/flags.rb', line 86

def no_progressbar_hiding
  @no_progressbar_hiding
end

#nowebuiObject

use api=True to launch the API instead of the webui



293
294
295
# File 'lib/stable_diffusion/models/flags.rb', line 293

def nowebui
  @nowebui
end

#opt_channelslastObject

change memory type for stable diffusion to channels last



257
258
259
# File 'lib/stable_diffusion/models/flags.rb', line 257

def opt_channelslast
  @opt_channelslast
end

#opt_sdp_attentionObject

prefer scaled dot product cross-attention layer optimization for automatic choice of optimization; requires PyTorch 2.*



197
198
199
# File 'lib/stable_diffusion/models/flags.rb', line 197

def opt_sdp_attention
  @opt_sdp_attention
end

#opt_sdp_no_mem_attentionObject

prefer scaled dot product cross-attention layer optimization without memory efficient attention for automatic choice of optimization, makes image generation deterministic; requires PyTorch 2.*



200
201
202
# File 'lib/stable_diffusion/models/flags.rb', line 200

def opt_sdp_no_mem_attention
  @opt_sdp_no_mem_attention
end

#opt_split_attentionObject

prefer Doggettx’s cross-attention layer optimization for automatic choice of optimization



176
177
178
# File 'lib/stable_diffusion/models/flags.rb', line 176

def opt_split_attention
  @opt_split_attention
end

#opt_split_attention_invokeaiObject

prefer InvokeAI’s cross-attention layer optimization for automatic choice of optimization



191
192
193
# File 'lib/stable_diffusion/models/flags.rb', line 191

def opt_split_attention_invokeai
  @opt_split_attention_invokeai
end

#opt_split_attention_v1Object

prefer older version of split attention optimization for automatic choice of optimization



194
195
196
# File 'lib/stable_diffusion/models/flags.rb', line 194

def opt_split_attention_v1
  @opt_split_attention_v1
end

#opt_sub_quad_attentionObject

prefer memory efficient sub-quadratic cross-attention layer optimization for automatic choice of optimization



179
180
181
# File 'lib/stable_diffusion/models/flags.rb', line 179

def opt_sub_quad_attention
  @opt_sub_quad_attention
end

#portObject

launch gradio with given server port, you need root/admin rights for ports < 1024, defaults to 7860 if available



221
222
223
# File 'lib/stable_diffusion/models/flags.rb', line 221

def port
  @port
end

#precisionObject

evaluate at this precision



125
126
127
# File 'lib/stable_diffusion/models/flags.rb', line 125

def precision
  @precision
end

#realesrgan_models_pathObject

Path to directory with RealESRGAN model file(s).



158
159
160
# File 'lib/stable_diffusion/models/flags.rb', line 158

def realesrgan_models_path
  @realesrgan_models_path
end

#reinstall_torchObject

launch.py argument: install the appropriate version of torch even if you have some version already installed



32
33
34
# File 'lib/stable_diffusion/models/flags.rb', line 32

def reinstall_torch
  @reinstall_torch
end

#reinstall_xformersObject

launch.py argument: install the appropriate version of xformers even if you have some version already installed



29
30
31
# File 'lib/stable_diffusion/models/flags.rb', line 29

def reinstall_xformers
  @reinstall_xformers
end

#scunet_models_pathObject

Path to directory with ScuNET model file(s).



368
369
370
# File 'lib/stable_diffusion/models/flags.rb', line 368

def scunet_models_path
  @scunet_models_path
end

#server_nameObject

Sets hostname of server



320
321
322
# File 'lib/stable_diffusion/models/flags.rb', line 320

def server_name
  @server_name
end

#shareObject

use share=True for gradio and make the UI accessible through their site



131
132
133
# File 'lib/stable_diffusion/models/flags.rb', line 131

def share
  @share
end

#show_negative_promptObject

does not do anything



224
225
226
# File 'lib/stable_diffusion/models/flags.rb', line 224

def show_negative_prompt
  @show_negative_prompt
end

#skip_installObject

launch.py argument: skip installation of packages



47
48
49
# File 'lib/stable_diffusion/models/flags.rb', line 47

def skip_install
  @skip_install
end

#skip_load_model_at_startObject

if load a model at web start, only take effect when –nowebui



356
357
358
# File 'lib/stable_diffusion/models/flags.rb', line 356

def skip_load_model_at_start
  @skip_load_model_at_start
end

#skip_prepare_environmentObject

launch.py argument: skip all environment preparation



44
45
46
# File 'lib/stable_diffusion/models/flags.rb', line 44

def skip_prepare_environment
  @skip_prepare_environment
end

#skip_python_version_checkObject

launch.py argument: do not check python version



23
24
25
# File 'lib/stable_diffusion/models/flags.rb', line 23

def skip_python_version_check
  @skip_python_version_check
end

#skip_torch_cuda_testObject

launch.py argument: do not check if CUDA is able to work properly



26
27
28
# File 'lib/stable_diffusion/models/flags.rb', line 26

def skip_torch_cuda_test
  @skip_torch_cuda_test
end

#skip_version_checkObject

Do not check versions of torch and xformers



329
330
331
# File 'lib/stable_diffusion/models/flags.rb', line 329

def skip_version_check
  @skip_version_check
end

#styles_fileObject

filename to use for styles



260
261
262
# File 'lib/stable_diffusion/models/flags.rb', line 260

def styles_file
  @styles_file
end

#sub_quad_chunk_thresholdObject

the percentage of VRAM threshold for the sub-quadratic cross-attention layer optimization to use chunking



188
189
190
# File 'lib/stable_diffusion/models/flags.rb', line 188

def sub_quad_chunk_threshold
  @sub_quad_chunk_threshold
end

#sub_quad_kv_chunk_sizeObject

kv chunk size for the sub-quadratic cross-attention layer optimization to use



185
186
187
# File 'lib/stable_diffusion/models/flags.rb', line 185

def sub_quad_kv_chunk_size
  @sub_quad_kv_chunk_size
end

#sub_quad_q_chunk_sizeObject

query chunk size for the sub-quadratic cross-attention layer optimization to use



182
183
184
# File 'lib/stable_diffusion/models/flags.rb', line 182

def sub_quad_q_chunk_size
  @sub_quad_q_chunk_size
end

#subpathObject

customize the subpath for gradio, use with reverse proxy



338
339
340
# File 'lib/stable_diffusion/models/flags.rb', line 338

def subpath
  @subpath
end

#swinir_models_pathObject

Path to directory with SwinIR model file(s).



371
372
373
# File 'lib/stable_diffusion/models/flags.rb', line 371

def swinir_models_path
  @swinir_models_path
end

#test_serverObject

launch.py argument: configure server for testing



38
39
40
# File 'lib/stable_diffusion/models/flags.rb', line 38

def test_server
  @test_server
end

#textual_inversion_templates_dirObject

directory with textual inversion templates



95
96
97
# File 'lib/stable_diffusion/models/flags.rb', line 95

def textual_inversion_templates_dir
  @textual_inversion_templates_dir
end

#themeObject

launches the UI with light or dark theme



266
267
268
# File 'lib/stable_diffusion/models/flags.rb', line 266

def theme
  @theme
end

#timeout_keep_aliveObject

set timeout_keep_alive for uvicorn



347
348
349
# File 'lib/stable_diffusion/models/flags.rb', line 347

def timeout_keep_alive
  @timeout_keep_alive
end

#tls_certfileObject

Partially enables TLS, requires –tls-keyfile to fully function



314
315
316
# File 'lib/stable_diffusion/models/flags.rb', line 314

def tls_certfile
  @tls_certfile
end

#tls_keyfileObject

Partially enables TLS, requires –tls-certfile to fully function



311
312
313
# File 'lib/stable_diffusion/models/flags.rb', line 311

def tls_keyfile
  @tls_keyfile
end

#ui_config_fileObject

filename to use for ui configuration



227
228
229
# File 'lib/stable_diffusion/models/flags.rb', line 227

def ui_config_file
  @ui_config_file
end

#ui_debug_modeObject

Don’t load model to quickly launch UI



296
297
298
# File 'lib/stable_diffusion/models/flags.rb', line 296

def ui_debug_mode
  @ui_debug_mode
end

#ui_settings_fileObject

filename to use for ui settings



236
237
238
# File 'lib/stable_diffusion/models/flags.rb', line 236

def ui_settings_file
  @ui_settings_file
end

#unload_gfpganObject

does not do anything.



122
123
124
# File 'lib/stable_diffusion/models/flags.rb', line 122

def unload_gfpgan
  @unload_gfpgan
end

#upcast_samplingObject

upcast sampling. No effect with –no-half. Usually produces similar results to –no-half with better performance while using less memory.



128
129
130
# File 'lib/stable_diffusion/models/flags.rb', line 128

def upcast_sampling
  @upcast_sampling
end

#update_all_extensionsObject

launch.py argument: download updates for all extensions when starting the program



20
21
22
# File 'lib/stable_diffusion/models/flags.rb', line 20

def update_all_extensions
  @update_all_extensions
end

#update_checkObject

launch.py argument: check for updates at startup



35
36
37
# File 'lib/stable_diffusion/models/flags.rb', line 35

def update_check
  @update_check
end

#use_cpuObject

use CPU as torch device for specified modules



209
210
211
# File 'lib/stable_diffusion/models/flags.rb', line 209

def use_cpu
  @use_cpu
end

#use_ipexObject

use Intel XPU as torch device



212
213
214
# File 'lib/stable_diffusion/models/flags.rb', line 212

def use_ipex
  @use_ipex
end

#use_textbox_seedObject

use textbox for seeds in UI (no up/down, but possible to input long seeds)



269
270
271
# File 'lib/stable_diffusion/models/flags.rb', line 269

def use_textbox_seed
  @use_textbox_seed
end

#vae_dirObject

Path to directory with VAE files



71
72
73
# File 'lib/stable_diffusion/models/flags.rb', line 71

def vae_dir
  @vae_dir
end

#vae_pathObject

Checkpoint to use as VAE; setting this argument disables all settings related to VAE



278
279
280
# File 'lib/stable_diffusion/models/flags.rb', line 278

def vae_path
  @vae_path
end

#xformersObject

enable xformers for cross attention layers



164
165
166
# File 'lib/stable_diffusion/models/flags.rb', line 164

def xformers
  @xformers
end

#xformers_flash_attentionObject

enable xformers with Flash Attention to improve reproducibility (supported for SD2.x or variant only)



170
171
172
# File 'lib/stable_diffusion/models/flags.rb', line 170

def xformers_flash_attention
  @xformers_flash_attention
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
# File 'lib/stable_diffusion/models/flags.rb', line 374

def self.attribute_map
  {
    :'f' => :'f',
    :'update_all_extensions' => :'update_all_extensions',
    :'skip_python_version_check' => :'skip_python_version_check',
    :'skip_torch_cuda_test' => :'skip_torch_cuda_test',
    :'reinstall_xformers' => :'reinstall_xformers',
    :'reinstall_torch' => :'reinstall_torch',
    :'update_check' => :'update_check',
    :'test_server' => :'test_server',
    :'log_startup' => :'log_startup',
    :'skip_prepare_environment' => :'skip_prepare_environment',
    :'skip_install' => :'skip_install',
    :'dump_sysinfo' => :'dump_sysinfo',
    :'loglevel' => :'loglevel',
    :'do_not_download_clip' => :'do_not_download_clip',
    :'data_dir' => :'data_dir',
    :'config' => :'config',
    :'ckpt' => :'ckpt',
    :'ckpt_dir' => :'ckpt_dir',
    :'vae_dir' => :'vae_dir',
    :'gfpgan_dir' => :'gfpgan_dir',
    :'gfpgan_model' => :'gfpgan_model',
    :'no_half' => :'no_half',
    :'no_half_vae' => :'no_half_vae',
    :'no_progressbar_hiding' => :'no_progressbar_hiding',
    :'max_batch_count' => :'max_batch_count',
    :'embeddings_dir' => :'embeddings_dir',
    :'textual_inversion_templates_dir' => :'textual_inversion_templates_dir',
    :'hypernetwork_dir' => :'hypernetwork_dir',
    :'localizations_dir' => :'localizations_dir',
    :'allow_code' => :'allow_code',
    :'medvram' => :'medvram',
    :'medvram_sdxl' => :'medvram_sdxl',
    :'lowvram' => :'lowvram',
    :'lowram' => :'lowram',
    :'always_batch_cond_uncond' => :'always_batch_cond_uncond',
    :'unload_gfpgan' => :'unload_gfpgan',
    :'precision' => :'precision',
    :'upcast_sampling' => :'upcast_sampling',
    :'share' => :'share',
    :'ngrok' => :'ngrok',
    :'ngrok_region' => :'ngrok_region',
    :'ngrok_options' => :'ngrok_options',
    :'enable_insecure_extension_access' => :'enable_insecure_extension_access',
    :'codeformer_models_path' => :'codeformer_models_path',
    :'gfpgan_models_path' => :'gfpgan_models_path',
    :'esrgan_models_path' => :'esrgan_models_path',
    :'bsrgan_models_path' => :'bsrgan_models_path',
    :'realesrgan_models_path' => :'realesrgan_models_path',
    :'clip_models_path' => :'clip_models_path',
    :'xformers' => :'xformers',
    :'force_enable_xformers' => :'force_enable_xformers',
    :'xformers_flash_attention' => :'xformers_flash_attention',
    :'deepdanbooru' => :'deepdanbooru',
    :'opt_split_attention' => :'opt_split_attention',
    :'opt_sub_quad_attention' => :'opt_sub_quad_attention',
    :'sub_quad_q_chunk_size' => :'sub_quad_q_chunk_size',
    :'sub_quad_kv_chunk_size' => :'sub_quad_kv_chunk_size',
    :'sub_quad_chunk_threshold' => :'sub_quad_chunk_threshold',
    :'opt_split_attention_invokeai' => :'opt_split_attention_invokeai',
    :'opt_split_attention_v1' => :'opt_split_attention_v1',
    :'opt_sdp_attention' => :'opt_sdp_attention',
    :'opt_sdp_no_mem_attention' => :'opt_sdp_no_mem_attention',
    :'disable_opt_split_attention' => :'disable_opt_split_attention',
    :'disable_nan_check' => :'disable_nan_check',
    :'use_cpu' => :'use_cpu',
    :'use_ipex' => :'use_ipex',
    :'disable_model_loading_ram_optimization' => :'disable_model_loading_ram_optimization',
    :'listen' => :'listen',
    :'port' => :'port',
    :'show_negative_prompt' => :'show_negative_prompt',
    :'ui_config_file' => :'ui_config_file',
    :'hide_ui_dir_config' => :'hide_ui_dir_config',
    :'freeze_settings' => :'freeze_settings',
    :'ui_settings_file' => :'ui_settings_file',
    :'gradio_debug' => :'gradio_debug',
    :'gradio_auth' => :'gradio_auth',
    :'gradio_auth_path' => :'gradio_auth_path',
    :'gradio_img2img_tool' => :'gradio_img2img_tool',
    :'gradio_inpaint_tool' => :'gradio_inpaint_tool',
    :'gradio_allowed_path' => :'gradio_allowed_path',
    :'opt_channelslast' => :'opt_channelslast',
    :'styles_file' => :'styles_file',
    :'autolaunch' => :'autolaunch',
    :'theme' => :'theme',
    :'use_textbox_seed' => :'use_textbox_seed',
    :'disable_console_progressbars' => :'disable_console_progressbars',
    :'enable_console_prompts' => :'enable_console_prompts',
    :'vae_path' => :'vae_path',
    :'disable_safe_unpickle' => :'disable_safe_unpickle',
    :'api' => :'api',
    :'api_auth' => :'api_auth',
    :'api_log' => :'api_log',
    :'nowebui' => :'nowebui',
    :'ui_debug_mode' => :'ui_debug_mode',
    :'device_id' => :'device_id',
    :'administrator' => :'administrator',
    :'cors_allow_origins' => :'cors_allow_origins',
    :'cors_allow_origins_regex' => :'cors_allow_origins_regex',
    :'tls_keyfile' => :'tls_keyfile',
    :'tls_certfile' => :'tls_certfile',
    :'disable_tls_verify' => :'disable_tls_verify',
    :'server_name' => :'server_name',
    :'gradio_queue' => :'gradio_queue',
    :'no_gradio_queue' => :'no_gradio_queue',
    :'skip_version_check' => :'skip_version_check',
    :'no_hashing' => :'no_hashing',
    :'no_download_sd_model' => :'no_download_sd_model',
    :'subpath' => :'subpath',
    :'add_stop_route' => :'add_stop_route',
    :'api_server_stop' => :'api_server_stop',
    :'timeout_keep_alive' => :'timeout_keep_alive',
    :'disable_all_extensions' => :'disable_all_extensions',
    :'disable_extra_extensions' => :'disable_extra_extensions',
    :'skip_load_model_at_start' => :'skip_load_model_at_start',
    :'ldsr_models_path' => :'ldsr_models_path',
    :'lora_dir' => :'lora_dir',
    :'lyco_dir_backcompat' => :'lyco_dir_backcompat',
    :'scunet_models_path' => :'scunet_models_path',
    :'swinir_models_path' => :'swinir_models_path'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



1463
1464
1465
# File 'lib/stable_diffusion/models/flags.rb', line 1463

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



624
625
626
627
# File 'lib/stable_diffusion/models/flags.rb', line 624

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
# File 'lib/stable_diffusion/models/flags.rb', line 499

def self.openapi_types
  {
    :'f' => :'Object',
    :'update_all_extensions' => :'Object',
    :'skip_python_version_check' => :'Object',
    :'skip_torch_cuda_test' => :'Object',
    :'reinstall_xformers' => :'Object',
    :'reinstall_torch' => :'Object',
    :'update_check' => :'Object',
    :'test_server' => :'Object',
    :'log_startup' => :'Object',
    :'skip_prepare_environment' => :'Object',
    :'skip_install' => :'Object',
    :'dump_sysinfo' => :'Object',
    :'loglevel' => :'Object',
    :'do_not_download_clip' => :'Object',
    :'data_dir' => :'Object',
    :'config' => :'Object',
    :'ckpt' => :'Object',
    :'ckpt_dir' => :'Object',
    :'vae_dir' => :'Object',
    :'gfpgan_dir' => :'Object',
    :'gfpgan_model' => :'Object',
    :'no_half' => :'Object',
    :'no_half_vae' => :'Object',
    :'no_progressbar_hiding' => :'Object',
    :'max_batch_count' => :'Object',
    :'embeddings_dir' => :'Object',
    :'textual_inversion_templates_dir' => :'Object',
    :'hypernetwork_dir' => :'Object',
    :'localizations_dir' => :'Object',
    :'allow_code' => :'Object',
    :'medvram' => :'Object',
    :'medvram_sdxl' => :'Object',
    :'lowvram' => :'Object',
    :'lowram' => :'Object',
    :'always_batch_cond_uncond' => :'Object',
    :'unload_gfpgan' => :'Object',
    :'precision' => :'Object',
    :'upcast_sampling' => :'Object',
    :'share' => :'Object',
    :'ngrok' => :'Object',
    :'ngrok_region' => :'Object',
    :'ngrok_options' => :'Object',
    :'enable_insecure_extension_access' => :'Object',
    :'codeformer_models_path' => :'Object',
    :'gfpgan_models_path' => :'Object',
    :'esrgan_models_path' => :'Object',
    :'bsrgan_models_path' => :'Object',
    :'realesrgan_models_path' => :'Object',
    :'clip_models_path' => :'Object',
    :'xformers' => :'Object',
    :'force_enable_xformers' => :'Object',
    :'xformers_flash_attention' => :'Object',
    :'deepdanbooru' => :'Object',
    :'opt_split_attention' => :'Object',
    :'opt_sub_quad_attention' => :'Object',
    :'sub_quad_q_chunk_size' => :'Object',
    :'sub_quad_kv_chunk_size' => :'Object',
    :'sub_quad_chunk_threshold' => :'Object',
    :'opt_split_attention_invokeai' => :'Object',
    :'opt_split_attention_v1' => :'Object',
    :'opt_sdp_attention' => :'Object',
    :'opt_sdp_no_mem_attention' => :'Object',
    :'disable_opt_split_attention' => :'Object',
    :'disable_nan_check' => :'Object',
    :'use_cpu' => :'Object',
    :'use_ipex' => :'Object',
    :'disable_model_loading_ram_optimization' => :'Object',
    :'listen' => :'Object',
    :'port' => :'Object',
    :'show_negative_prompt' => :'Object',
    :'ui_config_file' => :'Object',
    :'hide_ui_dir_config' => :'Object',
    :'freeze_settings' => :'Object',
    :'ui_settings_file' => :'Object',
    :'gradio_debug' => :'Object',
    :'gradio_auth' => :'Object',
    :'gradio_auth_path' => :'Object',
    :'gradio_img2img_tool' => :'Object',
    :'gradio_inpaint_tool' => :'Object',
    :'gradio_allowed_path' => :'Object',
    :'opt_channelslast' => :'Object',
    :'styles_file' => :'Object',
    :'autolaunch' => :'Object',
    :'theme' => :'Object',
    :'use_textbox_seed' => :'Object',
    :'disable_console_progressbars' => :'Object',
    :'enable_console_prompts' => :'Object',
    :'vae_path' => :'Object',
    :'disable_safe_unpickle' => :'Object',
    :'api' => :'Object',
    :'api_auth' => :'Object',
    :'api_log' => :'Object',
    :'nowebui' => :'Object',
    :'ui_debug_mode' => :'Object',
    :'device_id' => :'Object',
    :'administrator' => :'Object',
    :'cors_allow_origins' => :'Object',
    :'cors_allow_origins_regex' => :'Object',
    :'tls_keyfile' => :'Object',
    :'tls_certfile' => :'Object',
    :'disable_tls_verify' => :'Object',
    :'server_name' => :'Object',
    :'gradio_queue' => :'Object',
    :'no_gradio_queue' => :'Object',
    :'skip_version_check' => :'Object',
    :'no_hashing' => :'Object',
    :'no_download_sd_model' => :'Object',
    :'subpath' => :'Object',
    :'add_stop_route' => :'Object',
    :'api_server_stop' => :'Object',
    :'timeout_keep_alive' => :'Object',
    :'disable_all_extensions' => :'Object',
    :'disable_extra_extensions' => :'Object',
    :'skip_load_model_at_start' => :'Object',
    :'ldsr_models_path' => :'Object',
    :'lora_dir' => :'Object',
    :'lyco_dir_backcompat' => :'Object',
    :'scunet_models_path' => :'Object',
    :'swinir_models_path' => :'Object'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
# File 'lib/stable_diffusion/models/flags.rb', line 1324

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      f == o.f &&
      update_all_extensions == o.update_all_extensions &&
      skip_python_version_check == o.skip_python_version_check &&
      skip_torch_cuda_test == o.skip_torch_cuda_test &&
      reinstall_xformers == o.reinstall_xformers &&
      reinstall_torch == o.reinstall_torch &&
      update_check == o.update_check &&
      test_server == o.test_server &&
      log_startup == o.log_startup &&
      skip_prepare_environment == o.skip_prepare_environment &&
      skip_install == o.skip_install &&
      dump_sysinfo == o.dump_sysinfo &&
      loglevel == o.loglevel &&
      do_not_download_clip == o.do_not_download_clip &&
      data_dir == o.data_dir &&
      config == o.config &&
      ckpt == o.ckpt &&
      ckpt_dir == o.ckpt_dir &&
      vae_dir == o.vae_dir &&
      gfpgan_dir == o.gfpgan_dir &&
      gfpgan_model == o.gfpgan_model &&
      no_half == o.no_half &&
      no_half_vae == o.no_half_vae &&
      no_progressbar_hiding == o.no_progressbar_hiding &&
      max_batch_count == o.max_batch_count &&
      embeddings_dir == o.embeddings_dir &&
      textual_inversion_templates_dir == o.textual_inversion_templates_dir &&
      hypernetwork_dir == o.hypernetwork_dir &&
      localizations_dir == o.localizations_dir &&
      allow_code == o.allow_code &&
      medvram == o.medvram &&
      medvram_sdxl == o.medvram_sdxl &&
      lowvram == o.lowvram &&
      lowram == o.lowram &&
      always_batch_cond_uncond == o.always_batch_cond_uncond &&
      unload_gfpgan == o.unload_gfpgan &&
      precision == o.precision &&
      upcast_sampling == o.upcast_sampling &&
      share == o.share &&
      ngrok == o.ngrok &&
      ngrok_region == o.ngrok_region &&
      ngrok_options == o.ngrok_options &&
      enable_insecure_extension_access == o.enable_insecure_extension_access &&
      codeformer_models_path == o.codeformer_models_path &&
      gfpgan_models_path == o.gfpgan_models_path &&
      esrgan_models_path == o.esrgan_models_path &&
      bsrgan_models_path == o.bsrgan_models_path &&
      realesrgan_models_path == o.realesrgan_models_path &&
      clip_models_path == o.clip_models_path &&
      xformers == o.xformers &&
      force_enable_xformers == o.force_enable_xformers &&
      xformers_flash_attention == o.xformers_flash_attention &&
      deepdanbooru == o.deepdanbooru &&
      opt_split_attention == o.opt_split_attention &&
      opt_sub_quad_attention == o.opt_sub_quad_attention &&
      sub_quad_q_chunk_size == o.sub_quad_q_chunk_size &&
      sub_quad_kv_chunk_size == o.sub_quad_kv_chunk_size &&
      sub_quad_chunk_threshold == o.sub_quad_chunk_threshold &&
      opt_split_attention_invokeai == o.opt_split_attention_invokeai &&
      opt_split_attention_v1 == o.opt_split_attention_v1 &&
      opt_sdp_attention == o.opt_sdp_attention &&
      opt_sdp_no_mem_attention == o.opt_sdp_no_mem_attention &&
      disable_opt_split_attention == o.disable_opt_split_attention &&
      disable_nan_check == o.disable_nan_check &&
      use_cpu == o.use_cpu &&
      use_ipex == o.use_ipex &&
      disable_model_loading_ram_optimization == o.disable_model_loading_ram_optimization &&
      listen == o.listen &&
      port == o.port &&
      show_negative_prompt == o.show_negative_prompt &&
      ui_config_file == o.ui_config_file &&
      hide_ui_dir_config == o.hide_ui_dir_config &&
      freeze_settings == o.freeze_settings &&
      ui_settings_file == o.ui_settings_file &&
      gradio_debug == o.gradio_debug &&
      gradio_auth == o.gradio_auth &&
      gradio_auth_path == o.gradio_auth_path &&
      gradio_img2img_tool == o.gradio_img2img_tool &&
      gradio_inpaint_tool == o.gradio_inpaint_tool &&
      gradio_allowed_path == o.gradio_allowed_path &&
      opt_channelslast == o.opt_channelslast &&
      styles_file == o.styles_file &&
      autolaunch == o.autolaunch &&
      theme == o.theme &&
      use_textbox_seed == o.use_textbox_seed &&
      disable_console_progressbars == o.disable_console_progressbars &&
      enable_console_prompts == o.enable_console_prompts &&
      vae_path == o.vae_path &&
      disable_safe_unpickle == o.disable_safe_unpickle &&
      api == o.api &&
      api_auth == o.api_auth &&
      api_log == o.api_log &&
      nowebui == o.nowebui &&
      ui_debug_mode == o.ui_debug_mode &&
      device_id == o.device_id &&
      administrator == o.administrator &&
      cors_allow_origins == o.cors_allow_origins &&
      cors_allow_origins_regex == o.cors_allow_origins_regex &&
      tls_keyfile == o.tls_keyfile &&
      tls_certfile == o.tls_certfile &&
      disable_tls_verify == o.disable_tls_verify &&
      server_name == o.server_name &&
      gradio_queue == o.gradio_queue &&
      no_gradio_queue == o.no_gradio_queue &&
      skip_version_check == o.skip_version_check &&
      no_hashing == o.no_hashing &&
      no_download_sd_model == o.no_download_sd_model &&
      subpath == o.subpath &&
      add_stop_route == o.add_stop_route &&
      api_server_stop == o.api_server_stop &&
      timeout_keep_alive == o.timeout_keep_alive &&
      disable_all_extensions == o.disable_all_extensions &&
      disable_extra_extensions == o.disable_extra_extensions &&
      skip_load_model_at_start == o.skip_load_model_at_start &&
      ldsr_models_path == o.ldsr_models_path &&
      lora_dir == o.lora_dir &&
      lyco_dir_backcompat == o.lyco_dir_backcompat &&
      scunet_models_path == o.scunet_models_path &&
      swinir_models_path == o.swinir_models_path
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
# File 'lib/stable_diffusion/models/flags.rb', line 1493

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    StableDiffusion.const_get(type).build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
# File 'lib/stable_diffusion/models/flags.rb', line 1562

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
# File 'lib/stable_diffusion/models/flags.rb', line 1470

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.openapi_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      self.send("#{key}=", nil)
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


1450
1451
1452
# File 'lib/stable_diffusion/models/flags.rb', line 1450

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



1456
1457
1458
# File 'lib/stable_diffusion/models/flags.rb', line 1456

def hash
  [f, update_all_extensions, skip_python_version_check, skip_torch_cuda_test, reinstall_xformers, reinstall_torch, update_check, test_server, log_startup, skip_prepare_environment, skip_install, dump_sysinfo, loglevel, do_not_download_clip, data_dir, config, ckpt, ckpt_dir, vae_dir, gfpgan_dir, gfpgan_model, no_half, no_half_vae, no_progressbar_hiding, max_batch_count, embeddings_dir, textual_inversion_templates_dir, hypernetwork_dir, localizations_dir, allow_code, medvram, medvram_sdxl, lowvram, lowram, always_batch_cond_uncond, unload_gfpgan, precision, upcast_sampling, share, ngrok, ngrok_region, ngrok_options, enable_insecure_extension_access, codeformer_models_path, gfpgan_models_path, esrgan_models_path, bsrgan_models_path, realesrgan_models_path, clip_models_path, xformers, force_enable_xformers, xformers_flash_attention, deepdanbooru, opt_split_attention, opt_sub_quad_attention, sub_quad_q_chunk_size, sub_quad_kv_chunk_size, sub_quad_chunk_threshold, opt_split_attention_invokeai, opt_split_attention_v1, opt_sdp_attention, opt_sdp_no_mem_attention, disable_opt_split_attention, disable_nan_check, use_cpu, use_ipex, disable_model_loading_ram_optimization, listen, port, show_negative_prompt, ui_config_file, hide_ui_dir_config, freeze_settings, ui_settings_file, gradio_debug, gradio_auth, gradio_auth_path, gradio_img2img_tool, gradio_inpaint_tool, gradio_allowed_path, opt_channelslast, styles_file, autolaunch, theme, use_textbox_seed, disable_console_progressbars, enable_console_prompts, vae_path, disable_safe_unpickle, api, api_auth, api_log, nowebui, ui_debug_mode, device_id, administrator, cors_allow_origins, cors_allow_origins_regex, tls_keyfile, tls_certfile, disable_tls_verify, server_name, gradio_queue, no_gradio_queue, skip_version_check, no_hashing, no_download_sd_model, subpath, add_stop_route, api_server_stop, timeout_keep_alive, disable_all_extensions, disable_extra_extensions, skip_load_model_at_start, ldsr_models_path, lora_dir, lyco_dir_backcompat, scunet_models_path, swinir_models_path].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



1311
1312
1313
1314
# File 'lib/stable_diffusion/models/flags.rb', line 1311

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



1538
1539
1540
# File 'lib/stable_diffusion/models/flags.rb', line 1538

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
# File 'lib/stable_diffusion/models/flags.rb', line 1544

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



1532
1533
1534
# File 'lib/stable_diffusion/models/flags.rb', line 1532

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



1318
1319
1320
# File 'lib/stable_diffusion/models/flags.rb', line 1318

def valid?
  true
end