omer11a commited on
Commit
3342cb9
1 Parent(s): 154600e

Fixed error

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -42,7 +42,7 @@ def inference(
42
  device = torch.device("cuda")
43
  model_path = "stabilityai/stable-diffusion-xl-base-1.0"
44
  scheduler = DDIMScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear", clip_sample=False, set_alpha_to_one=False)
45
- model = StableDiffusionXLPipeline.from_pretrained(model_path, scheduler=scheduler, device=device, torch_dtype=torch.float16)
46
  model.unet.set_default_attn_processor()
47
  model.enable_sequential_cpu_offload()
48
 
 
42
  device = torch.device("cuda")
43
  model_path = "stabilityai/stable-diffusion-xl-base-1.0"
44
  scheduler = DDIMScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear", clip_sample=False, set_alpha_to_one=False)
45
+ model = StableDiffusionXLPipeline.from_pretrained(model_path, scheduler=scheduler, torch_dtype=torch.float16).to(device)
46
  model.unet.set_default_attn_processor()
47
  model.enable_sequential_cpu_offload()
48