Open gwiener opened 1 month ago
To implement the feature where the user can change the image resolution after it has been generated, you will need to make changes in the following files and functions, based on the search results:
modules/images.py
resize_image
modules/ui.py
img2img_args
(in the setup_ui_for_section
function)modules/upscaler.py
Upscaler
upscale
method and related methods/classes like UpscalerLanczos
handle the upscaling logic which will be useful for resampling resized images.modules/img2img.py
img2img
img2img
operations and will need updating to incorporate the new resizing workflow.scripts/postprocessing_upscale.py
process
upscale
Scale of Changes: Normal
Reasoning: The changes involve both the backend logic (image resizing and upscaling) and the frontend (UI for the "resize" button and new resolution input). While they span across several functional areas — namely the image processing logic and user interface elements — they do not require a complete overhaul of the entire system. Instead, they are focused on enhancing existing components to support the new functionality.
Proper integration and testing are required, especially to ensure that the image processing works seamlessly after the resolution change and that the UI provides a user-friendly experience when invoking the new feature.
modules/images.py:
resize_image
【4:3†source】modules/ui.py:
img2img_args
【4:7†source】modules/upscaler.py:
Upscaler
【4:0†source】【4:17†source】modules/img2img.py:
img2img
【4:14†source】scripts/postprocessing_upscale.py:
process
upscale
【4:16†source】These references were gathered from a search through the current codebase, ensuring that the proposed changes align with the functions and logic already defined. This will help in smoothly integrating the new feature.
Is there an existing issue for this?
What would your feature do ?
If the user changes the image resolution after the image was generated, the image would be resampled and resized
Proposed workflow
Additional information
No response