Skip to content

Instantly share code, notes, and snippets.

@kurtroberts
Created July 29, 2024 22:41
Show Gist options
  • Select an option

  • Save kurtroberts/65722e0aedd1547cf6a04dfef8a613b6 to your computer and use it in GitHub Desktop.

Select an option

Save kurtroberts/65722e0aedd1547cf6a04dfef8a613b6 to your computer and use it in GitHub Desktop.
Extract prompt metadata from stable diffusion generated images (ComfyUI)
#!/bin/zsh
# install imagemagick and jq first of course
getprompt () {
magick identify -verbose $1 | grep prompt | perl -pe "s/^[^\:]*\://" - | jq . | grep text
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment