Your machine may be at risk if the file contains malicious content.
Loading config D:\Program Files\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\oneformer\configs/ade20k/oneformer_swin_large_IN21k_384_bs16_160k.yaml with yaml.unsafe_load. Your machine may be at risk if the file contains malicious content. Loading config D:\Program Files\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\oneformer\configs/ade20k\Base-ADE20K-UnifiedSegmentation.yaml with yaml.unsafe_load. Your machine may be at risk if the file contains malicious content.
What's up with that?
Probably related to the entry for "safe_load" on this page https://pyyaml.org/wiki/PyYAMLDocumentation
anyone knows what to do? I've installed default control net and when trying the "seg_ofade20k" preprocessor I get this warning
WARNING:fvcore.common.config:Loading config C:\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\oneformer\configs/ade20k/oneformer_swin_large_IN21k_384_bs16_160k.yaml with yaml.unsafe_load. Your machine may be at risk if the file contains malicious content. WARNING:fvcore.common.config:Loading config C:\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\oneformer\configs/ade20k\Base-ADE20K-UnifiedSegmentation.yaml with yaml.unsafe_load. Your machine may be at risk if the file contains malicious content.
I wanted to follow up here as I also ran into this warning and found it concerning. I decided to check all controlnet methods with their preprocessors and associated models to see which ones show this warning. I was pleased to find that this warning appears to be isolated to just one combination: control type "seg" set to seg_ofade20k preprocessor with the default model of control_v11p_sd15_seg.
I'll share my cmd outputs showing my trials below:
A1111 - [v1.4.0] 394ffa7b0a7fff3ec484bcd084e673a8b301ccc8, python: 3.10.6, torch: 2.0.0+cu118, xformers: N/A, gradio: 3.32.0, checkpoint: [c249d7853b] Controlnet - 8e143d35 | Sun Jun 25 04:45:53 2023
- Enable one controlnet, supply an input image, and then start checking preprocessor for each control type and preprocessor, starting from "Canny" and working through each combination until I have tried every combination (the only control type with multiple models was Lineart, I tested all preprocessors with both models for this control type)
- Everything looked good until I got to seg control type; seg_ofade20k preprocessor with control_v11p_sd15_seg model:
venv "T:\StableDiffusion\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.4.0
Commit hash: 394ffa7b0a7fff3ec484bcd084e673a8b301ccc8
Installing requirements
Fetching updates for midas...
Checking out commit for midas with hash: 1645b7e...
Launching Web UI with arguments: --ckpt-dir T:\StableDiffusion\stable-diffusion-webui\models\Stable-diffusion-alt\Main --hypernetwork-dir T:\StableDiffusion\stable-diffusion-webui\models\hypernetworks\Main --embeddings-dir T:\StableDiffusion\stable-diffusion-webui\embeddings\Main --lora-dir T:\StableDiffusion\stable-diffusion-webui\models\Lora\Main
No module 'xformers'. Proceeding without it.
Civitai Helper: Get Custom Model Folder
Civitai Helper: Load setting from: T:\StableDiffusion\stable-diffusion-webui\extensions\Stable-Diffusion-Webui-Civitai-Helper\setting.json
Civitai Helper: No setting file, use default
2023-06-30 14:34:36,571 - ControlNet - INFO - ControlNet v1.1.227
ControlNet preprocessor location: T:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2023-06-30 14:34:36,854 - ControlNet - INFO - ControlNet v1.1.227
Loading weights [c249d7853b] from T:\StableDiffusion\stable-diffusion-webui\models\Stable-diffusion-alt\Main\dreamshaper_6BakedVae.safetensors
*Deforum ControlNet support: enabled*
Creating model from config: T:\StableDiffusion\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
Startup time: 12.6s (import torch: 3.6s, import gradio: 1.3s, import ldm: 0.9s, other imports: 2.3s, setup codeformer: 0.1s, list SD models: 0.4s, load scripts: 2.6s, create ui: 1.1s, gradio launch: 0.3s).
Loading VAE weights specified in settings: T:\StableDiffusion\stable-diffusion-webui\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors
preload_extensions_git_metadata for 34 extensions took 4.32s
Applying attention optimization: Doggettx... done.
Textual inversion embeddings loaded(5): BadDream, easynegative, FastNegativeEmbedding, negative_hand-neg, UnrealisticDream
Model loaded in 6.7s (load weights from disk: 0.8s, create model: 0.7s, apply weights to model: 2.6s, apply half(): 0.9s, load VAE: 0.7s, move model to device: 0.8s).
2023-06-30 14:36:16,335 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:36:30,244 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:36:39,897 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:36:46,582 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:37:02,269 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:37:08,053 - ControlNet - INFO - Preview Resolution = 512
img_size [384, 512]
Params passed to Resize transform:
width: 512
height: 384
resize_target: True
keep_aspect_ratio: True
ensure_multiple_of: 32
resize_method: minimal
2023-06-30 14:37:29,083 - ControlNet - INFO - Preview Resolution = 512
Loading base model ()...Done.
Removing last two layers (global_pool & classifier).
2023-06-30 14:37:37,154 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:37:49,312 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:37:57,974 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:38:03,128 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:38:07,010 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:38:10,494 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:38:17,294 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:38:21,334 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:38:34,408 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:38:38,321 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:38:42,817 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:38:48,416 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:38:52,663 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:38:56,554 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:39:09,956 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:39:14,469 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:39:17,986 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:39:21,630 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:39:25,741 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:39:30,553 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:39:37,211 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:39:41,218 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:39:44,768 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:39:44,812 - ControlNet - INFO - Loaded state_dict from [T:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads\pidinet\table5_pidinet.pth]
2023-06-30 14:39:52,823 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:40:01,357 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:40:05,602 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:40:59,217 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:41:02,417 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:41:07,952 - ControlNet - INFO - Preview Resolution = 512
Loading config T:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\oneformer\configs/ade20k/oneformer_swin_large_IN21k_384_bs16_160k.yaml with yaml.unsafe_load. Your machine may be at risk if the file contains malicious content.
Loading config T:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\oneformer\configs/ade20k\Base-ADE20K-UnifiedSegmentation.yaml with yaml.unsafe_load. Your machine may be at risk if the file contains malicious content.
- Then I restarted SD and tried again, but started with seg_ofcoco preprocessor. I then tried seg_ufade20k. Both worked without throwing a warning. I then switched back to seg_ofade20k and the error returned:
venv "T:\StableDiffusion\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.4.0
Commit hash: 394ffa7b0a7fff3ec484bcd084e673a8b301ccc8
Installing requirements
Fetching updates for midas...
Checking out commit for midas with hash: 1645b7e...
Launching Web UI with arguments: --ckpt-dir T:\StableDiffusion\stable-diffusion-webui\models\Stable-diffusion-alt\Main --hypernetwork-dir T:\StableDiffusion\stable-diffusion-webui\models\hypernetworks\Main --embeddings-dir T:\StableDiffusion\stable-diffusion-webui\embeddings\Main --lora-dir T:\StableDiffusion\stable-diffusion-webui\models\Lora\Main
No module 'xformers'. Proceeding without it.
Civitai Helper: Get Custom Model Folder
Civitai Helper: Load setting from: T:\StableDiffusion\stable-diffusion-webui\extensions\Stable-Diffusion-Webui-Civitai-Helper\setting.json
Civitai Helper: No setting file, use default
2023-06-30 14:43:09,880 - ControlNet - INFO - ControlNet v1.1.227
ControlNet preprocessor location: T:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2023-06-30 14:43:09,985 - ControlNet - INFO - ControlNet v1.1.227
Loading weights [c249d7853b] from T:\StableDiffusion\stable-diffusion-webui\models\Stable-diffusion-alt\Main\dreamshaper_6BakedVae.safetensors
*Deforum ControlNet support: enabled*
Creating model from config: T:\StableDiffusion\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
Startup time: 8.0s (import torch: 1.9s, import gradio: 1.3s, import ldm: 0.5s, other imports: 0.9s, list SD models: 0.2s, load scripts: 2.1s, create ui: 0.8s, gradio launch: 0.3s).
DiffusionWrapper has 859.52 M params.
Loading VAE weights specified in settings: T:\StableDiffusion\stable-diffusion-webui\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors
Applying attention optimization: Doggettx... done.
Textual inversion embeddings loaded(5): BadDream, easynegative, FastNegativeEmbedding, negative_hand-neg, UnrealisticDream
Model loaded in 5.3s (load weights from disk: 0.7s, create model: 1.2s, apply weights to model: 0.8s, apply half(): 1.0s, load VAE: 0.6s, move model to device: 0.8s, calculate empty prompt: 0.1s).
preload_extensions_git_metadata for 34 extensions took 4.57s
2023-06-30 14:43:55,968 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:44:04,308 - ControlNet - INFO - Preview Resolution = 512
Use Checkpoint: False
Checkpoint Number: [0, 0, 0, 0]
Use global window for all blocks in stage3
load checkpoint from local path: T:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads\uniformer\upernet_global_small.pth
2023-06-30 14:44:34,498 - ControlNet - INFO - Preview Resolution = 512
Loading config T:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\oneformer\configs/ade20k/oneformer_swin_large_IN21k_384_bs16_160k.yaml with yaml.unsafe_load. Your machine may be at risk if the file contains malicious content.
Loading config T:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\oneformer\configs/ade20k\Base-ADE20K-UnifiedSegmentation.yaml with yaml.unsafe_load. Your machine may be at risk if the file contains malicious content.
- Restart SD again, and check remaining control types:
venv "T:\StableDiffusion\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.4.0
Commit hash: 394ffa7b0a7fff3ec484bcd084e673a8b301ccc8
Installing requirements
Fetching updates for midas...
Checking out commit for midas with hash: 1645b7e...
Launching Web UI with arguments: --ckpt-dir T:\StableDiffusion\stable-diffusion-webui\models\Stable-diffusion-alt\Main --hypernetwork-dir T:\StableDiffusion\stable-diffusion-webui\models\hypernetworks\Main --embeddings-dir T:\StableDiffusion\stable-diffusion-webui\embeddings\Main --lora-dir T:\StableDiffusion\stable-diffusion-webui\models\Lora\Main
No module 'xformers'. Proceeding without it.
Civitai Helper: Get Custom Model Folder
Civitai Helper: Load setting from: T:\StableDiffusion\stable-diffusion-webui\extensions\Stable-Diffusion-Webui-Civitai-Helper\setting.json
Civitai Helper: No setting file, use default
2023-06-30 14:46:31,611 - ControlNet - INFO - ControlNet v1.1.227
ControlNet preprocessor location: T:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2023-06-30 14:46:31,723 - ControlNet - INFO - ControlNet v1.1.227
Loading weights [c249d7853b] from T:\StableDiffusion\stable-diffusion-webui\models\Stable-diffusion-alt\Main\dreamshaper_6BakedVae.safetensors
*Deforum ControlNet support: enabled*
Creating model from config: T:\StableDiffusion\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
Startup time: 8.0s (import torch: 1.9s, import gradio: 1.2s, import ldm: 0.5s, other imports: 0.9s, list SD models: 0.2s, load scripts: 2.0s, create ui: 0.8s, gradio launch: 0.3s).
DiffusionWrapper has 859.52 M params.
Loading VAE weights specified in settings: T:\StableDiffusion\stable-diffusion-webui\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors
Applying attention optimization: Doggettx... done.
Textual inversion embeddings loaded(5): BadDream, easynegative, FastNegativeEmbedding, negative_hand-neg, UnrealisticDream
preload_extensions_git_metadata for 34 extensions took 4.41s
Model loaded in 5.3s (load weights from disk: 0.7s, create model: 0.8s, apply weights to model: 0.7s, apply half(): 1.0s, load VAE: 0.5s, move model to device: 1.0s, calculate empty prompt: 0.4s).
2023-06-30 14:47:11,981 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:47:23,561 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:47:29,188 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:47:32,836 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:47:38,430 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:47:42,866 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:47:46,658 - ControlNet - INFO - Preview Resolution = 512
Downloading: "https://huggingface.co/lllyasviel/Annotators/resolve/main/ControlNetLama.pth" to T:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads\lama\ControlNetLama.pth
100%|███████████████████████████████████████████████████████████████████████████████| 195M/195M [00:03<00:00, 54.8MB/s]
2023-06-30 14:48:01,422 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:48:08,317 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:48:12,170 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:48:15,911 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:48:38,977 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:48:42,914 - ControlNet - INFO - Preview Resolution = 512
2023-06-30 14:48:42,959 - ControlNet - INFO - Loaded state_dict from [T:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads\pidinet\table5_pidinet.pth]
2023-06-30 14:48:46,574 - ControlNet - INFO - Preview Resolution = 512
ControlNet ClipVision location: T:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\clip_vision
Downloading: "https://huggingface.co/openai/clip-vit-large-patch14/resolve/main/pytorch_model.bin" to T:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\clip_vision\pytorch_model.bin
100%|█████████████████████████████████████████████████████████████████████████████| 1.59G/1.59G [00:30<00:00, 55.5MB/s]
8e143d35 Sun Jun 25 04:45:53 2023