ford442 commited on
Commit
2a592c1
·
verified ·
1 Parent(s): b8ad518

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -121,11 +121,11 @@ def scheduler_swap_callback(pipeline, step_index, timestep, callback_kwargs):
121
  # pipeline.scheduler._step_index = pipeline.num_timesteps * 0.9
122
  return {"latents": callback_kwargs["latents"]}
123
 
124
-
125
  def load_and_prepare_model():
126
  #vaeXL = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", safety_checker=None, use_safetensors=False).to(device=device, dtype=torch.bfloat16)
127
  #vaeRV = AutoencoderKL.from_pretrained("SG161222/RealVisXL_V5.0", subfolder='vae', safety_checker=None, use_safetensors=False).to(device).to(torch.bfloat16) #.to(device=device, dtype=torch.bfloat16)
128
- 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)
 
129
  pipe = StableDiffusionXLPipeline.from_pretrained(
130
  'ford442/RealVisXL_V5.0_BF16',
131
  #torch_dtype=torch.bfloat16,
@@ -164,8 +164,6 @@ def upload_to_ftp(filename):
164
  except Exception as e:
165
  print(f"FTP upload error: {e}")
166
 
167
-
168
-
169
  def uploadNote(prompt,num_inference_steps,guidance_scale,timestamp):
170
  filename= f'rv_C_{timestamp}.txt'
171
  with open(filename, "w") as f:
 
121
  # pipeline.scheduler._step_index = pipeline.num_timesteps * 0.9
122
  return {"latents": callback_kwargs["latents"]}
123
 
 
124
  def load_and_prepare_model():
125
  #vaeXL = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", safety_checker=None, use_safetensors=False).to(device=device, dtype=torch.bfloat16)
126
  #vaeRV = AutoencoderKL.from_pretrained("SG161222/RealVisXL_V5.0", subfolder='vae', safety_checker=None, use_safetensors=False).to(device).to(torch.bfloat16) #.to(device=device, dtype=torch.bfloat16)
127
+ sched = EulerAncestralDiscreteScheduler.from_pretrained('ford442/RealVisXL_V5.0_BF16', subfolder='scheduler',beta_schedule="scaled_linear")
128
+ #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)
129
  pipe = StableDiffusionXLPipeline.from_pretrained(
130
  'ford442/RealVisXL_V5.0_BF16',
131
  #torch_dtype=torch.bfloat16,
 
164
  except Exception as e:
165
  print(f"FTP upload error: {e}")
166
 
 
 
167
  def uploadNote(prompt,num_inference_steps,guidance_scale,timestamp):
168
  filename= f'rv_C_{timestamp}.txt'
169
  with open(filename, "w") as f: