amazonaws-la commited on
Commit
007b00d
·
verified ·
1 Parent(s): 520d010

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -61,13 +61,13 @@ def generate(
61
  if torch.cuda.is_available():
62
 
63
  if not use_vae:
64
- scheduler = DPMSolverMultistepScheduler.from_pretrained(dropdown_model, subfolder="scheduler")
65
- pipe = DiffusionPipeline.from_pretrained(dropdown_model, scheduler=scheduler, torch_dtype=torch.float16)
66
 
67
  if use_vae:
68
- scheduler = DPMSolverMultistepScheduler.from_pretrained(dropdown_model, subfolder="scheduler")
69
- vae = AutoencoderKL.from_pretrained(vaecall, torch_dtype=torch.float16, variant="fp16")
70
- pipe = DiffusionPipeline.from_pretrained(dropdown_model, vae=vae, scheduler=scheduler, torch_dtype=torch.float16)
71
 
72
  if use_lora:
73
  pipe.load_lora_weights(lora)
 
61
  if torch.cuda.is_available():
62
 
63
  if not use_vae:
64
+ pipe = DiffusionPipeline.from_pretrained(dropdown_model, torch_dtype=torch.float16)
65
+ pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
66
 
67
  if use_vae:
68
+ vae = AutoencoderKL.from_pretrained(vaecall, torch_dtype=torch.float16)
69
+ pipe = DiffusionPipeline.from_pretrained(dropdown_model, vae=vae, torch_dtype=torch.float16)
70
+ pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
71
 
72
  if use_lora:
73
  pipe.load_lora_weights(lora)