amazonaws-la commited on
Commit
75bfe2a
·
verified ·
1 Parent(s): 654dc63

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -62,12 +62,14 @@ def generate(
62
 
63
  if not use_vae:
64
  pipe = DiffusionPipeline.from_pretrained(model, torch_dtype=torch.float16)
65
- pipe.scheduler = sampler.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(model, vae=vae, torch_dtype=torch.float16)
70
- pipe.scheduler = sampler.from_config(pipe.scheduler.config)
 
71
 
72
  if use_lora:
73
  pipe.load_lora_weights(lora)
 
62
 
63
  if not use_vae:
64
  pipe = DiffusionPipeline.from_pretrained(model, torch_dtype=torch.float16)
65
+ sampler_class = getattr(spaces, sampler)
66
+ pipe.scheduler = sampler_class.from_config(pipe.scheduler.config)
67
 
68
  if use_vae:
69
  vae = AutoencoderKL.from_pretrained(vaecall, torch_dtype=torch.float16)
70
  pipe = DiffusionPipeline.from_pretrained(model, vae=vae, torch_dtype=torch.float16)
71
+ sampler_class = getattr(spaces, sampler)
72
+ pipe.scheduler = sampler_class.from_config(pipe.scheduler.config)
73
 
74
  if use_lora:
75
  pipe.load_lora_weights(lora)