sdkit 2.0.6 - Fix broken VAE tiling

This commit is contained in:
cmdr2 2023-08-30 17:42:50 +05:30
parent e959a3d7ab
commit 16f0950ebd
4 changed files with 14 additions and 6 deletions

View File

@ -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. - **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 ### 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 - 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 - 29 Aug 2023 - Fixed incorrect matching of embeddings from prompts.
* 3.0.2 - 24 Aug 2023 - Fix broken seamless tiling. * 3.0.2 - 24 Aug 2023 - Fix broken seamless tiling.

View File

@ -26,7 +26,7 @@ class GenerateImageRequest(BaseModel):
sampler_name: str = None # "ddim", "plms", "heun", "euler", "euler_a", "dpm2", "dpm2_a", "lms" sampler_name: str = None # "ddim", "plms", "heun", "euler", "euler_a", "dpm2", "dpm2_a", "lms"
hypernetwork_strength: float = 0 hypernetwork_strength: float = 0
lora_alpha: Union[float, List[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): class FilterImageRequest(BaseModel):

View File

@ -268,7 +268,11 @@ const TASK_MAPPING = {
tiling: { tiling: {
name: "Tiling", name: "Tiling",
setUI: (val) => { setUI: (val) => {
tilingField.value = val if (val === null || val === "None") {
tilingField.value = "none"
} else {
tilingField.value = val
}
}, },
readUI: () => tilingField.value, readUI: () => tilingField.value,
parse: (val) => val, parse: (val) => val,
@ -583,6 +587,7 @@ const TASK_TEXT_MAPPING = {
lora_alpha: "LoRA Strength", lora_alpha: "LoRA Strength",
use_controlnet_model: "ControlNet model", use_controlnet_model: "ControlNet model",
control_filter_to_apply: "ControlNet Filter", control_filter_to_apply: "ControlNet Filter",
tiling: "Seamless Tiling",
} }
function parseTaskFromText(str) { function parseTaskFromText(str) {
const taskReqBody = {} const taskReqBody = {}

View File

@ -680,7 +680,7 @@ function getAllModelNames(type) {
// gets a flattened list of all models of a certain type. e.g. "path/subpath/modelname" // 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. // use the filter to search for all models having a certain name.
function getAllModelPathes(type,filter="") { function getAllModelPathes(type, filter = "") {
function f(tree, prefix) { function f(tree, prefix) {
if (tree == undefined) { if (tree == undefined) {
return [] return []
@ -690,7 +690,7 @@ function getAllModelPathes(type,filter="") {
if (typeof e == "object") { if (typeof e == "object") {
result = result.concat(f(e[1], prefix + e[0] + "/")) result = result.concat(f(e[1], prefix + e[0] + "/"))
} else { } else {
if (filter=="" || e==filter) { if (filter == "" || e == filter) {
result.push(prefix + e) result.push(prefix + e)
} }
} }
@ -700,7 +700,6 @@ function getAllModelPathes(type,filter="") {
return f(modelsOptions[type], "") return f(modelsOptions[type], "")
} }
function onUseAsThumbnailClick(req, img) { function onUseAsThumbnailClick(req, img) {
let scale = 1 let scale = 1
let targetWidth = img.naturalWidth let targetWidth = img.naturalWidth
@ -1237,7 +1236,6 @@ function getCurrentUserRequest() {
//render_device: undefined, // Set device affinity. Prefer this device, but wont activate. //render_device: undefined, // Set device affinity. Prefer this device, but wont activate.
use_stable_diffusion_model: stableDiffusionModelField.value, use_stable_diffusion_model: stableDiffusionModelField.value,
clip_skip: clipSkipField.checked, clip_skip: clipSkipField.checked,
tiling: tilingField.value,
use_vae_model: vaeModelField.value, use_vae_model: vaeModelField.value,
stream_progress_updates: true, stream_progress_updates: true,
stream_image_progress: numOutputsTotal > 50 ? false : streamImageProgressField.checked, stream_image_progress: numOutputsTotal > 50 ? false : streamImageProgressField.checked,
@ -1302,6 +1300,10 @@ function getCurrentUserRequest() {
newTask.reqBody.use_lora_model = modelNames newTask.reqBody.use_lora_model = modelNames
newTask.reqBody.lora_alpha = modelStrengths newTask.reqBody.lora_alpha = modelStrengths
} }
if (tilingField.value !== "none") {
newTask.reqBody.tiling = tilingField.value
}
} }
if (testDiffusers.checked && document.getElementById("toggle-tensorrt-install").innerHTML == "Uninstall") { if (testDiffusers.checked && document.getElementById("toggle-tensorrt-install").innerHTML == "Uninstall") {
// TRT is installed // TRT is installed