stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

fix image history issue with absolute path

Open w-e-w opened this issue 3 years ago • 2 comments

there are some weird path split / concatenation code that's breaking absolute path for image history

befor the fix image path is been wrongly modified as above, and images are not showing (screenshot is taken after clicking the load button) the path missing the \ after the drive letter:

this is due to the weird path splitting and concatenation that's happening in the code so I remove it and thing seems to be working fine

after the fix, it just uses the path to find in the settings, no more strange logic all seems to be working Tested on 10 Python 3.10.6 I've tried to Absolute and Relative path with bothe \ and / path separators image screenshot it is working

w-e-w avatar Oct 23 '22 12:10 w-e-w

this issue seems to have been fixed and broken multiple times fixed at https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/fc220a51cf5bb5bfca83322c16e907a18ec59f6b#diff-d0d8c330f213a99bf66dd77d51d319ac908af0b24109642c8ccaf7bb46b30ec5R112-R113 then broken at https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/a4de699e3c235d83b5a957d08779cb41cb0781bc#diff-d0d8c330f213a99bf66dd77d51d319ac908af0b24109642c8ccaf7bb46b30ec5R214-R216 related PR #3477 #2790

w-e-w avatar Oct 23 '22 13:10 w-e-w

I really don't understand the purpose of https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/3491/files#diff-d0d8c330f213a99bf66dd77d51d319ac908af0b24109642c8ccaf7bb46b30ec5L293-L296 the code that is causing the issue

@yfszzx can you explain the purpose of splitting the path and then rejoining it the purpose seems to be just to convert / to the os's separators but as far as I know python can handle both / \ separators, on windows at least is there an issue on Linux?

we should already have a working path in the opts.outdir_txt2img_samples there should be no need of doing any conversion

w-e-w avatar Oct 23 '22 13:10 w-e-w

Thanks , image history will be remove to extensions.I will merge you code in the extension repository

yfszzx avatar Oct 23 '22 23:10 yfszzx