CiaraRowles commited on
Commit
337f738
1 Parent(s): bbd908b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -14,10 +14,9 @@ vae_model_path = "stabilityai/sd-vae-ft-mse"
14
  image_encoder_path = "laion/CLIP-ViT-H-14-laion2B-s32B-b79K"
15
  ip_ckpt = hf_hub_download(repo_id="CiaraRowles/IP-Adapter-Instruct", filename="ip-adapter-instruct-sd15.bin", repo_type="model")
16
 
17
- #safety_model_id = "CompVis/stable-diffusion-safety-checker"
18
- #safety_feature_extractor = AutoFeatureExtractor.from_pretrained(safety_model_id)
19
- #safety_checker = StableDiffusionSafetyChecker.from_pretrained(safety_model_id)
20
- #the model should auto set this
21
 
22
  device = "cuda"
23
 
@@ -36,7 +35,8 @@ pipe = StableDiffusionPipelineCFG.from_pretrained(
36
  scheduler=noise_scheduler,
37
  vae=vae,
38
  torch_dtype=torch.float16,
39
- # feature_extractor=safety_feature_extractor,
 
40
  ).to(device)
41
 
42
  #pipe.load_lora_weights("h94/IP-Adapter-FaceID", weight_name="ip-adapter-faceid-plusv2_sd15_lora.safetensors")
 
14
  image_encoder_path = "laion/CLIP-ViT-H-14-laion2B-s32B-b79K"
15
  ip_ckpt = hf_hub_download(repo_id="CiaraRowles/IP-Adapter-Instruct", filename="ip-adapter-instruct-sd15.bin", repo_type="model")
16
 
17
+ safety_model_id = "CompVis/stable-diffusion-safety-checker"
18
+ safety_feature_extractor = AutoFeatureExtractor.from_pretrained(safety_model_id)
19
+ safety_checker = StableDiffusionSafetyChecker.from_pretrained(safety_model_id)
 
20
 
21
  device = "cuda"
22
 
 
35
  scheduler=noise_scheduler,
36
  vae=vae,
37
  torch_dtype=torch.float16,
38
+ feature_extractor=safety_feature_extractor,
39
+ safety_checker=safety_checker
40
  ).to(device)
41
 
42
  #pipe.load_lora_weights("h94/IP-Adapter-FaceID", weight_name="ip-adapter-faceid-plusv2_sd15_lora.safetensors")