Manjushri commited on
Commit
320a448
1 Parent(s): 776a2a0

Update app.py

Browse files

Removing safety checker

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -6,7 +6,7 @@ from datasets import load_dataset
6
  from diffusers import StableDiffusionImg2ImgPipeline
7
 
8
  device = "cuda" if torch.cuda.is_available() else "cpu"
9
- pipe = StableDiffusionImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-2-1", torch_dtype=torch.float16, revision="fp16") if torch.cuda.is_available() else StableDiffusionImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-2-1")
10
  pipe = pipe.to(device)
11
 
12
  def resize(value,img):
 
6
  from diffusers import StableDiffusionImg2ImgPipeline
7
 
8
  device = "cuda" if torch.cuda.is_available() else "cpu"
9
+ pipe = StableDiffusionImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-2-1", torch_dtype=torch.float16, revision="fp16", safety_checker=None) if torch.cuda.is_available() else StableDiffusionImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-2-1", safety_checker=None)
10
  pipe = pipe.to(device)
11
 
12
  def resize(value,img):