Thafx commited on
Commit
9178799
·
1 Parent(s): 76be3b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -11,7 +11,8 @@ scheduler = DPMSolverMultistepScheduler.from_pretrained(model_id, subfolder="sch
11
  pipe = StableDiffusionPipeline.from_pretrained(
12
  model_id,
13
  torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
14
- scheduler=scheduler)
 
15
 
16
  pipe_i2i = StableDiffusionImg2ImgPipeline.from_pretrained(
17
  model_id,
@@ -63,7 +64,7 @@ def inference(prompt, guidance, steps, width=512, height=512, seed=0, img=None,
63
  except Exception as e:
64
  return None, error_str(e)
65
 
66
- pipe.safety_checker = lambda images, clip_input: (images, False)
67
 
68
  def txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator):
69
 
 
11
  pipe = StableDiffusionPipeline.from_pretrained(
12
  model_id,
13
  torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
14
+ scheduler=scheduler,
15
+ pipe.safety_checker=lambda images, clip_input: (images, False))
16
 
17
  pipe_i2i = StableDiffusionImg2ImgPipeline.from_pretrained(
18
  model_id,
 
64
  except Exception as e:
65
  return None, error_str(e)
66
 
67
+
68
 
69
  def txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator):
70