Skip to content

Instantly share code, notes, and snippets.

@DOsinga
Created September 4, 2022 11:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DOsinga/23029cc7009aface7e86121994ffc469 to your computer and use it in GitHub Desktop.
Save DOsinga/23029cc7009aface7e86121994ffc469 to your computer and use it in GitHub Desktop.
#! /bin/bash
while IFS="," read -r state_name landmark state_code rec_remaining
do
echo "Run: $state_name \"$landmark\" $state_code"
if [ ! -f outputs/landmarks/$state_code.png ];
then
python scripts/txt2img.py --prompt "a travel magazine photo by Chris Burkard of $landmark, $state_name, trending on artstation" --n_samples 1 --n_iter 1 --plms --outdir outputs/landmarks
mv outputs/landmarks/grid-*.png outputs/landmarks/$state_code.png
fi
done < <(tail -n +2 state_landmarks.csv)
@DOsinga
Copy link
Author

DOsinga commented Sep 4, 2022

Simple script to loop through a csv and run txt2img on every line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment