Update app.py
Browse files
app.py
CHANGED
|
@@ -116,8 +116,8 @@ def load_and_prepare_model(model_id):
|
|
| 116 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
| 117 |
model_id,
|
| 118 |
#torch_dtype=torch.bfloat16,
|
| 119 |
-
|
| 120 |
-
|
| 121 |
# vae=AutoencoderKL.from_pretrained("BeastHF/MyBack_SDXL_Juggernaut_XL_VAE/MyBack_SDXL_Juggernaut_XL_VAE_V10(version_X).safetensors",repo_type='model',safety_checker=None),
|
| 122 |
# vae=AutoencoderKL.from_pretrained("stabilityai/sdxl-vae",repo_type='model',safety_checker=None, torch_dtype=torch.float32),
|
| 123 |
# vae=AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16",repo_type='model',safety_checker=None),
|
|
@@ -135,12 +135,11 @@ def load_and_prepare_model(model_id):
|
|
| 135 |
#pipe.unet = pipeX.unet
|
| 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 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
#pipe.to(torch.device("cuda:0"))
|
| 142 |
#pipe.vae.to(torch.bfloat16)
|
| 143 |
-
pipe.to(device, torch.bfloat16)
|
| 144 |
#del pipeX
|
| 145 |
#sched = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", algorithm_type="dpmsolver++")
|
| 146 |
#sched = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, beta_schedule="linear", algorithm_type="dpmsolver++")
|
|
|
|
| 116 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
| 117 |
model_id,
|
| 118 |
#torch_dtype=torch.bfloat16,
|
| 119 |
+
# add_watermarker=False,
|
| 120 |
+
# use_safetensors=True,
|
| 121 |
# vae=AutoencoderKL.from_pretrained("BeastHF/MyBack_SDXL_Juggernaut_XL_VAE/MyBack_SDXL_Juggernaut_XL_VAE_V10(version_X).safetensors",repo_type='model',safety_checker=None),
|
| 122 |
# vae=AutoencoderKL.from_pretrained("stabilityai/sdxl-vae",repo_type='model',safety_checker=None, torch_dtype=torch.float32),
|
| 123 |
# vae=AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16",repo_type='model',safety_checker=None),
|
|
|
|
| 135 |
#pipe.unet = pipeX.unet
|
| 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(torch.bfloat16)
|
| 139 |
+
pipe.to(device)
|
|
|
|
| 140 |
#pipe.to(torch.device("cuda:0"))
|
| 141 |
#pipe.vae.to(torch.bfloat16)
|
| 142 |
+
#pipe.to(device, torch.bfloat16)
|
| 143 |
#del pipeX
|
| 144 |
#sched = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", algorithm_type="dpmsolver++")
|
| 145 |
#sched = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, beta_schedule="linear", algorithm_type="dpmsolver++")
|