ford442 commited on
Commit
d372485
·
1 Parent(s): e83a9d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -101,13 +101,13 @@ def apply_style(style_name: str, positive: str, negative: str = "") -> Tuple[str
101
  if not negative:
102
  negative = ""
103
  return p.replace("{prompt}", positive), n + negative
104
-
105
  def load_and_prepare_model(model_id):
106
  model_dtypes = {"ford442/RealVisXL_V5.0_BF16": torch.bfloat16,}
107
  dtype = model_dtypes.get(model_id, torch.bfloat16) # Default to float32 if not found
108
  #vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", torch_dtype=torch.bfloat16,safety_checker=None).to('cuda')
109
- # vae = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", torch_dtype=torch.float32,safety_checker=None).to(torch.bfloat16)
110
- vae = AutoencoderKL.from_pretrained("BeastHF/MyBack_SDXL_Juggernaut_XL_VAE", torch_dtype=torch.float32,safety_checker=None).to(torch.bfloat16)
111
  # vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", safety_checker=None).to('cuda')
112
  pipe = StableDiffusionXLPipeline.from_pretrained(
113
  model_id,
 
101
  if not negative:
102
  negative = ""
103
  return p.replace("{prompt}", positive), n + negative
104
+ https://huggingface.co/BeastHF/MyBack_SDXL_Juggernaut_XL_VAE/blob/main/
105
  def load_and_prepare_model(model_id):
106
  model_dtypes = {"ford442/RealVisXL_V5.0_BF16": torch.bfloat16,}
107
  dtype = model_dtypes.get(model_id, torch.bfloat16) # Default to float32 if not found
108
  #vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", torch_dtype=torch.bfloat16,safety_checker=None).to('cuda')
109
+ vae = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", torch_dtype=torch.float32,safety_checker=None).to(torch.bfloat16)
110
+ # vae = AutoencoderKL.from_pretrained("BeastHF/MyBack_SDXL_Juggernaut_XL_VAE/MyBack_SDXL_Juggernaut_XL_VAE_V10(version_X).safetensors", torch_dtype=torch.float32,safety_checker=None).to(torch.bfloat16)
111
  # vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", safety_checker=None).to('cuda')
112
  pipe = StableDiffusionXLPipeline.from_pretrained(
113
  model_id,