Skip to content

Conversation

keturn
Copy link
Contributor

@keturn keturn commented Feb 26, 2023

For size savings of about 80%, and jpeg encoding is still plenty fast.

@blessedcoolant
Copy link
Collaborator

See no harm.

For size savings of about 80%, and jpeg encoding is still plenty fast.
@blessedcoolant blessedcoolant merged commit 6e0c6d9 into main Feb 26, 2023
@blessedcoolant blessedcoolant deleted the perf/preview_jpeg branch February 26, 2023 05:47
@psychedelicious
Copy link
Collaborator

psychedelicious commented Feb 26, 2023

@keturn thanks for improving things but keep in mind this server is about to be ditched entirely, not much use in spending time on it.

@JPPhoto
Copy link
Contributor

JPPhoto commented Feb 27, 2023

Was there some motivation for the original change?

This change results in a huge drop in preview quality and may have a performance impact for what amounts to a negligible savings unless you're dealing with large images. In the case of large images, your larger overhead is by far the inference step,

I think the change to invoke_ai_web_server.py should be reverted just so this doesn't sneak in as things are changed for nodes, while the rest of the changes are fine.

@keturn
Copy link
Contributor Author

keturn commented Feb 27, 2023

It's not the overhead of the server process I'm worried about here, it's client/server traffic and how much the client is storing.

the preview images are so low-fidelity anyway I didn't notice any difference (and am curious about what your workflow is such that you can notice a difference here).

but if it's a problem we could certainly boost the jpeg quality up a bit, as I think the default is 75. 85 might suit you better and still be heaps smaller than PNG.

@JPPhoto
Copy link
Contributor

JPPhoto commented Feb 27, 2023

Does the client store all of these seemingly throwaway previews? And at least in our current implementation, the traffic in most cases is local - or previews can be disabled if performance is critical and you're using Invoke over a network. Thus, I'm curious what the motivation for the change was.

As for me noticing, I'm a photographer and I'm really sensitive to image quality. The previews changed from being vibrant representations of the image to washed out counterparts with different portions getting "cleaned up" over time rather than the entire image looking better after each step. I thought there was something wrong with my setup before I tracked down the change here.

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.

4 participants