tawsif18 commited on
Commit
d506c75
·
1 Parent(s): 9fd0f88

changed scheduler

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,13 +8,13 @@ from diffusers import StableDiffusionPipeline
8
  #function to call API here
9
  def show_image(prompt):
10
  num_images = 2
11
- scheduler = PNDMScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear", skip_prk_steps=True)
12
  model_id = "runwayml/stable-diffusion-v1-5"
13
 
14
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
15
  remove_safety = False
16
 
17
- pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.float16, revision="fp16", use_auth_token=True)
18
  if remove_safety:
19
  pipe.safety_checker = lambda images, clip_input: (images, False)
20
 
 
8
  #function to call API here
9
  def show_image(prompt):
10
  num_images = 2
11
+ scheduler = PNDMScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear", skip_prk_steps=True, steps_offset=1)
12
  model_id = "runwayml/stable-diffusion-v1-5"
13
 
14
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
15
  remove_safety = False
16
 
17
+ pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, revision="fp16", use_auth_token=True)
18
  if remove_safety:
19
  pipe.safety_checker = lambda images, clip_input: (images, False)
20