-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathconfig_safety_checker.json
More file actions
55 lines (55 loc) · 2.11 KB
/
Copy pathconfig_safety_checker.json
File metadata and controls
55 lines (55 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
"input_model": {
"type": "PyTorchModel",
"model_path": "sd-legacy/stable-diffusion-v1-5",
"model_loader": "safety_checker_load",
"script_dir": ".",
"model_script": "user_script.py",
"io_config": {
"input_names": [ "clip_input", "images" ],
"output_names": [ "out_images", "has_nsfw_concepts" ],
"dynamic_axes": {
"clip_input": { "0": "batch", "1": "channels", "2": "height", "3": "width" },
"images": { "0": "batch", "1": "height", "2": "width", "3": "channels" }
}
},
"dummy_inputs_func": "safety_checker_conversion_inputs"
},
"passes": {
"convert": { "type": "OnnxConversion", "target_opset": 14 },
"optimize": {
"type": "OrtTransformersOptimization",
"model_type": "unet",
"opt_level": 0,
"float16": true,
"use_gpu": true,
"keep_io_types": false,
"optimization_options": {
"enable_gelu": true,
"enable_layer_norm": true,
"enable_attention": true,
"use_multi_head_attention": true,
"enable_skip_layer_norm": false,
"enable_embed_layer_norm": true,
"enable_bias_skip_layer_norm": false,
"enable_bias_gelu": true,
"enable_gelu_approximation": false,
"enable_qordered_matmul": false,
"enable_shape_inference": true,
"enable_gemm_fast_gelu": false,
"enable_nhwc_conv": false,
"enable_group_norm": true,
"enable_bias_splitgelu": false,
"enable_packed_qkv": true,
"enable_packed_kv": true,
"enable_bias_add": false,
"group_norm_channels_last": false
},
"force_fp32_ops": [ "RandomNormalLike" ],
"force_fp16_inputs": { "GroupNorm": [ 0, 1, 2 ] }
}
},
"log_severity_level": 0,
"cache_dir": "vai_cache",
"output_dir": "footprints/safety_checker"
}