Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -110,7 +110,6 @@ def load_and_prepare_model(model_id):
|
|
110 |
#vae = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae",safety_checker=None)
|
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 |
-
sched = EulerAncestralDiscreteScheduler.from_config(model_id, beta_schedule="scaled_linear",use_karras_sigmas=True, algorithm_type="dpmsolver++"),
|
114 |
|
115 |
#pipeX = StableDiffusionXLPipeline.from_pretrained("SG161222/RealVisXL_V5.0",torch_dtype=torch.float32)
|
116 |
#pipeX = StableDiffusionXLPipeline.from_pretrained("ford442/Juggernaut-XI-v11-fp32",torch_dtype=torch.float32)
|
@@ -124,12 +123,13 @@ def load_and_prepare_model(model_id):
|
|
124 |
# vae=AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16",repo_type='model',safety_checker=None),
|
125 |
vae=vae,
|
126 |
# unet=pipeX.unet,
|
127 |
-
scheduler =sched,
|
128 |
# scheduler = EulerAncestralDiscreteScheduler.from_config(pipeX.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
|
129 |
#scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset =1)
|
130 |
)
|
|
|
131 |
#pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
|
132 |
#pipe.to('cuda')
|
|
|
133 |
#pipe.vae=vae
|
134 |
#pipe.vae=pipeX.vae
|
135 |
# pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
|
|
110 |
#vae = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae",safety_checker=None)
|
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)
|
|
|
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(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 |
+
sched = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear",use_karras_sigmas=True, algorithm_type="dpmsolver++"),
|
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.scheduler = sched
|
133 |
#pipe.vae=vae
|
134 |
#pipe.vae=pipeX.vae
|
135 |
# pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|