deforum-art / sd-webui-deforum

Deforum extension for AUTOMATIC1111's Stable Diffusion webui
https://deforum.github.io
Other
2.69k stars 389 forks source link

[Feature Request]: Add Image Debug feature for displaying common attribs on rendered images #507

Closed andyxr closed 1 year ago

andyxr commented 1 year ago

Is there an existing issue for this?

What would your feature do ?

This new 'Image Debug' mode, when enabled, would by default add a line of text at the bottom of each generated frame, displaying the following info:

Image Debug mode would let the user configure which params would feature in the debug text. Choose from:

Proposed workflow

  1. Go to Deforum tab
  2. Then to Output sub-tab
  3. Expand new Image Debug panel
  4. Switch on Show Image Debug
  5. See a list of attributes (see above)
  6. Check the attributes you want displaying at the bottom of each rendered image

Additional information

I am proposing this because when you're experimenting with schedules and other stuff like parseq, it would be useful to see what values are present in particular attributes; this would enable a more effective 'debugging' of your animation params.

Are you going to help adding it?

I'm not a Python coder, so would need some hand-holding. I don't mind getting stuck in, learn PIL, fork the code etc.

hithereai commented 1 year ago

So you want the values in the frames themselves? Saved on top of the img? Not metadata?

andyxr commented 1 year ago

Yeah, exactly. Imagine it looking like a timecode. Along the bottom of each frame. I know there would be some limitations like, no of chars, font foreground etc. "Frame: 2323. Seed: 24312443345. Strength: 0.34. Tr_z: 1.56. CFG: 11.4"

andyxr commented 1 year ago

The use-case is where a user is experimenting with parseq-generated (or keyframed) animations; currently it's hard to look at a generated video and work out what bit of parseq created what change in the video. "Was that where I changed the seed? Or was the main influencer the strength?" If each frame had some 'debug' attributes on it, you'd see at what frame certain parseq (or Deforum keyframe) values had a particular impact. Of course, the metadata is there and valuable. This feature turns it into something a little more accessible.

hithereai commented 1 year ago

If all you care about is parseq, maybe it's a better idea to summon @rewbs to the convo.

rewbs commented 1 year ago

I had built something like this in the original parseq script for a1111 (before I ditched it in favour of Deforum).

I've been thinking about bringing this to Deforum. I agree it would be useful in some cases. The challenge is that there are now far more variables than you can reasonably overlay onto a 512x512 video so there would need to be some selection of which ones to include.

A possible alternative would be to dump the per-frame metadata as text and provide some mechanism to render subsets of the metadata to video post-hoc, or provide some UI to show the text metadata alongside a video.

hithereai commented 1 year ago

After some experiments, this will be done using an .srt subtitles file.

It's already working as WIP. Will PR in the upcoming days.

image

hithereai commented 1 year ago

image

Coming soon :)