oobabooga / text-generation-webui

A Gradio web UI for Large Language Models.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Character image resolution loss on loading character.

dEATh-PM opened this issue · comments

Describe the bug

When a character is loaded and a PFP is generated in chat.py > generate_pfp_cache a thumbnail is generated as well.
This thumbnail image is then returned back to state['character_picture'] for us in Gradio.
When saving the character, state['character_picture'] is saved as the image parallel to the character .yaml, overwriting the original, and potentialy larger, image.

If this was the intended behavior, I would have assumed the down scaling would be performed when an image is initially imported.

Suggested sollution:

            return original_img

Is there an existing issue for this?

  • I have searched the existing issues

Reproduction

  1. Import a character with an image larger than 350x470
  2. Save character by pressing 💾

alt.

  1. Create a character with an image larger than 350x470
  2. Load character
  3. Save character by pressing 💾

Screenshot

No response

Logs

N/A

System Info

N/A