Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -81,14 +81,14 @@ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
|
81 |
|
82 |
def load_and_prepare_model():
|
83 |
#vaeXL = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", safety_checker=None, use_safetensors=False).to(device=device, dtype=torch.bfloat16)
|
84 |
-
vaeRV = AutoencoderKL.from_pretrained("SG161222/RealVisXL_V5.0", subfolder='vae', safety_checker=None, use_safetensors=False).to(device).to(torch.bfloat16) #.to(device=device, dtype=torch.bfloat16)
|
85 |
sched = EulerAncestralDiscreteScheduler.from_pretrained('ford442/RealVisXL_V5.0_BF16', subfolder='scheduler',beta_schedule="scaled_linear")
|
86 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
87 |
'ford442/RealVisXL_V5.0_BF16',
|
88 |
#torch_dtype=torch.bfloat16,
|
89 |
add_watermarker=False,
|
90 |
)
|
91 |
-
pipe.vae = vaeRV #.to(torch.bfloat16)
|
92 |
pipe.scheduler = sched
|
93 |
pipe.vae.do_resize=False
|
94 |
pipe.vae.vae_scale_factor=8
|
|
|
81 |
|
82 |
def load_and_prepare_model():
|
83 |
#vaeXL = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", safety_checker=None, use_safetensors=False).to(device=device, dtype=torch.bfloat16)
|
84 |
+
#vaeRV = AutoencoderKL.from_pretrained("SG161222/RealVisXL_V5.0", subfolder='vae', safety_checker=None, use_safetensors=False).to(device).to(torch.bfloat16) #.to(device=device, dtype=torch.bfloat16)
|
85 |
sched = EulerAncestralDiscreteScheduler.from_pretrained('ford442/RealVisXL_V5.0_BF16', subfolder='scheduler',beta_schedule="scaled_linear")
|
86 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
87 |
'ford442/RealVisXL_V5.0_BF16',
|
88 |
#torch_dtype=torch.bfloat16,
|
89 |
add_watermarker=False,
|
90 |
)
|
91 |
+
#pipe.vae = vaeRV #.to(torch.bfloat16)
|
92 |
pipe.scheduler = sched
|
93 |
pipe.vae.do_resize=False
|
94 |
pipe.vae.vae_scale_factor=8
|