Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -125,9 +125,9 @@ def load_and_prepare_model(model_id):
|
|
| 125 |
# pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
| 126 |
|
| 127 |
pipe.unet = pipeX.unet
|
| 128 |
-
pipe.to(dtype=torch.bfloat16)
|
| 129 |
-
pipe.to(device)
|
| 130 |
#pipe.to(dtype=torch.bfloat16)
|
|
|
|
|
|
|
| 131 |
|
| 132 |
#pipe.to(device, torch.bfloat16)
|
| 133 |
del pipeX
|
|
@@ -215,7 +215,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
|
| 219 |
upload_to_ftp(filename)
|
| 220 |
for i in range(0, num_images, BATCH_SIZE):
|
| 221 |
batch_options = options.copy()
|
|
@@ -282,7 +282,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
|
| 286 |
upload_to_ftp(filename)
|
| 287 |
for i in range(0, num_images, BATCH_SIZE):
|
| 288 |
batch_options = options.copy()
|
|
@@ -349,7 +349,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
|
| 353 |
upload_to_ftp(filename)
|
| 354 |
for i in range(0, num_images, BATCH_SIZE):
|
| 355 |
batch_options = options.copy()
|
|
|
|
| 125 |
# pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
| 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
|
|
|
|
| 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 |
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 |
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()
|