Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -113,7 +113,7 @@ def load_and_prepare_model(model_id):
|
|
113 |
pipeX = StableDiffusionXLPipeline.from_pretrained("SG161222/RealVisXL_V5.0",use_safetensors=True)
|
114 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
115 |
model_id,
|
116 |
-
|
117 |
# add_watermarker=False,
|
118 |
use_safetensors=True,
|
119 |
# 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),
|
@@ -132,9 +132,9 @@ def load_and_prepare_model(model_id):
|
|
132 |
pipe.unet = pipeX.unet
|
133 |
pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
|
134 |
pipe.to(device)
|
135 |
-
pipe.unet.to(torch.bfloat16)
|
136 |
-
pipe.vae.to(torch.bfloat16)
|
137 |
-
|
138 |
#pipe.to(device, torch.bfloat16)
|
139 |
del pipeX
|
140 |
#sched = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", algorithm_type="dpmsolver++")
|
@@ -458,14 +458,14 @@ with gr.Blocks(theme=gr.themes.Origin(),css=css) as demo:
|
|
458 |
minimum=448,
|
459 |
maximum=MAX_IMAGE_SIZE,
|
460 |
step=64,
|
461 |
-
value=
|
462 |
)
|
463 |
height = gr.Slider(
|
464 |
label="Height",
|
465 |
minimum=448,
|
466 |
maximum=MAX_IMAGE_SIZE,
|
467 |
step=64,
|
468 |
-
value=
|
469 |
)
|
470 |
with gr.Row():
|
471 |
guidance_scale = gr.Slider(
|
@@ -480,7 +480,7 @@ with gr.Blocks(theme=gr.themes.Origin(),css=css) as demo:
|
|
480 |
minimum=10,
|
481 |
maximum=1000,
|
482 |
step=10,
|
483 |
-
value=
|
484 |
)
|
485 |
|
486 |
gr.Examples(
|
|
|
113 |
pipeX = StableDiffusionXLPipeline.from_pretrained("SG161222/RealVisXL_V5.0",use_safetensors=True)
|
114 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
115 |
model_id,
|
116 |
+
# torch_dtype=torch.bfloat16,
|
117 |
# add_watermarker=False,
|
118 |
use_safetensors=True,
|
119 |
# 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),
|
|
|
132 |
pipe.unet = pipeX.unet
|
133 |
pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
|
134 |
pipe.to(device)
|
135 |
+
#pipe.unet.to(torch.bfloat16)
|
136 |
+
#pipe.vae.to(torch.bfloat16)
|
137 |
+
pipe.to(torch.bfloat16)
|
138 |
#pipe.to(device, torch.bfloat16)
|
139 |
del pipeX
|
140 |
#sched = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", algorithm_type="dpmsolver++")
|
|
|
458 |
minimum=448,
|
459 |
maximum=MAX_IMAGE_SIZE,
|
460 |
step=64,
|
461 |
+
value=1024,
|
462 |
)
|
463 |
height = gr.Slider(
|
464 |
label="Height",
|
465 |
minimum=448,
|
466 |
maximum=MAX_IMAGE_SIZE,
|
467 |
step=64,
|
468 |
+
value=1024,
|
469 |
)
|
470 |
with gr.Row():
|
471 |
guidance_scale = gr.Slider(
|
|
|
480 |
minimum=10,
|
481 |
maximum=1000,
|
482 |
step=10,
|
483 |
+
value=140,
|
484 |
)
|
485 |
|
486 |
gr.Examples(
|