diff options
author | fumitaka.yano <fumitaka.yano@mixi.co.jp> | 2023-05-23 06:56:08 +0000 |
---|---|---|
committer | fumitaka.yano <fumitaka.yano@mixi.co.jp> | 2023-05-23 06:56:08 +0000 |
commit | 1db7d212836e0fd8a4eff6922c13a54a372175b2 (patch) | |
tree | 8c79afa67029c3e5acde5e44c1abbd21aeb6911d /modules/generation_parameters_copypaste.py | |
parent | 89f9faa63388756314e8a1d96cf86bf5e0663045 (diff) | |
download | stable-diffusion-webui-gfx803-1db7d212836e0fd8a4eff6922c13a54a372175b2.tar.gz stable-diffusion-webui-gfx803-1db7d212836e0fd8a4eff6922c13a54a372175b2.tar.bz2 stable-diffusion-webui-gfx803-1db7d212836e0fd8a4eff6922c13a54a372175b2.zip |
Subject:.
Improvements to handle VAE filenames in generated image filenames
Body:.
1) Added new line 24 to import sd_vae module.
2) Added new method get_vae_filename at lines 340-349 to obtain the VAE filename to be used for image generation and further process it to extract only the filename by splitting it with a dot symbol.
3) Added a new lambda function 'vae_filename' at line 373 to handle VAE filenames.
Reason:.
A function was needed to get the VAE filename and handle it in the program.
Test:.
We tested whether we could use this new functionality to get the expected file names.
The correct behaviour was confirmed for the following commonly distributed VAE files.
vae-ft-mse-840000-ema-pruned.safetensors -> vae-ft-mse-840000-ema-pruned
anything-v4.0.vae.pt -> anything-v4.0
ruff response:.
There were no problems with the code I added.
There was a minor configuration error in a line I did not modify, but I did not modify it as it was not relevant to this modification.
Logged.
images.py:426:56: F841 [*] Local variable `_` is assigned to but never used
images.py:432:43: F841 [*] Local variable `_` is assigned to but never used
Impact:.
This change makes it easier to retrieve the VAE filename used for image generation and use it in the programme.
Diffstat (limited to 'modules/generation_parameters_copypaste.py')
0 files changed, 0 insertions, 0 deletions