Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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.
|
| 39 |
)
|
| 40 |
-
vae = AutoencoderKL.from_pretrained(vae_model_id, torch_dtype=torch.
|
| 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.
|
| 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)
|