amazonaws-la commited on
Commit
739a3ba
1 Parent(s): 0d189fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,7 +14,7 @@ from PIL import Image
14
  from io import BytesIO
15
  from diffusers import StableDiffusionImg2ImgPipeline, AutoencoderKL, DiffusionPipeline
16
  from diffusers.utils import load_image
17
- from diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker
18
 
19
  DESCRIPTION = "# SDXL"
20
  if not torch.cuda.is_available():
@@ -65,7 +65,7 @@ def generate(
65
  if torch.cuda.is_available():
66
 
67
  if not use_vae:
68
- pipe = StableDiffusionImg2ImgPipeline.from_pretrained(model, torch_dtype=torch.float16, safety_checker=StableDiffusionSafetyChecker)
69
 
70
  if use_vae:
71
  vae = AutoencoderKL.from_pretrained(vaecall, torch_dtype=torch.float16)
 
14
  from io import BytesIO
15
  from diffusers import StableDiffusionImg2ImgPipeline, AutoencoderKL, DiffusionPipeline
16
  from diffusers.utils import load_image
17
+ from diffusers.pipelines.stable_diffusion import StableDiffusionSafetyChecker
18
 
19
  DESCRIPTION = "# SDXL"
20
  if not torch.cuda.is_available():
 
65
  if torch.cuda.is_available():
66
 
67
  if not use_vae:
68
+ pipe = StableDiffusionImg2ImgPipeline.from_pretrained(model, torch_dtype=torch.float16, safety_checker:StableDiffusionSafetyChecker)
69
 
70
  if use_vae:
71
  vae = AutoencoderKL.from_pretrained(vaecall, torch_dtype=torch.float16)