DGSpitzer commited on
Commit
7ecebeb
1 Parent(s): 5c454e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -133,17 +133,18 @@ def txt_to_img(model_path, prompt, neg_prompt, guidance, steps, width, height, n
133
  safety_checker=lambda images, clip_input: (images, False)
134
  )
135
  else:
 
136
  pipe = StableDiffusionPipeline.from_pretrained(
137
  current_model_path,
138
  torch_dtype=torch.float16,
139
- scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler")
140
  )
141
  # pipe = pipe.to("cpu")
142
  # pipe = current_model.pipe_t2i
143
 
144
  if torch.cuda.is_available():
145
  pipe = pipe.to("cuda")
146
- pipe.enable_xformers_memory_efficient_attention()
147
  last_mode = "txt2img"
148
 
149
  prompt = current_model.prefix + prompt
 
133
  safety_checker=lambda images, clip_input: (images, False)
134
  )
135
  else:
136
+ eulera = EulerAncestralDiscreteScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear", num_train_timesteps=1000)
137
  pipe = StableDiffusionPipeline.from_pretrained(
138
  current_model_path,
139
  torch_dtype=torch.float16,
140
+ scheduler=eulera
141
  )
142
  # pipe = pipe.to("cpu")
143
  # pipe = current_model.pipe_t2i
144
 
145
  if torch.cuda.is_available():
146
  pipe = pipe.to("cuda")
147
+ # pipe.enable_xformers_memory_efficient_attention()
148
  last_mode = "txt2img"
149
 
150
  prompt = current_model.prefix + prompt