Spaces:
Sleeping
Sleeping
Bobby
commited on
Commit
·
7fba5e7
1
Parent(s):
7d5d252
no autocast
Browse files
app.py
CHANGED
|
@@ -421,16 +421,15 @@ def process_image(
|
|
| 421 |
print(prompt)
|
| 422 |
print(f"\n-------------------------Preprocess done in: {preprocess_time:.2f} seconds-------------------------")
|
| 423 |
start = time.time()
|
| 424 |
-
|
| 425 |
-
|
| 426 |
-
|
| 427 |
-
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
|
| 433 |
-
).images[0]
|
| 434 |
print(f"\n-------------------------Inference done in: {time.time() - start:.2f} seconds-------------------------")
|
| 435 |
# results.save(os.path.join("/data", "temp_image.jpg"))
|
| 436 |
# torch.cuda.synchronize()
|
|
|
|
| 421 |
print(prompt)
|
| 422 |
print(f"\n-------------------------Preprocess done in: {preprocess_time:.2f} seconds-------------------------")
|
| 423 |
start = time.time()
|
| 424 |
+
results = pipe(
|
| 425 |
+
prompt=prompt,
|
| 426 |
+
negative_prompt=negative_prompt,
|
| 427 |
+
guidance_scale=guidance_scale,
|
| 428 |
+
num_images_per_prompt=num_images,
|
| 429 |
+
num_inference_steps=num_steps,
|
| 430 |
+
generator=generator,
|
| 431 |
+
image=control_image,
|
| 432 |
+
).images[0]
|
|
|
|
| 433 |
print(f"\n-------------------------Inference done in: {time.time() - start:.2f} seconds-------------------------")
|
| 434 |
# results.save(os.path.join("/data", "temp_image.jpg"))
|
| 435 |
# torch.cuda.synchronize()
|