ford442 commited on
Commit
0d03cd1
·
1 Parent(s): 2766123

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -126,10 +126,9 @@ def load_and_prepare_model(model_id):
126
 
127
  pipe.unet = pipeX.unet
128
  #pipe.to(dtype=torch.bfloat16)
129
- pipe.to(device)
130
- pipe.to(torch.bfloat16)
131
-
132
- #pipe.to(device, torch.bfloat16)
133
  del pipeX
134
  #sched = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", algorithm_type="dpmsolver++")
135
  #sched = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, beta_schedule="linear", algorithm_type="dpmsolver++")
@@ -215,7 +214,7 @@ def generate_30(
215
  f.write(f"Model Scheduler: Euler_a custom \n")
216
  f.write(f"Model VAE: stabilityai/sdxl-vae no dtype \n")
217
  f.write(f"Model UNET: stabilityai no dtype \n")
218
- f.write(f"Model to cuda - then to dtype \n")
219
  upload_to_ftp(filename)
220
  for i in range(0, num_images, BATCH_SIZE):
221
  batch_options = options.copy()
@@ -282,7 +281,7 @@ def generate_60(
282
  f.write(f"Model Scheduler: Euler_a custom \n")
283
  f.write(f"Model VAE: stabilityai/sdxl-vae no dtype \n")
284
  f.write(f"Model UNET: stabilityai no dtype \n")
285
- f.write(f"Model to cuda - then to dtype \n")
286
  upload_to_ftp(filename)
287
  for i in range(0, num_images, BATCH_SIZE):
288
  batch_options = options.copy()
@@ -349,7 +348,7 @@ def generate_90(
349
  f.write(f"Model Scheduler: Euler_a custom \n")
350
  f.write(f"Model VAE: stabilityai/sdxl-vae no dtype \n")
351
  f.write(f"Model UNET: stabilityai no dtype \n")
352
- f.write(f"Model to cuda - then to dtype \n")
353
  upload_to_ftp(filename)
354
  for i in range(0, num_images, BATCH_SIZE):
355
  batch_options = options.copy()
 
126
 
127
  pipe.unet = pipeX.unet
128
  #pipe.to(dtype=torch.bfloat16)
129
+ #pipe.to(device)
130
+ #pipe.to(torch.bfloat16)
131
+ pipe.to(device, torch.bfloat16)
 
132
  del pipeX
133
  #sched = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", algorithm_type="dpmsolver++")
134
  #sched = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, beta_schedule="linear", algorithm_type="dpmsolver++")
 
214
  f.write(f"Model Scheduler: Euler_a custom \n")
215
  f.write(f"Model VAE: stabilityai/sdxl-vae no dtype \n")
216
  f.write(f"Model UNET: stabilityai no dtype \n")
217
+ f.write(f"Model to cuda/dtype \n")
218
  upload_to_ftp(filename)
219
  for i in range(0, num_images, BATCH_SIZE):
220
  batch_options = options.copy()
 
281
  f.write(f"Model Scheduler: Euler_a custom \n")
282
  f.write(f"Model VAE: stabilityai/sdxl-vae no dtype \n")
283
  f.write(f"Model UNET: stabilityai no dtype \n")
284
+ f.write(f"Model to cuda/dtype \n")
285
  upload_to_ftp(filename)
286
  for i in range(0, num_images, BATCH_SIZE):
287
  batch_options = options.copy()
 
348
  f.write(f"Model Scheduler: Euler_a custom \n")
349
  f.write(f"Model VAE: stabilityai/sdxl-vae no dtype \n")
350
  f.write(f"Model UNET: stabilityai no dtype \n")
351
+ f.write(f"Model to cuda/dtype \n")
352
  upload_to_ftp(filename)
353
  for i in range(0, num_images, BATCH_SIZE):
354
  batch_options = options.copy()