diff --git a/ui/easydiffusion/tasks/render_images.py b/ui/easydiffusion/tasks/render_images.py index 9260349f..50c76c2e 100644 --- a/ui/easydiffusion/tasks/render_images.py +++ b/ui/easydiffusion/tasks/render_images.py @@ -278,6 +278,11 @@ def generate_images_internal( setattr(pipe.unet, "_allocate_trt_buffers_backup", pipe.unet._allocate_trt_buffers) delattr(pipe.unet, "_allocate_trt_buffers") + if task_data.enable_vae_tiling: + pipe.enable_vae_tiling() + else: + pipe.disable_vae_tiling() + images = generate_images(context, callback=callback, **req.dict()) user_stopped = False except UserInitiatedStop: diff --git a/ui/easydiffusion/types.py b/ui/easydiffusion/types.py index ec331c29..f16e9aa3 100644 --- a/ui/easydiffusion/types.py +++ b/ui/easydiffusion/types.py @@ -84,6 +84,7 @@ class RenderTaskData(TaskData): filters: List[str] = [] filter_params: Dict[str, Dict[str, Any]] = {} control_filter_to_apply: Union[str, List[str]] = None + enable_vae_tiling: bool = True show_only_filtered_image: bool = False block_nsfw: bool = False diff --git a/ui/index.html b/ui/index.html index fcbcfa73..3aa213d2 100644 --- a/ui/index.html +++ b/ui/index.html @@ -387,6 +387,13 @@