hsuwill000 commited on
Commit
6904e5b
1 Parent(s): bbecbd7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -8,11 +8,16 @@ from huggingface_hub import snapshot_download
8
  import openvino.runtime as ov
9
  from typing import Optional, Dict
10
 
 
 
 
 
 
11
  model_id = "hsuwill000/anything-v5-openvino"
12
 
13
  #1024*512 記憶體不足
14
- HIGH=1024
15
- WIDTH=1024
16
 
17
  batch_size = -1
18
 
 
8
  import openvino.runtime as ov
9
  from typing import Optional, Dict
10
 
11
+ from optimum.intel.openvino.modeling_diffusion import safety_checker
12
+
13
+ def sc(self, clip_input, images) : return images, [False for i in images]
14
+ safety_checker.StableDiffusionSafetyChecker.forward = sc
15
+
16
  model_id = "hsuwill000/anything-v5-openvino"
17
 
18
  #1024*512 記憶體不足
19
+ HIGH=512
20
+ WIDTH=512
21
 
22
  batch_size = -1
23