Skip to content

Conversation

@code-distortion
Copy link

@code-distortion code-distortion commented Jul 21, 2023

Hi @fboulnois. I hope you don't mind me making this pull request. I wanted to give this a go to see if I could do it, and thought you might find it useful as well.

Synopsis

This pull request adds a new --output xxx option, to allow the user to specify a filename to output to.

I wanted to let the caller specify this. This way, when programmatically calling ./build.sh run, the calling script knows exactly which output file to look for.

Usage

./build.sh run 'a person riding a bicycle on a bridge' --output my_file.png

Notes

  • the user is only allowed to specify .png filenames (an exception is raised otherwise)
  • a default name is still generated when needed
  • small differences to the existing behaviour:
    • the output filename/s are shown for the user to see. e.g. output file: my_file.png
    • the iteration is still added to the filename (i.e. __n_1, __n_2, etc) regardless of whether the user specified their own filename or not, but only when creating more than one image (i.e. --iters > 1 or --samples > 1)
  • README.md has been updated

@fboulnois fboulnois force-pushed the main branch 2 times, most recently from f55d769 to 7d559de Compare December 3, 2023 14:12
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.

1 participant