Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -111,7 +111,7 @@ def load_and_prepare_model(model_id):
|
|
111 |
# vae = AutoencoderKL.from_pretrained("BeastHF/MyBack_SDXL_Juggernaut_XL_VAE/MyBack_SDXL_Juggernaut_XL_VAE_V10(version_X).safetensors",safety_checker=None).to(torch.bfloat16)
|
112 |
# vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", safety_checker=None).to('cuda')
|
113 |
|
114 |
-
pipeX = StableDiffusionXLPipeline.from_pretrained("SG161222/RealVisXL_V5.0",torch_dtype=torch.float32)
|
115 |
#pipeX = StableDiffusionXLPipeline.from_pretrained("ford442/Juggernaut-XI-v11-fp32",torch_dtype=torch.float32)
|
116 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
117 |
model_id,
|
@@ -136,10 +136,10 @@ def load_and_prepare_model(model_id):
|
|
136 |
pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
|
137 |
#pipe.unet.to(torch.bfloat16)
|
138 |
pipe.to(device)
|
139 |
-
pipe.vae.to(torch.bfloat16)
|
140 |
#pipe.to(torch.bfloat16)
|
141 |
#pipe.to(device, torch.bfloat16)
|
142 |
-
del pipeX
|
143 |
#sched = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", algorithm_type="dpmsolver++")
|
144 |
#sched = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, beta_schedule="linear", algorithm_type="dpmsolver++")
|
145 |
#sched = DDIMScheduler.from_config(pipe.scheduler.config)
|
|
|
111 |
# vae = AutoencoderKL.from_pretrained("BeastHF/MyBack_SDXL_Juggernaut_XL_VAE/MyBack_SDXL_Juggernaut_XL_VAE_V10(version_X).safetensors",safety_checker=None).to(torch.bfloat16)
|
112 |
# vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", safety_checker=None).to('cuda')
|
113 |
|
114 |
+
#pipeX = StableDiffusionXLPipeline.from_pretrained("SG161222/RealVisXL_V5.0",torch_dtype=torch.float32)
|
115 |
#pipeX = StableDiffusionXLPipeline.from_pretrained("ford442/Juggernaut-XI-v11-fp32",torch_dtype=torch.float32)
|
116 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
117 |
model_id,
|
|
|
136 |
pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
|
137 |
#pipe.unet.to(torch.bfloat16)
|
138 |
pipe.to(device)
|
139 |
+
#pipe.vae.to(torch.bfloat16)
|
140 |
#pipe.to(torch.bfloat16)
|
141 |
#pipe.to(device, torch.bfloat16)
|
142 |
+
#del pipeX
|
143 |
#sched = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", algorithm_type="dpmsolver++")
|
144 |
#sched = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, beta_schedule="linear", algorithm_type="dpmsolver++")
|
145 |
#sched = DDIMScheduler.from_config(pipe.scheduler.config)
|