diff --git a/ui/easydiffusion/tasks/render_images.py b/ui/easydiffusion/tasks/render_images.py index bf263b3f..bdf6e3ac 100644 --- a/ui/easydiffusion/tasks/render_images.py +++ b/ui/easydiffusion/tasks/render_images.py @@ -223,6 +223,8 @@ def generate_images_internal( if req.init_image is not None and not context.test_diffusers: req.sampler_name = "ddim" + req.width, req.height = map(lambda x: x - x % 8, (req.width, req.height)) # clamp to 8 + if req.control_image and task_data.control_filter_to_apply: req.control_image = filter_images(context, req.control_image, task_data.control_filter_to_apply)[0] diff --git a/ui/media/js/main.js b/ui/media/js/main.js index 21e55923..568ab0dc 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -1365,6 +1365,12 @@ function getCurrentUserRequest() { // numOutputsParallel = 1 // force 1 parallel // } + // clamp to multiple of 8 + let width = parseInt(widthField.value) + let height = parseInt(heightField.value) + width = width - (width % 8) + height = height - (height % 8) + const newTask = { batchesDone: 0, numOutputsTotal: numOutputsTotal, @@ -1377,8 +1383,8 @@ function getCurrentUserRequest() { num_outputs: numOutputsParallel, num_inference_steps: parseInt(numInferenceStepsField.value), guidance_scale: parseFloat(guidanceScaleField.value), - width: parseInt(widthField.value), - height: parseInt(heightField.value), + width: width, + height: height, // allow_nsfw: allowNSFWField.checked, vram_usage_level: vramUsageLevelField.value, sampler_name: samplerField.value,