visualizingjp commited on
Commit
802f3de
·
verified ·
1 Parent(s): 8412e34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -39,11 +39,16 @@ controlnet = ControlNetModel.from_pretrained("monster-labs/control_v1p_sd15_qrco
39
 
40
  # Initialize the safety checker conditionally
41
  SAFETY_CHECKER_ENABLED = os.environ.get("SAFETY_CHECKER", "0") == "1"
 
 
 
 
 
 
 
 
42
  safety_checker = None
43
  feature_extractor = None
44
- if SAFETY_CHECKER_ENABLED:
45
- safety_checker = StableDiffusionSafetyChecker.from_pretrained("CompVis/stable-diffusion-safety-checker").to("cuda")
46
- feature_extractor = CLIPImageProcessor.from_pretrained("openai/clip-vit-base-patch32")
47
 
48
  main_pipe = StableDiffusionControlNetPipeline.from_pretrained(
49
  BASE_MODEL,
 
39
 
40
  # Initialize the safety checker conditionally
41
  SAFETY_CHECKER_ENABLED = os.environ.get("SAFETY_CHECKER", "0") == "1"
42
+ # safety_checker = None
43
+ # feature_extractor = None
44
+ # if SAFETY_CHECKER_ENABLED:
45
+ # safety_checker = StableDiffusionSafetyChecker.from_pretrained("CompVis/stable-diffusion-safety-checker").to("cuda")
46
+ # feature_extractor = CLIPImageProcessor.from_pretrained("openai/clip-vit-base-patch32")
47
+
48
+ # Initialize the safety checker conditionally
49
+ SAFETY_CHECKER_ENABLED = False # 強制的に無効化
50
  safety_checker = None
51
  feature_extractor = None
 
 
 
52
 
53
  main_pipe = StableDiffusionControlNetPipeline.from_pretrained(
54
  BASE_MODEL,