devforfu
commited on
Commit
•
ead8c6c
1
Parent(s):
6e8a90b
Fixed filename bug
Browse files
realfake/bin/generate_images.py
CHANGED
@@ -33,10 +33,12 @@ def main(args: GenerateImagesParams) -> None:
|
|
33 |
(prompt_dir/"prompt.txt").write_text(prompt)
|
34 |
|
35 |
left_images = args.num_images
|
|
|
36 |
while left_images > 0:
|
37 |
output = pipe(prompt, num_images_per_prompt=min(batch_size, left_images))
|
38 |
-
for
|
39 |
-
image.save(prompt_dir/f"{
|
|
|
40 |
left_images -= batch_size
|
41 |
|
42 |
|
|
|
33 |
(prompt_dir/"prompt.txt").write_text(prompt)
|
34 |
|
35 |
left_images = args.num_images
|
36 |
+
count = 0
|
37 |
while left_images > 0:
|
38 |
output = pipe(prompt, num_images_per_prompt=min(batch_size, left_images))
|
39 |
+
for image in output.images:
|
40 |
+
image.save(prompt_dir/f"{count}.png")
|
41 |
+
count += 1
|
42 |
left_images -= batch_size
|
43 |
|
44 |
|