jiuface commited on
Commit
55b3c41
1 Parent(s): 2e320bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -35,16 +35,16 @@ if torch.cuda.is_available():
35
  controlnet_model_id,
36
  variant="fp16",
37
  use_safetensors=True,
38
- torch_dtype=torch.float32
39
  )
40
- vae = AutoencoderKL.from_pretrained(vae_model_id, torch_dtype=torch.float32)
41
  pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
42
  base_model_id,
43
  controlnet=controlnet,
44
  vae=vae,
45
  variant="fp16",
46
  use_safetensors=True,
47
- torch_dtype=torch.float32,
48
  )
49
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config)
50
  pipe.to(device)
 
35
  controlnet_model_id,
36
  variant="fp16",
37
  use_safetensors=True,
38
+ torch_dtype=torch.bfloat16
39
  )
40
+ vae = AutoencoderKL.from_pretrained(vae_model_id, torch_dtype=torch.bfloat16)
41
  pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
42
  base_model_id,
43
  controlnet=controlnet,
44
  vae=vae,
45
  variant="fp16",
46
  use_safetensors=True,
47
+ torch_dtype=torch.bfloat16,
48
  )
49
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config)
50
  pipe.to(device)