Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --increment-seed argument #67

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

hirakujira
Copy link

@hirakujira hirakujira commented Dec 16, 2022

The --image-count option in the swift example generates images with the initial seed, which the user gives. But for the rest of the images, it generates an MLShapedArray with the normalShapedArray function, which is difficult to reproduce the resulting image again.

Imagine this scenario:

  1. A user use --image-count=1000 --seed=42 to generate a batch of images
  2. The user found that image No. 420 is the best result. He wants to reproduce the image with different steps
  3. Since we can't get the seed of image No. 420, the only solution is to rerun the whole batch with the steps he wants.

With the --increment-seed argument in this PR, the seed of each image is predictable. If a user wants image No. 420, he only needs to rerun the single image with seed 462 (420 + 42).

With --increment-seed argument, the swift application also saves each image right after the image is generated. We can let the application run and filter the result we want in the same time instead of waiting for the whole process to finish.

Do not erase the below when submitting your pull request:
#########

  • I agree to the terms outlined in CONTRIBUTING.md

@dec2-anon
Copy link
Contributor

the numbers at the end of the generated file name is the seed that was used for that particular image.

@hirakujira
Copy link
Author

hirakujira commented Dec 16, 2022

the numbers at the end of the generated file name is the seed that was used for that particular image.

I know. But this is for the first image only. Then the application generates the remaining images of the batch with normalShapedArray function, which is difficult to get the "seed".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants