amazonaws-la commited on
Commit
10a0a96
1 Parent(s): efae2b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -50,12 +50,13 @@ def generate(
50
  num_inference_steps_refiner: int = 25,
51
  use_lora: bool = False,
52
  apply_refiner: bool = False,
53
- model = 'stabilityai/stable-diffusion-xl-base-1.0',
54
- vaecall = 'madebyollin/sdxl-vae-fp16-fix',
55
  lora = 'amazonaws-la/juliette',
56
  ) -> PIL.Image.Image:
57
  if torch.cuda.is_available():
58
- pipe = DiffusionPipeline.from_pretrained(model, torch_dtype=torch.float16)
 
59
  pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
60
 
61
  if use_lora:
 
50
  num_inference_steps_refiner: int = 25,
51
  use_lora: bool = False,
52
  apply_refiner: bool = False,
53
+ model = 'SG161222/Realistic_Vision_V6.0_B1_noVAE',
54
+ vaecall = 'stabilityai/sd-vae-ft-mse',
55
  lora = 'amazonaws-la/juliette',
56
  ) -> PIL.Image.Image:
57
  if torch.cuda.is_available():
58
+ vae = AutoencoderKL.from_pretrained(vaecall, torch_dtype=torch.float16)
59
+ pipe = DiffusionPipeline.from_pretrained(model, vae=vae, torch_dtype=torch.float16)
60
  pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
61
 
62
  if use_lora: