mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-11-25 17:55:09 +01:00
Add seamless tiling support
This commit is contained in:
parent
3d7e16cfd9
commit
9dfa300083
@ -23,6 +23,7 @@ class GenerateImageRequest(BaseModel):
|
||||
sampler_name: str = None # "ddim", "plms", "heun", "euler", "euler_a", "dpm2", "dpm2_a", "lms"
|
||||
hypernetwork_strength: float = 0
|
||||
lora_alpha: float = 0
|
||||
tiling: str = "none" # "none", "x", "y", "xy"
|
||||
|
||||
|
||||
class TaskData(BaseModel):
|
||||
|
@ -236,6 +236,15 @@
|
||||
<td><label for="hypernetwork_strength_slider">Hypernetwork Strength:</label></td>
|
||||
<td> <input id="hypernetwork_strength_slider" name="hypernetwork_strength_slider" class="editor-slider" value="100" type="range" min="0" max="100"> <input id="hypernetwork_strength" name="hypernetwork_strength" size="4" pattern="^[0-9\.]+$" onkeypress="preventNonNumericalInput(event)"><br/></td>
|
||||
</tr>
|
||||
<tr class="pl-5"><td><label for="tiling">Seamless tiling:</label></td><td>
|
||||
<select id="tiling" name="tiling">
|
||||
<option value="none" selected>None</option>
|
||||
<option value="x">Horizontal</option>
|
||||
<option value="y">Vertical</option>
|
||||
<option value="xy">Both</option>
|
||||
</select>
|
||||
<a href="https://github.com/cmdr2/stable-diffusion-ui/wiki/Seamless-Tiling" target="_blank"><i class="fa-solid fa-circle-question help-btn"><span class="simple-tooltip top-left">Click to learn more about Seamless Tiling</span></i></a>
|
||||
</td></tr>
|
||||
<tr class="pl-5"><td><label for="output_format">Output Format:</label></td><td>
|
||||
<select id="output_format" name="output_format">
|
||||
<option value="jpeg" selected>jpeg</option>
|
||||
|
@ -25,6 +25,7 @@ const SETTINGS_IDS_LIST = [
|
||||
"prompt_strength",
|
||||
"hypernetwork_strength",
|
||||
"lora_alpha",
|
||||
"tiling",
|
||||
"output_format",
|
||||
"output_quality",
|
||||
"output_lossless",
|
||||
|
@ -249,6 +249,14 @@ const TASK_MAPPING = {
|
||||
readUI: () => clip_skip.checked,
|
||||
parse: (val) => Boolean(val),
|
||||
},
|
||||
tiling: {
|
||||
name: "Tiling",
|
||||
setUI: (val) => {
|
||||
tilingField.value = val
|
||||
},
|
||||
readUI: () => tilingField.value,
|
||||
parse: (val) => val,
|
||||
},
|
||||
use_vae_model: {
|
||||
name: "VAE model",
|
||||
setUI: (use_vae_model) => {
|
||||
|
@ -789,9 +789,10 @@
|
||||
use_hypernetwork_model: "string",
|
||||
hypernetwork_strength: "number",
|
||||
output_lossless: "boolean",
|
||||
tiling: "string",
|
||||
}
|
||||
|
||||
// Higer values will result in...
|
||||
// Higher values will result in...
|
||||
// pytorch_lightning/utilities/seed.py:60: UserWarning: X is not in bounds, numpy accepts from 0 to 4294967295
|
||||
const MAX_SEED_VALUE = 4294967295
|
||||
|
||||
|
@ -18,6 +18,11 @@ const taskConfigSetup = {
|
||||
visible: ({ reqBody }) => reqBody?.clip_skip,
|
||||
value: ({ reqBody }) => "yes",
|
||||
},
|
||||
tiling: {
|
||||
label: "Tiling",
|
||||
visible: ({ reqBody }) => reqBody?.tiling != "none",
|
||||
value: ({ reqBody }) => reqBody?.tiling,
|
||||
},
|
||||
use_vae_model: {
|
||||
label: "VAE",
|
||||
visible: ({ reqBody }) => reqBody?.use_vae_model !== undefined && reqBody?.use_vae_model.trim() !== "",
|
||||
@ -91,6 +96,7 @@ let latentUpscalerStepsSlider = document.querySelector("#latent_upscaler_steps_s
|
||||
let latentUpscalerStepsField = document.querySelector("#latent_upscaler_steps")
|
||||
let stableDiffusionModelField = new ModelDropdown(document.querySelector("#stable_diffusion_model"), "stable-diffusion")
|
||||
let clipSkipField = document.querySelector("#clip_skip")
|
||||
let tilingField = document.querySelector("#tiling")
|
||||
let vaeModelField = new ModelDropdown(document.querySelector("#vae_model"), "vae", "None")
|
||||
let hypernetworkModelField = new ModelDropdown(document.querySelector("#hypernetwork_model"), "hypernetwork", "None")
|
||||
let hypernetworkStrengthSlider = document.querySelector("#hypernetwork_strength_slider")
|
||||
@ -1221,6 +1227,7 @@ 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,
|
||||
|
Loading…
Reference in New Issue
Block a user