СivitAi-Browser+ : carries a risk for kaggle!
Browse files
files_cells/notebooks/en/launch_en.ipynb
CHANGED
@@ -98,6 +98,9 @@
|
|
98 |
"!sed -i 's|\"additional_networks_extra_lora_path\": \".*\"|\"additional_networks_extra_lora_path\": \"{webui_path}/models/Lora/\"|' {webui_path}/config.json\n",
|
99 |
"!sed -i 's|\"ad_extra_models_dir\": \".*\"|\"ad_extra_models_dir\": \"{webui_path}/models/adetailer/\"|' {webui_path}/config.json\n",
|
100 |
"!sed -i 's/\"sd_checkpoint_hash\": \".*\"/\"sd_checkpoint_hash\": \"\"/g; s/\"sd_model_checkpoint\": \".*\"/\"sd_model_checkpoint\": \"\"/g; s/\"sd_vae\": \".*\"/\"sd_vae\": \"None\"/g' {webui_path}/config.json\n",
|
|
|
|
|
|
|
101 |
"\n",
|
102 |
"\n",
|
103 |
"with tunnel:\n",
|
|
|
98 |
"!sed -i 's|\"additional_networks_extra_lora_path\": \".*\"|\"additional_networks_extra_lora_path\": \"{webui_path}/models/Lora/\"|' {webui_path}/config.json\n",
|
99 |
"!sed -i 's|\"ad_extra_models_dir\": \".*\"|\"ad_extra_models_dir\": \"{webui_path}/models/adetailer/\"|' {webui_path}/config.json\n",
|
100 |
"!sed -i 's/\"sd_checkpoint_hash\": \".*\"/\"sd_checkpoint_hash\": \"\"/g; s/\"sd_model_checkpoint\": \".*\"/\"sd_model_checkpoint\": \"\"/g; s/\"sd_vae\": \".*\"/\"sd_vae\": \"None\"/g' {webui_path}/config.json\n",
|
101 |
+
"# for kaggle\n",
|
102 |
+
"if env == 'Kaggle':\n",
|
103 |
+
" !sed -i 's/\"civitai_interface\\/NSFW content\\/value\":.*/\"civitai_interface\\/NSFW content\\/value\": false/g' {webui_path}/ui-config.json\n",
|
104 |
"\n",
|
105 |
"\n",
|
106 |
"with tunnel:\n",
|
files_cells/notebooks/ru/launch_ru.ipynb
CHANGED
@@ -98,7 +98,9 @@
|
|
98 |
"!sed -i 's|\"additional_networks_extra_lora_path\": \".*\"|\"additional_networks_extra_lora_path\": \"{webui_path}/models/Lora/\"|' {webui_path}/config.json\n",
|
99 |
"!sed -i 's|\"ad_extra_models_dir\": \".*\"|\"ad_extra_models_dir\": \"{webui_path}/models/adetailer/\"|' {webui_path}/config.json\n",
|
100 |
"!sed -i 's/\"sd_checkpoint_hash\": \".*\"/\"sd_checkpoint_hash\": \"\"/g; s/\"sd_model_checkpoint\": \".*\"/\"sd_model_checkpoint\": \"\"/g; s/\"sd_vae\": \".*\"/\"sd_vae\": \"None\"/g' {webui_path}/config.json\n",
|
101 |
-
"\n",
|
|
|
|
|
102 |
"\n",
|
103 |
"with tunnel:\n",
|
104 |
" %cd {webui_path}\n",
|
|
|
98 |
"!sed -i 's|\"additional_networks_extra_lora_path\": \".*\"|\"additional_networks_extra_lora_path\": \"{webui_path}/models/Lora/\"|' {webui_path}/config.json\n",
|
99 |
"!sed -i 's|\"ad_extra_models_dir\": \".*\"|\"ad_extra_models_dir\": \"{webui_path}/models/adetailer/\"|' {webui_path}/config.json\n",
|
100 |
"!sed -i 's/\"sd_checkpoint_hash\": \".*\"/\"sd_checkpoint_hash\": \"\"/g; s/\"sd_model_checkpoint\": \".*\"/\"sd_model_checkpoint\": \"\"/g; s/\"sd_vae\": \".*\"/\"sd_vae\": \"None\"/g' {webui_path}/config.json\n",
|
101 |
+
"# for kaggle\n",
|
102 |
+
"if env == 'Kaggle':\n",
|
103 |
+
" !sed -i 's/\"civitai_interface\\/NSFW content\\/value\":.*/\"civitai_interface\\/NSFW content\\/value\": false/g' {webui_path}/ui-config.json\n",
|
104 |
"\n",
|
105 |
"with tunnel:\n",
|
106 |
" %cd {webui_path}\n",
|
files_cells/python/en/launch_en.py
CHANGED
@@ -74,6 +74,9 @@ get_ipython().system('sed -i \'s|"tagger_hf_cache_dir": ".*"|"tagger_hf_cache_di
|
|
74 |
get_ipython().system('sed -i \'s|"additional_networks_extra_lora_path": ".*"|"additional_networks_extra_lora_path": "{webui_path}/models/Lora/"|\' {webui_path}/config.json')
|
75 |
get_ipython().system('sed -i \'s|"ad_extra_models_dir": ".*"|"ad_extra_models_dir": "{webui_path}/models/adetailer/"|\' {webui_path}/config.json')
|
76 |
get_ipython().system('sed -i \'s/"sd_checkpoint_hash": ".*"/"sd_checkpoint_hash": ""/g; s/"sd_model_checkpoint": ".*"/"sd_model_checkpoint": ""/g; s/"sd_vae": ".*"/"sd_vae": "None"/g\' {webui_path}/config.json')
|
|
|
|
|
|
|
77 |
|
78 |
|
79 |
with tunnel:
|
|
|
74 |
get_ipython().system('sed -i \'s|"additional_networks_extra_lora_path": ".*"|"additional_networks_extra_lora_path": "{webui_path}/models/Lora/"|\' {webui_path}/config.json')
|
75 |
get_ipython().system('sed -i \'s|"ad_extra_models_dir": ".*"|"ad_extra_models_dir": "{webui_path}/models/adetailer/"|\' {webui_path}/config.json')
|
76 |
get_ipython().system('sed -i \'s/"sd_checkpoint_hash": ".*"/"sd_checkpoint_hash": ""/g; s/"sd_model_checkpoint": ".*"/"sd_model_checkpoint": ""/g; s/"sd_vae": ".*"/"sd_vae": "None"/g\' {webui_path}/config.json')
|
77 |
+
# for kaggle
|
78 |
+
if env == 'Kaggle':
|
79 |
+
get_ipython().system('sed -i \'s/"civitai_interface\\/NSFW content\\/value":.*/"civitai_interface\\/NSFW content\\/value": false/g\' {webui_path}/ui-config.json')
|
80 |
|
81 |
|
82 |
with tunnel:
|
files_cells/python/ru/launch_ru.py
CHANGED
@@ -74,7 +74,9 @@ get_ipython().system('sed -i \'s|"tagger_hf_cache_dir": ".*"|"tagger_hf_cache_di
|
|
74 |
get_ipython().system('sed -i \'s|"additional_networks_extra_lora_path": ".*"|"additional_networks_extra_lora_path": "{webui_path}/models/Lora/"|\' {webui_path}/config.json')
|
75 |
get_ipython().system('sed -i \'s|"ad_extra_models_dir": ".*"|"ad_extra_models_dir": "{webui_path}/models/adetailer/"|\' {webui_path}/config.json')
|
76 |
get_ipython().system('sed -i \'s/"sd_checkpoint_hash": ".*"/"sd_checkpoint_hash": ""/g; s/"sd_model_checkpoint": ".*"/"sd_model_checkpoint": ""/g; s/"sd_vae": ".*"/"sd_vae": "None"/g\' {webui_path}/config.json')
|
77 |
-
|
|
|
|
|
78 |
|
79 |
with tunnel:
|
80 |
get_ipython().run_line_magic('cd', '{webui_path}')
|
|
|
74 |
get_ipython().system('sed -i \'s|"additional_networks_extra_lora_path": ".*"|"additional_networks_extra_lora_path": "{webui_path}/models/Lora/"|\' {webui_path}/config.json')
|
75 |
get_ipython().system('sed -i \'s|"ad_extra_models_dir": ".*"|"ad_extra_models_dir": "{webui_path}/models/adetailer/"|\' {webui_path}/config.json')
|
76 |
get_ipython().system('sed -i \'s/"sd_checkpoint_hash": ".*"/"sd_checkpoint_hash": ""/g; s/"sd_model_checkpoint": ".*"/"sd_model_checkpoint": ""/g; s/"sd_vae": ".*"/"sd_vae": "None"/g\' {webui_path}/config.json')
|
77 |
+
# for kaggle
|
78 |
+
if env == 'Kaggle':
|
79 |
+
get_ipython().system('sed -i \'s/"civitai_interface\\/NSFW content\\/value":.*/"civitai_interface\\/NSFW content\\/value": false/g\' {webui_path}/ui-config.json')
|
80 |
|
81 |
with tunnel:
|
82 |
get_ipython().run_line_magic('cd', '{webui_path}')
|