Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -108,7 +108,7 @@ def load_and_prepare_model(model_id):
|
|
108 |
model_dtypes = {"ford442/RealVisXL_V5.0_BF16": torch.bfloat16,}
|
109 |
dtype = model_dtypes.get(model_id, torch.bfloat16) # Default to float32 if not found
|
110 |
#vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", safety_checker=None)
|
111 |
-
vae = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae",safety_checker=None)
|
112 |
# 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)
|
113 |
# vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", safety_checker=None).to('cuda')
|
114 |
#sched = EulerAncestralDiscreteScheduler.from_config('ford442/Juggernaut-XI-v11-fp32', subfolder='scheduler',beta_schedule="scaled_linear",use_karras_sigmas=True)
|
@@ -116,9 +116,9 @@ def load_and_prepare_model(model_id):
|
|
116 |
#sched = EulerAncestralDiscreteScheduler()
|
117 |
#sched = EulerAncestralDiscreteScheduler.from_config('ford442/RealVisXL_V5.0_BF16', subfolder='scheduler',beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1,use_karras_sigmas=True)
|
118 |
# sched = EulerAncestralDiscreteScheduler.from_config('ford442/RealVisXL_V5.0_BF16', beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
|
119 |
-
pipeX = StableDiffusionXLPipeline.from_pretrained("SG161222/RealVisXL_V5.0").to(torch.bfloat16)
|
120 |
|
121 |
-
#pipeX = StableDiffusionXLPipeline.from_pretrained("ford442/Juggernaut-XI-v11-fp32",
|
122 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
123 |
'ford442/RealVisXL_V5.0_BF16',
|
124 |
# 'ford442/Juggernaut-XI-v11-fp32',
|
@@ -126,7 +126,7 @@ def load_and_prepare_model(model_id):
|
|
126 |
#torch_dtype=torch.bfloat16,
|
127 |
add_watermarker=False,
|
128 |
# custom_pipeline="lpw_stable_diffusion_xl",
|
129 |
-
|
130 |
# use_auth_token=HF_TOKEN,
|
131 |
# 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 |
# vae=AutoencoderKL.from_pretrained("stabilityai/sdxl-vae",repo_type='model',safety_checker=None, torch_dtype=torch.float32),
|
|
|
108 |
model_dtypes = {"ford442/RealVisXL_V5.0_BF16": torch.bfloat16,}
|
109 |
dtype = model_dtypes.get(model_id, torch.bfloat16) # Default to float32 if not found
|
110 |
#vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", safety_checker=None)
|
111 |
+
vae = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae",use_safetensors=True,safety_checker=None)
|
112 |
# 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)
|
113 |
# vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", safety_checker=None).to('cuda')
|
114 |
#sched = EulerAncestralDiscreteScheduler.from_config('ford442/Juggernaut-XI-v11-fp32', subfolder='scheduler',beta_schedule="scaled_linear",use_karras_sigmas=True)
|
|
|
116 |
#sched = EulerAncestralDiscreteScheduler()
|
117 |
#sched = EulerAncestralDiscreteScheduler.from_config('ford442/RealVisXL_V5.0_BF16', subfolder='scheduler',beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1,use_karras_sigmas=True)
|
118 |
# sched = EulerAncestralDiscreteScheduler.from_config('ford442/RealVisXL_V5.0_BF16', beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
|
119 |
+
pipeX = StableDiffusionXLPipeline.from_pretrained("SG161222/RealVisXL_V5.0",use_safetensors=True).to(torch.bfloat16)
|
120 |
|
121 |
+
#pipeX = StableDiffusionXLPipeline.from_pretrained("ford442/Juggernaut-XI-v11-fp32",use_safetensors=True)
|
122 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
123 |
'ford442/RealVisXL_V5.0_BF16',
|
124 |
# 'ford442/Juggernaut-XI-v11-fp32',
|
|
|
126 |
#torch_dtype=torch.bfloat16,
|
127 |
add_watermarker=False,
|
128 |
# custom_pipeline="lpw_stable_diffusion_xl",
|
129 |
+
use_safetensors=True,
|
130 |
# use_auth_token=HF_TOKEN,
|
131 |
# 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 |
# vae=AutoencoderKL.from_pretrained("stabilityai/sdxl-vae",repo_type='model',safety_checker=None, torch_dtype=torch.float32),
|