None1145 commited on
Commit
62e2d80
1 Parent(s): 115b9e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -19,8 +19,9 @@ def reload_model(new_model_id):
19
  try:
20
  print(f"{model_id}...")
21
  pipe = OVStableDiffusionXLPipeline.from_pretrained(model_id, compile=False)
22
- scheduler_args = {"prediction_type": "v_prediction", "rescale_betas_zero_snr": True}
23
- pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, **scheduler_args)
 
24
  # pipe.to("gpu")
25
  pipe.reshape(batch_size=1, height=prev_height, width=prev_width, num_images_per_prompt=1)
26
  pipe.compile()
 
19
  try:
20
  print(f"{model_id}...")
21
  pipe = OVStableDiffusionXLPipeline.from_pretrained(model_id, compile=False)
22
+ if model_id == "None1145/noobai-XL-Vpred-0.65s-openvino" or "Vpred" in model_id or "vpred" in model_id or "v-pred" in model_id:
23
+ scheduler_args = {"prediction_type": "v_prediction", "rescale_betas_zero_snr": True}
24
+ pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, **scheduler_args)
25
  # pipe.to("gpu")
26
  pipe.reshape(batch_size=1, height=prev_height, width=prev_width, num_images_per_prompt=1)
27
  pipe.compile()