Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -130,18 +130,18 @@ def load_and_prepare_model():
|
|
130 |
vaeXL = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", safety_checker=None, use_safetensors=False).to(torch.bfloat16) #.to(device=device, dtype=torch.bfloat16)
|
131 |
#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)
|
132 |
#sched = EulerAncestralDiscreteScheduler.from_pretrained('ford442/RealVisXL_V5.0_BF16', subfolder='scheduler',beta_schedule="scaled_linear")
|
133 |
-
|
134 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
135 |
'ford442/RealVisXL_V5.0_BF16',
|
136 |
#torch_dtype=torch.bfloat16,
|
137 |
add_watermarker=False,
|
138 |
# low_cpu_mem_usage = False,
|
139 |
token = HF_TOKEN,
|
140 |
-
|
141 |
)
|
142 |
-
sched = EulerAncestralDiscreteScheduler.from_pretrained('ford442/RealVisXL_V5.0_BF16', subfolder='scheduler',beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1) #,use_karras_sigmas=True)
|
143 |
pipe.vae = vaeXL #.to(torch.bfloat16)
|
144 |
-
pipe.scheduler = sched
|
145 |
#pipe.vae.do_resize=False
|
146 |
#pipe.vae.vae_scale_factor=8
|
147 |
pipe.vae.set_default_attn_processor()
|
|
|
130 |
vaeXL = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", safety_checker=None, use_safetensors=False).to(torch.bfloat16) #.to(device=device, dtype=torch.bfloat16)
|
131 |
#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)
|
132 |
#sched = EulerAncestralDiscreteScheduler.from_pretrained('ford442/RealVisXL_V5.0_BF16', subfolder='scheduler',beta_schedule="scaled_linear")
|
133 |
+
sched = EulerAncestralDiscreteScheduler.from_pretrained('ford442/RealVisXL_V5.0_BF16', subfolder='scheduler')
|
134 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
135 |
'ford442/RealVisXL_V5.0_BF16',
|
136 |
#torch_dtype=torch.bfloat16,
|
137 |
add_watermarker=False,
|
138 |
# low_cpu_mem_usage = False,
|
139 |
token = HF_TOKEN,
|
140 |
+
scheduler = sched,
|
141 |
)
|
142 |
+
#sched = EulerAncestralDiscreteScheduler.from_pretrained('ford442/RealVisXL_V5.0_BF16', subfolder='scheduler',beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1) #,use_karras_sigmas=True)
|
143 |
pipe.vae = vaeXL #.to(torch.bfloat16)
|
144 |
+
#pipe.scheduler = sched
|
145 |
#pipe.vae.do_resize=False
|
146 |
#pipe.vae.vae_scale_factor=8
|
147 |
pipe.vae.set_default_attn_processor()
|