diff --git a/CHANGES.md b/CHANGES.md index d54a1d84..bfbbc6e6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,7 @@ - **Major rewrite of the code** - We've switched to using diffusers under-the-hood, which allows us to release new features faster, and focus on making the UI and installer even easier to use. ### Detailed changelog +* 3.0.2 - 30 Aug 2023 - Fix broken VAE tiling. This allows you to create larger images with lesser VRAM usage. * 3.0.2 - 30 Aug 2023 - Allow blocking NSFW images using a server-side config. This prevents the browser from generating NSFW images or changing the config. Open `config.yaml` in a text editor (e.g. Notepad), and add `block_nsfw: true` at the end, and save the file. * 3.0.2 - 29 Aug 2023 - Fixed incorrect matching of embeddings from prompts. * 3.0.2 - 24 Aug 2023 - Fix broken seamless tiling. diff --git a/ui/easydiffusion/types.py b/ui/easydiffusion/types.py index eeffcb72..29082438 100644 --- a/ui/easydiffusion/types.py +++ b/ui/easydiffusion/types.py @@ -26,7 +26,7 @@ class GenerateImageRequest(BaseModel): sampler_name: str = None # "ddim", "plms", "heun", "euler", "euler_a", "dpm2", "dpm2_a", "lms" hypernetwork_strength: float = 0 lora_alpha: Union[float, List[float]] = 0 - tiling: str = "none" # "none", "x", "y", "xy" + tiling: str = None # None, "x", "y", "xy" class FilterImageRequest(BaseModel): diff --git a/ui/media/js/dnd.js b/ui/media/js/dnd.js index 5cdb9539..cf082406 100644 --- a/ui/media/js/dnd.js +++ b/ui/media/js/dnd.js @@ -268,7 +268,11 @@ const TASK_MAPPING = { tiling: { name: "Tiling", setUI: (val) => { - tilingField.value = val + if (val === null || val === "None") { + tilingField.value = "none" + } else { + tilingField.value = val + } }, readUI: () => tilingField.value, parse: (val) => val, @@ -583,6 +587,7 @@ const TASK_TEXT_MAPPING = { lora_alpha: "LoRA Strength", use_controlnet_model: "ControlNet model", control_filter_to_apply: "ControlNet Filter", + tiling: "Seamless Tiling", } function parseTaskFromText(str) { const taskReqBody = {} diff --git a/ui/media/js/main.js b/ui/media/js/main.js index 12ad5a0c..cff8cb6c 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -680,7 +680,7 @@ function getAllModelNames(type) { // gets a flattened list of all models of a certain type. e.g. "path/subpath/modelname" // use the filter to search for all models having a certain name. -function getAllModelPathes(type,filter="") { +function getAllModelPathes(type, filter = "") { function f(tree, prefix) { if (tree == undefined) { return [] @@ -690,7 +690,7 @@ function getAllModelPathes(type,filter="") { if (typeof e == "object") { result = result.concat(f(e[1], prefix + e[0] + "/")) } else { - if (filter=="" || e==filter) { + if (filter == "" || e == filter) { result.push(prefix + e) } } @@ -700,7 +700,6 @@ function getAllModelPathes(type,filter="") { return f(modelsOptions[type], "") } - function onUseAsThumbnailClick(req, img) { let scale = 1 let targetWidth = img.naturalWidth @@ -1237,7 +1236,6 @@ function getCurrentUserRequest() { //render_device: undefined, // Set device affinity. Prefer this device, but wont activate. use_stable_diffusion_model: stableDiffusionModelField.value, clip_skip: clipSkipField.checked, - tiling: tilingField.value, use_vae_model: vaeModelField.value, stream_progress_updates: true, stream_image_progress: numOutputsTotal > 50 ? false : streamImageProgressField.checked, @@ -1302,6 +1300,10 @@ function getCurrentUserRequest() { newTask.reqBody.use_lora_model = modelNames newTask.reqBody.lora_alpha = modelStrengths } + + if (tilingField.value !== "none") { + newTask.reqBody.tiling = tilingField.value + } } if (testDiffusers.checked && document.getElementById("toggle-tensorrt-install").innerHTML == "Uninstall") { // TRT is installed