ford442 commited on
Commit
e51e7aa
·
1 Parent(s): e428fc5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -109,7 +109,7 @@ def load_and_prepare_model(model_id):
109
  # vae = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", torch_dtype=torch.float32,safety_checker=None)
110
  # 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)
111
  # vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", safety_checker=None).to('cuda')
112
- pipeX = StableDiffusionXLPipeline.from_pretrained("SG161222/RealVisXL_V5.0")
113
  pipe = StableDiffusionXLPipeline.from_pretrained(
114
  model_id,
115
  torch_dtype=torch.bfloat16,
@@ -123,7 +123,7 @@ def load_and_prepare_model(model_id):
123
  #pipe.to('cuda')
124
  # pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
125
 
126
- pipe.unet = pipeX.unet.to(dtype=torch.bfloat16)
127
  pipe.to(device)
128
  #pipe.to(dtype=torch.bfloat16)
129
 
 
109
  # vae = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", torch_dtype=torch.float32,safety_checker=None)
110
  # 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)
111
  # vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", safety_checker=None).to('cuda')
112
+ pipeX = StableDiffusionXLPipeline.from_pretrained("SG161222/RealVisXL_V5.0").to(torch.bfloat16)
113
  pipe = StableDiffusionXLPipeline.from_pretrained(
114
  model_id,
115
  torch_dtype=torch.bfloat16,
 
123
  #pipe.to('cuda')
124
  # pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
125
 
126
+ pipe.unet = pipeX.unet
127
  pipe.to(device)
128
  #pipe.to(dtype=torch.bfloat16)
129