[Bug]: wrong filename with hires fix and "Save a copy of image before applying highres fix."
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
When the setting "Save a copy of image before applying highres fix." is on, the pre-hiresfix image is saved with a filename that does not substitute all the variables.
At least the following ones are not replaced by their value: sampler, steps, cfg
Others, like seed, width and height work.
Steps to reproduce the problem
- In settings, check the "Save a copy of image before applying highres fix." option.
- Generate an image with hires fix.
- The first saved image has an incorrect filename. The final one is correct.
What should have happened?
The filename of the image should be correctly generated.
Commit where the problem happens
a9fed7c364061ae6efb37f797b6b522cb3cf7aa2
What platforms do you use to access the UI ?
Windows
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
doesn't matter
List of extensions
doesn't matter
Console logs
no errors in logs
Additional information
The problem seems to be this line in processing.py:
images.save_image(image, self.outpath_samples, "", seeds[index], prompts[index], opts.samples_format, info=info, suffix="-before-highres-fix")
Changing it to this seems to work:
images.save_image(image, self.outpath_samples, "", seeds[index], prompts[index], opts.samples_format, info=info, p=self, suffix="-before-highres-fix")