openvinotoolkit / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
290 stars 45 forks source link

[Feature Request]: Live previews #117

Open ustas-eth opened 3 months ago

ustas-eth commented 3 months ago

Is there an existing issue for this?

What would your feature do ?

It would be nice to get the live previews to work. I tried to check the script and enable them myself, but I'm afraid I have a skill issue. Not sure whether it's even possible with OpenVino.

I tried to do several tweaks and find where the previews are coming from, e.g., added several lines to the callback function in order to mimic the original one, but it doesn't seem to work:

            def callback(iter, t, latents):
                time_stamps.append(time.time()) # noqa: B023
                print(iter)
                print(t)
                shared.state.sampling_step = iter
                shared.total_tqdm.update()

The calls to /progress in the web still return nothing:

{"active":true,"queued":false,"completed":false,"progress":0.0,"eta":null,"live_preview":null,"id_live_preview":-1,"textinfo":null}

Proposed workflow

  1. Try to generate a pic
  2. See previews

Additional information

I really like to see the previews