Jackflack09 commited on
Commit
1d1a760
·
1 Parent(s): ca79be5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -61,10 +61,12 @@ if is_colab:
61
  pipe = StableDiffusionPipeline.from_pretrained(
62
  current_model.path,
63
  torch_dtype=torch.float16,
64
- scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
65
- safety_checker=lambda images, clip_input: (images, False)
 
66
  )
67
 
 
68
  else:
69
  pipe = StableDiffusionPipeline.from_pretrained(
70
  model_id,
 
61
  pipe = StableDiffusionPipeline.from_pretrained(
62
  current_model.path,
63
  torch_dtype=torch.float16,
64
+ revision="fp16" if torch.cuda.is_available() else "fp32",
65
+ torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
66
+ scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler")
67
  )
68
 
69
+
70
  else:
71
  pipe = StableDiffusionPipeline.from_pretrained(
72
  model_id,