diff --git a/ui/easydiffusion/renderer.py b/ui/easydiffusion/renderer.py
index b55f3667..e1eb2447 100644
--- a/ui/easydiffusion/renderer.py
+++ b/ui/easydiffusion/renderer.py
@@ -76,7 +76,7 @@ def filter_images(task_data: TaskData, images: list, user_stopped):
if task_data.use_face_correction and 'gfpgan' in task_data.use_face_correction.lower(): filters_to_apply.append('gfpgan')
if task_data.use_upscale and 'realesrgan' in task_data.use_upscale.lower(): filters_to_apply.append('realesrgan')
- return apply_filters(context, filters_to_apply, images)
+ return apply_filters(context, filters_to_apply, images, scale=task_data.upscale_amount)
def construct_response(images: list, task_data: TaskData, base_seed: int):
return [
diff --git a/ui/easydiffusion/types.py b/ui/easydiffusion/types.py
index e55b5a56..101e507b 100644
--- a/ui/easydiffusion/types.py
+++ b/ui/easydiffusion/types.py
@@ -29,6 +29,7 @@ class TaskData(BaseModel):
use_face_correction: str = None # or "GFPGANv1.3"
use_upscale: str = None # or "RealESRGAN_x4plus" or "RealESRGAN_x4plus_anime_6B"
+ upscale_amount: int = 4 # or 2
use_stable_diffusion_model: str = "sd-v1-4"
# use_stable_diffusion_config: str = "v1-inference"
use_vae_model: str = None
diff --git a/ui/easydiffusion/utils/save_utils.py b/ui/easydiffusion/utils/save_utils.py
index b9ce8aba..a4f48489 100644
--- a/ui/easydiffusion/utils/save_utils.py
+++ b/ui/easydiffusion/utils/save_utils.py
@@ -20,6 +20,7 @@ TASK_TEXT_MAPPING = {
'prompt_strength': 'Prompt Strength',
'use_face_correction': 'Use Face Correction',
'use_upscale': 'Use Upscaling',
+ 'upscale_amount': 'Upscale By',
'sampler_name': 'Sampler',
'negative_prompt': 'Negative Prompt',
'use_stable_diffusion_model': 'Stable Diffusion model',
@@ -48,6 +49,8 @@ def get_metadata_entries_for_request(req: GenerateImageRequest, task_data: TaskD
'use_face_correction': task_data.use_face_correction,
'use_upscale': task_data.use_upscale,
})
+ if metadata['use_upscale'] is not None:
+ metadata['upscale_amount'] = task_data.upscale_amount
# if text, format it in the text format expected by the UI
is_txt_format = (task_data.metadata_output_format.lower() == 'txt')
diff --git a/ui/index.html b/ui/index.html
index 10db2492..232da988 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -234,7 +234,12 @@
-
+
+
+ with