Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -130,10 +130,10 @@ def load_and_prepare_model(model_id):
|
|
| 130 |
# pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
| 131 |
#pipe.to(dtype=torch.bfloat16)
|
| 132 |
pipe.unet = pipeX.unet
|
|
|
|
| 133 |
pipe.to(device)
|
| 134 |
pipe.unet.to(torch.bfloat16)
|
| 135 |
pipe.vae.to(torch.bfloat16)
|
| 136 |
-
pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
| 137 |
#pipe.to(torch.bfloat16)
|
| 138 |
#pipe.to(device, torch.bfloat16)
|
| 139 |
del pipeX
|
|
@@ -216,11 +216,11 @@ def generate_30(
|
|
| 216 |
f.write(f"Steps: {num_inference_steps} \n")
|
| 217 |
f.write(f"Guidance Scale: {guidance_scale} \n")
|
| 218 |
f.write(f"SPACE SETUP: \n")
|
| 219 |
-
f.write(f"Use Safetensors:
|
| 220 |
-
f.write(f"Use Model Dtype:
|
| 221 |
-
f.write(f"Model Scheduler: Euler_a custom \n")
|
| 222 |
-
f.write(f"Model VAE: stabilityai/sdxl-vae
|
| 223 |
-
f.write(f"Model UNET: stabilityai after cuda \n")
|
| 224 |
upload_to_ftp(filename)
|
| 225 |
for i in range(0, num_images, BATCH_SIZE):
|
| 226 |
batch_options = options.copy()
|
|
|
|
| 130 |
# pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
| 131 |
#pipe.to(dtype=torch.bfloat16)
|
| 132 |
pipe.unet = pipeX.unet
|
| 133 |
+
pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
| 134 |
pipe.to(device)
|
| 135 |
pipe.unet.to(torch.bfloat16)
|
| 136 |
pipe.vae.to(torch.bfloat16)
|
|
|
|
| 137 |
#pipe.to(torch.bfloat16)
|
| 138 |
#pipe.to(device, torch.bfloat16)
|
| 139 |
del pipeX
|
|
|
|
| 216 |
f.write(f"Steps: {num_inference_steps} \n")
|
| 217 |
f.write(f"Guidance Scale: {guidance_scale} \n")
|
| 218 |
f.write(f"SPACE SETUP: \n")
|
| 219 |
+
f.write(f"Use Safetensors: True \n")
|
| 220 |
+
f.write(f"Use Model Dtype: yes \n")
|
| 221 |
+
f.write(f"Model Scheduler: Euler_a custom before cuda \n")
|
| 222 |
+
f.write(f"Model VAE: stabilityai/sdxl-vae before cuda to bfloat after cuda \n")
|
| 223 |
+
f.write(f"Model UNET: stabilityai before cuda to bfloat after cuda \n")
|
| 224 |
upload_to_ftp(filename)
|
| 225 |
for i in range(0, num_images, BATCH_SIZE):
|
| 226 |
batch_options = options.copy()
|