-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
sd-ultimate-upscale | ||
creative-upscale | ||
sd-ultimate-upscale |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
//@api-1.0 | ||
|
||
const configuration = pipeline.configuration; | ||
|
||
pipeline.downloadBuiltin("4x_ultrasharp_f16.ckpt"); | ||
|
||
configuration.strength = 0; | ||
configuration.upscaler = "4x UltraSharp"; | ||
pipeline.run({configuration: configuration}); | ||
|
||
const tileSrc = canvas.saveImageSrc(true); | ||
|
||
pipeline.downloadBuiltin("controlnet_tile_1.x_v1.1_f16.ckpt"); | ||
pipeline.downloadBuiltin("juggernaut_reborn_q6p_q8p.ckpt"); | ||
pipeline.downloadBuiltin("more_details_lora_f16.ckpt"); | ||
pipeline.downloadBuiltin("sdxl_render_lora_f16.ckpt"); | ||
pipeline.downloadBuiltin("tcd_sd_v1.5_lora_f16.ckpt"); | ||
|
||
const imageRect = canvas.boundingBox; | ||
|
||
const baseZoom = canvas.canvasZoom; | ||
|
||
configuration.width = configuration.width * 2; | ||
configuration.height = configuration.height * 2; | ||
canvas.updateCanvasSize(configuration); | ||
canvas.canvasZoom = baseZoom * 2; | ||
canvas.moveCanvas(imageRect.x, imageRect.y); | ||
|
||
configuration.steps = 8; | ||
configuration.tiledDecoding = true; | ||
configuration.decodingTileWidth = 1024; | ||
configuration.decodingTileHeight = 1024; | ||
configuration.decodingTileOverlap = 128; | ||
configuration.tiledDiffusion = true; | ||
configuration.diffusionTileWidth = 1024; | ||
configuration.diffusionTileHeight = 1024; | ||
configuration.diffusionTileOverlap = 128; | ||
configuration.sampler = SamplerType.TCD; | ||
configuration.stochasticSamplingGamma = 0.3; | ||
configuration.upscaler = null; | ||
|
||
configuration.model = "juggernaut_reborn_q6p_q8p.ckpt"; | ||
configuration.strength = 0.4; | ||
configuration.loras = [{"file": "more_details_lora_f16.ckpt", "weight": 0.6}, {"file": "sdxl_render_lora_f16.ckpt", "weight": 1}, {"file": "tcd_sd_v1.5_lora_f16.ckpt", "weight": 1}]; | ||
const tile = pipeline.findControlByName("Tile (SD v1.x, ControlNet 1.1)"); | ||
tile.weight = 0.5; | ||
configuration.controls = [tile]; | ||
|
||
pipeline.run({configuration: configuration, prompt: "masterpiece, best quality, highres"}); | ||
|
||
configuration.width = configuration.width * 2; | ||
configuration.height = configuration.height * 2; | ||
canvas.updateCanvasSize(configuration); | ||
canvas.canvasZoom = baseZoom * 4; | ||
canvas.moveCanvas(imageRect.x, imageRect.y); | ||
|
||
canvas.loadCustomLayerFromSrc(tileSrc); | ||
|
||
pipeline.run({configuration: configuration, prompt: "masterpiece, best quality, highres"}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "Creative Upscale", | ||
"file": "creative-upscale.js", | ||
"author": "Liu Liu", | ||
"description": "Generate up to 4x upscaled image from the input with crisp details." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "SD Ultimate Upscale", | ||
"file": "sd-ultimate-upscale.js", | ||
"author": "Draw Things", | ||
"author": "Gong Chen", | ||
"description": "Generate high-quality, high-resolution images from low-resolution inputs, while preserving fine details and textures." | ||
} |