ford442 commited on
Commit
24195dd
·
verified ·
1 Parent(s): d16215f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -105,7 +105,7 @@ def load_and_prepare_model(model_id):
105
  #sched = EulerAncestralDiscreteScheduler.from_pretrained('SG161222/RealVisXL_V5.0', subfolder='scheduler',beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1,use_karras_sigmas=True)
106
  sched = EulerAncestralDiscreteScheduler.from_pretrained('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) #pipeX = StableDiffusionXLPipeline.from_pretrained("SG161222/RealVisXL_V5.0").to(torch.bfloat16)
107
  #pipeX = StableDiffusionXLPipeline.from_pretrained("ford442/Juggernaut-XI-v11-fp32",use_safetensors=True)
108
-
109
  pipe = StableDiffusionXLPipeline.from_pretrained(
110
  #'ford442/RealVisXL_V5.0_BF16',
111
  'John6666/pornworks-sexy-beauty-v04-sdxl',
@@ -125,6 +125,7 @@ def load_and_prepare_model(model_id):
125
  # scheduler = EulerAncestralDiscreteScheduler.from_config(pipeX.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
126
  #scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset =1)
127
  )
 
128
  #pipe.unet=UNet2DConditionModel.from_pretrained('ford442/RealVisXL_V5.0_FP64',subfolder='unet').to(torch.bfloat16)
129
  #pipe.unet=UNet2DConditionModel.from_pretrained('SG161222/RealVisXL_V5.0',subfolder='unet').to(torch.bfloat16)
130
  #pipe.vae = AsymmetricAutoencoderKL.from_pretrained('cross-attention/asymmetric-autoencoder-kl-x-2').to(torch.bfloat16) # ,use_safetensors=True FAILS
@@ -133,7 +134,7 @@ def load_and_prepare_model(model_id):
133
  #sched = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear",use_karras_sigmas=True, algorithm_type="dpmsolver++")
134
  #pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
135
  #pipe.scheduler = DPMSolverMultistepScheduler.from_pretrained('SG161222/RealVisXL_V5.0', subfolder='scheduler', algorithm_type='sde-dpmsolver++')
136
- pipe.vae = vaeX #.to(torch.bfloat16)
137
  #pipe.unet = unetX.to(torch.bfloat16)
138
  pipe.scheduler = sched
139
  pipe.vae.do_resize=False
 
105
  #sched = EulerAncestralDiscreteScheduler.from_pretrained('SG161222/RealVisXL_V5.0', subfolder='scheduler',beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1,use_karras_sigmas=True)
106
  sched = EulerAncestralDiscreteScheduler.from_pretrained('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) #pipeX = StableDiffusionXLPipeline.from_pretrained("SG161222/RealVisXL_V5.0").to(torch.bfloat16)
107
  #pipeX = StableDiffusionXLPipeline.from_pretrained("ford442/Juggernaut-XI-v11-fp32",use_safetensors=True)
108
+
109
  pipe = StableDiffusionXLPipeline.from_pretrained(
110
  #'ford442/RealVisXL_V5.0_BF16',
111
  'John6666/pornworks-sexy-beauty-v04-sdxl',
 
125
  # scheduler = EulerAncestralDiscreteScheduler.from_config(pipeX.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
126
  #scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset =1)
127
  )
128
+
129
  #pipe.unet=UNet2DConditionModel.from_pretrained('ford442/RealVisXL_V5.0_FP64',subfolder='unet').to(torch.bfloat16)
130
  #pipe.unet=UNet2DConditionModel.from_pretrained('SG161222/RealVisXL_V5.0',subfolder='unet').to(torch.bfloat16)
131
  #pipe.vae = AsymmetricAutoencoderKL.from_pretrained('cross-attention/asymmetric-autoencoder-kl-x-2').to(torch.bfloat16) # ,use_safetensors=True FAILS
 
134
  #sched = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear",use_karras_sigmas=True, algorithm_type="dpmsolver++")
135
  #pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
136
  #pipe.scheduler = DPMSolverMultistepScheduler.from_pretrained('SG161222/RealVisXL_V5.0', subfolder='scheduler', algorithm_type='sde-dpmsolver++')
137
+ pipe.vae = vaeX.to(torch.bfloat16)
138
  #pipe.unet = unetX.to(torch.bfloat16)
139
  pipe.scheduler = sched
140
  pipe.vae.do_resize=False