Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -116,24 +116,25 @@ 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),
|
124 |
-
|
125 |
# unet=pipeX.unet,
|
|
|
126 |
# scheduler = EulerAncestralDiscreteScheduler.from_config(pipeX.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
|
127 |
#scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset =1)
|
128 |
)
|
129 |
#pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
|
130 |
#pipe.to('cuda')
|
131 |
-
pipe.vae=vae
|
132 |
#pipe.vae=pipeX.vae
|
133 |
# pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
134 |
#pipe.to(dtype=torch.bfloat16)
|
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(device)
|
139 |
pipe.to(torch.bfloat16)
|
|
|
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),
|
124 |
+
vae=vae,
|
125 |
# unet=pipeX.unet,
|
126 |
+
scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear",use_karras_sigmas=True, algorithm_type="dpmsolver++"),
|
127 |
# scheduler = EulerAncestralDiscreteScheduler.from_config(pipeX.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
|
128 |
#scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset =1)
|
129 |
)
|
130 |
#pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
|
131 |
#pipe.to('cuda')
|
132 |
+
#pipe.vae=vae
|
133 |
#pipe.vae=pipeX.vae
|
134 |
# pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
135 |
#pipe.to(dtype=torch.bfloat16)
|
136 |
#pipe.unet = pipeX.unet
|
137 |
+
#pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
|
138 |
#pipe.unet.to(torch.bfloat16)
|
139 |
pipe.to(device)
|
140 |
pipe.to(torch.bfloat16)
|