From ebf34c645b993d1bd340a9b0ecf32911d346ebdb Mon Sep 17 00:00:00 2001 From: sanj <67624670+iodrift@users.noreply.github.com> Date: Sun, 30 Jun 2024 08:36:43 -0700 Subject: [PATCH] Auto-update: Sun Jun 30 08:36:43 PDT 2024 --- sijapi/data/sd/workflows/default.json | 375 ++++++++++++++-- sijapi/data/sd/workflows/landscape.json | 445 ++++++++++++++----- sijapi/data/sd/workflows/wallpaper.json | 381 +++++++++++++--- sijapi/data/sd/workflows/wallpaper_fast.json | 281 ------------ sijapi/routers/note.py | 4 +- sijapi/routers/sd.py | 8 +- 6 files changed, 1005 insertions(+), 489 deletions(-) delete mode 100644 sijapi/data/sd/workflows/wallpaper_fast.json diff --git a/sijapi/data/sd/workflows/default.json b/sijapi/data/sd/workflows/default.json index e7e2d40..3edaaa0 100644 --- a/sijapi/data/sd/workflows/default.json +++ b/sijapi/data/sd/workflows/default.json @@ -10,7 +10,10 @@ }, "6": { "inputs": { - "text": "API_PrePrompt", + "text": [ + "50", + 0 + ], "clip": [ "4", 1 @@ -23,7 +26,10 @@ }, "7": { "inputs": { - "text": "API_NegativePrompt", + "text": [ + "51", + 0 + ], "clip": [ "4", 1 @@ -58,16 +64,16 @@ "Z": 0, "evolution": 0.1, "frame": 1, - "scale": 13.1, + "scale": 2, "octaves": 8, - "persistence": 6.2, - "lacunarity": 5.38, - "exponent": 4.5600000000000005, - "brightness": -0.16, - "contrast": -0.13, + "persistence": 3, + "lacunarity": 4, + "exponent": 2, + "brightness": 0, + "contrast": 0, "clamp_min": 0, "clamp_max": 1, - "seed": 474669046020372, + "seed": 477685752000597, "device": "cpu", "optional_vae": [ "4", @@ -81,10 +87,10 @@ }, "13": { "inputs": { - "seed": 484066073734968, + "seed": 686880884118590, "steps": 10, "cfg": 1.8, - "sampler_name": "dpmpp_2m_sde", + "sampler_name": "dpmpp_sde", "scheduler": "karras", "start_at_step": 0, "end_at_step": 10000, @@ -97,9 +103,9 @@ "noise_mode": "additive", "scale": 1, "alpha_exponent": 1, - "modulator": 1, + "modulator": 1.05, "sigma_tolerance": 0.5, - "boost_leading_sigma": "false", + "boost_leading_sigma": "true", "guide_use_noise": "true", "model": [ "4", @@ -138,13 +144,13 @@ "Z": 0, "evolution": 0, "frame": 0, - "scale": 5, + "scale": 2.5, "octaves": 5, "persistence": 4, - "lacunarity": 5, - "exponent": 4.28, - "brightness": -0.3, - "contrast": -0.2 + "lacunarity": 3, + "exponent": 2, + "brightness": -0.1, + "contrast": -0.1 }, "class_type": "Perlin Power Fractal Settings (PPF Noise)", "_meta": { @@ -155,12 +161,12 @@ "inputs": { "frequency": 332.65500000000003, "octaves": 32, - "persistence": 1.616, - "num_colors": 256, + "persistence": 1.4000000000000001, + "num_colors": 128, "color_tolerance": 0.05, - "angle_degrees": 180, - "brightness": -0.5, - "contrast": -0.05, + "angle_degrees": 45, + "brightness": -0.25, + "contrast": 0, "blur": 1.3 }, "class_type": "Cross-Hatch Power Fractal Settings (PPF Noise)", @@ -209,23 +215,14 @@ "title": "ConditioningZeroOut" } }, - "24": { - "inputs": { - "model_name": "RealESRGAN_x4plus.pth" - }, - "class_type": "UpscaleModelLoader", - "_meta": { - "title": "Load Upscale Model" - } - }, "26": { "inputs": { "upscale_model": [ - "24", + "58", 0 ], "image": [ - "38", + "39", 0 ] }, @@ -236,7 +233,7 @@ }, "27": { "inputs": { - "factor": 0.5, + "factor": 0.25, "interpolation_mode": "bicubic", "image": [ "30", @@ -277,5 +274,313 @@ "_meta": { "title": "VAE Decode" } + }, + "39": { + "inputs": { + "noise_seed": 690275685743412, + "steps": 16, + "cfg": 7.5, + "base_ratio": 0.85, + "denoise": 0.25, + "scaled_width": [ + "60", + 0 + ], + "scaled_height": [ + "64", + 0 + ], + "noise_offset": 1, + "refiner_strength": 1, + "softness": 0, + "base_model": [ + "40", + 0 + ], + "base_positive": [ + "45", + 0 + ], + "base_negative": [ + "46", + 0 + ], + "refiner_model": [ + "42", + 0 + ], + "refiner_positive": [ + "43", + 0 + ], + "refiner_negative": [ + "44", + 0 + ], + "image": [ + "38", + 0 + ], + "vae": [ + "41", + 2 + ], + "sampler_name": [ + "47", + 0 + ], + "scheduler": [ + "47", + 1 + ], + "upscale_model": [ + "58", + 0 + ] + }, + "class_type": "SeargeSDXLImage2ImageSampler2", + "_meta": { + "title": "Image2Image Sampler v2 (Searge)" + } + }, + "40": { + "inputs": { + "lora_name": "SDXL/SDXLLandskaper_v1-000003.safetensors", + "strength_model": 1, + "strength_clip": 1, + "model": [ + "48", + 0 + ], + "clip": [ + "48", + 1 + ] + }, + "class_type": "LoraLoader", + "_meta": { + "title": "Load LoRA" + } + }, + "41": { + "inputs": { + "ckpt_name": "SDXL/realismEngineSDXL_v20VAE.safetensors" + }, + "class_type": "CheckpointLoaderSimple", + "_meta": { + "title": "Load Checkpoint" + } + }, + "42": { + "inputs": { + "ckpt_name": "SDXL/sdxl_refiner_1.0.safetensors" + }, + "class_type": "CheckpointLoaderSimple", + "_meta": { + "title": "Load Checkpoint" + } + }, + "43": { + "inputs": { + "text": [ + "50", + 0 + ], + "clip": [ + "42", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "44": { + "inputs": { + "text": [ + "51", + 0 + ], + "clip": [ + "42", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "45": { + "inputs": { + "text": [ + "50", + 0 + ], + "clip": [ + "40", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "46": { + "inputs": { + "text": [ + "51", + 0 + ], + "clip": [ + "40", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "47": { + "inputs": { + "sampler_name": "dpmpp_2m_sde", + "scheduler": "karras" + }, + "class_type": "SeargeSamplerInputs", + "_meta": { + "title": "Sampler Settings" + } + }, + "48": { + "inputs": { + "lora_name": "SDXL/add-detail-xl.safetensors", + "strength_model": 1, + "strength_clip": 1, + "model": [ + "41", + 0 + ], + "clip": [ + "41", + 1 + ] + }, + "class_type": "LoraLoader", + "_meta": { + "title": "Load LoRA" + } + }, + "50": { + "inputs": { + "text": "API_PrePrompt" + }, + "class_type": "JWStringMultiline", + "_meta": { + "title": "String (Multiline)" + } + }, + "51": { + "inputs": { + "text": "API_NegativePrompt" + }, + "class_type": "JWStringMultiline", + "_meta": { + "title": "String (Multiline)" + } + }, + "52": { + "inputs": { + "image": [ + "38", + 0 + ] + }, + "class_type": "Image Size to Number", + "_meta": { + "title": "Image Size to Number" + } + }, + "55": { + "inputs": { + "op": "a * b", + "a": [ + "52", + 2 + ], + "b": [ + "65", + 0 + ], + "c": 0 + }, + "class_type": "SeargeFloatMath", + "_meta": { + "title": "Float Math" + } + }, + "58": { + "inputs": { + "model_name": "4x_foolhardy_Remacri.pth" + }, + "class_type": "UpscaleModelLoader", + "_meta": { + "title": "Load Upscale Model" + } + }, + "59": { + "inputs": { + "op": "a * b", + "a": [ + "52", + 3 + ], + "b": [ + "65", + 0 + ], + "c": 0 + }, + "class_type": "SeargeFloatMath", + "_meta": { + "title": "Float Math" + } + }, + "60": { + "inputs": { + "value": [ + "55", + 0 + ], + "mode": "round" + }, + "class_type": "JWFloatToInteger", + "_meta": { + "title": "Float to Integer" + } + }, + "64": { + "inputs": { + "value": [ + "59", + 0 + ], + "mode": "round" + }, + "class_type": "JWFloatToInteger", + "_meta": { + "title": "Float to Integer" + } + }, + "65": { + "inputs": { + "value": 2 + }, + "class_type": "JWFloat", + "_meta": { + "title": "Float" + } } } \ No newline at end of file diff --git a/sijapi/data/sd/workflows/landscape.json b/sijapi/data/sd/workflows/landscape.json index b188cd9..3edaaa0 100644 --- a/sijapi/data/sd/workflows/landscape.json +++ b/sijapi/data/sd/workflows/landscape.json @@ -10,7 +10,10 @@ }, "6": { "inputs": { - "text": "API_PrePrompt", + "text": [ + "50", + 0 + ], "clip": [ "4", 1 @@ -23,7 +26,10 @@ }, "7": { "inputs": { - "text": "API_NegativePrompt", + "text": [ + "51", + 0 + ], "clip": [ "4", 1 @@ -58,16 +64,16 @@ "Z": 0, "evolution": 0.1, "frame": 1, - "scale": 13.1, + "scale": 2, "octaves": 8, - "persistence": 6.2, - "lacunarity": 5.38, - "exponent": 4.5600000000000005, - "brightness": -0.16, - "contrast": -0.13, + "persistence": 3, + "lacunarity": 4, + "exponent": 2, + "brightness": 0, + "contrast": 0, "clamp_min": 0, "clamp_max": 1, - "seed": 474669046020372, + "seed": 477685752000597, "device": "cpu", "optional_vae": [ "4", @@ -81,25 +87,25 @@ }, "13": { "inputs": { - "seed": 484066073734968, - "steps": 8, + "seed": 686880884118590, + "steps": 10, "cfg": 1.8, - "sampler_name": "dpmpp_2m_sde", + "sampler_name": "dpmpp_sde", "scheduler": "karras", "start_at_step": 0, "end_at_step": 10000, "enable_denoise": "false", "denoise": 1, "add_noise": "enable", - "return_with_leftover_noise": "enable", + "return_with_leftover_noise": "disable", "noise_type": "brownian_fractal", "noise_blending": "cuberp", "noise_mode": "additive", "scale": 1, "alpha_exponent": 1, - "modulator": 1, + "modulator": 1.05, "sigma_tolerance": 0.5, - "boost_leading_sigma": "false", + "boost_leading_sigma": "true", "guide_use_noise": "true", "model": [ "4", @@ -138,13 +144,13 @@ "Z": 0, "evolution": 0, "frame": 0, - "scale": 5, + "scale": 2.5, "octaves": 5, "persistence": 4, - "lacunarity": 5, - "exponent": 4.28, - "brightness": -0.3, - "contrast": -0.2 + "lacunarity": 3, + "exponent": 2, + "brightness": -0.1, + "contrast": -0.1 }, "class_type": "Perlin Power Fractal Settings (PPF Noise)", "_meta": { @@ -155,12 +161,12 @@ "inputs": { "frequency": 332.65500000000003, "octaves": 32, - "persistence": 1.616, - "num_colors": 256, + "persistence": 1.4000000000000001, + "num_colors": 128, "color_tolerance": 0.05, - "angle_degrees": 180, - "brightness": -0.5, - "contrast": -0.05, + "angle_degrees": 45, + "brightness": -0.25, + "contrast": 0, "blur": 1.3 }, "class_type": "Cross-Hatch Power Fractal Settings (PPF Noise)", @@ -197,57 +203,6 @@ "title": "CLIP Text Encode (Prompt)" } }, - "22": { - "inputs": { - "upscale_by": 2, - "seed": 589846903558615, - "steps": 20, - "cfg": 1.6, - "sampler_name": "heun", - "scheduler": "sgm_uniform", - "denoise": 0.21, - "mode_type": "Linear", - "tile_width": 512, - "tile_height": 512, - "mask_blur": 8, - "tile_padding": 32, - "seam_fix_mode": "Band Pass", - "seam_fix_denoise": 1, - "seam_fix_width": 64, - "seam_fix_mask_blur": 8, - "seam_fix_padding": 16, - "force_uniform_tiles": true, - "tiled_decode": true, - "image": [ - "38", - 0 - ], - "model": [ - "4", - 0 - ], - "positive": [ - "6", - 0 - ], - "negative": [ - "23", - 0 - ], - "vae": [ - "4", - 2 - ], - "upscale_model": [ - "24", - 0 - ] - }, - "class_type": "UltimateSDUpscale", - "_meta": { - "title": "Ultimate SD Upscale" - } - }, "23": { "inputs": { "conditioning": [ @@ -260,23 +215,14 @@ "title": "ConditioningZeroOut" } }, - "24": { - "inputs": { - "model_name": "RealESRGAN_x4plus.pth" - }, - "class_type": "UpscaleModelLoader", - "_meta": { - "title": "Load Upscale Model" - } - }, "26": { "inputs": { "upscale_model": [ - "24", + "58", 0 ], "image": [ - "22", + "39", 0 ] }, @@ -287,7 +233,7 @@ }, "27": { "inputs": { - "factor": 0.5, + "factor": 0.25, "interpolation_mode": "bicubic", "image": [ "30", @@ -313,21 +259,6 @@ "title": "ImageBlur" } }, - "36": { - "inputs": { - "mode": "bicubic", - "factor": 1.25, - "align": "true", - "samples": [ - "13", - 0 - ] - }, - "class_type": "Latent Upscale by Factor (WAS)", - "_meta": { - "title": "Latent Upscale by Factor (WAS)" - } - }, "38": { "inputs": { "samples": [ @@ -343,5 +274,313 @@ "_meta": { "title": "VAE Decode" } + }, + "39": { + "inputs": { + "noise_seed": 690275685743412, + "steps": 16, + "cfg": 7.5, + "base_ratio": 0.85, + "denoise": 0.25, + "scaled_width": [ + "60", + 0 + ], + "scaled_height": [ + "64", + 0 + ], + "noise_offset": 1, + "refiner_strength": 1, + "softness": 0, + "base_model": [ + "40", + 0 + ], + "base_positive": [ + "45", + 0 + ], + "base_negative": [ + "46", + 0 + ], + "refiner_model": [ + "42", + 0 + ], + "refiner_positive": [ + "43", + 0 + ], + "refiner_negative": [ + "44", + 0 + ], + "image": [ + "38", + 0 + ], + "vae": [ + "41", + 2 + ], + "sampler_name": [ + "47", + 0 + ], + "scheduler": [ + "47", + 1 + ], + "upscale_model": [ + "58", + 0 + ] + }, + "class_type": "SeargeSDXLImage2ImageSampler2", + "_meta": { + "title": "Image2Image Sampler v2 (Searge)" + } + }, + "40": { + "inputs": { + "lora_name": "SDXL/SDXLLandskaper_v1-000003.safetensors", + "strength_model": 1, + "strength_clip": 1, + "model": [ + "48", + 0 + ], + "clip": [ + "48", + 1 + ] + }, + "class_type": "LoraLoader", + "_meta": { + "title": "Load LoRA" + } + }, + "41": { + "inputs": { + "ckpt_name": "SDXL/realismEngineSDXL_v20VAE.safetensors" + }, + "class_type": "CheckpointLoaderSimple", + "_meta": { + "title": "Load Checkpoint" + } + }, + "42": { + "inputs": { + "ckpt_name": "SDXL/sdxl_refiner_1.0.safetensors" + }, + "class_type": "CheckpointLoaderSimple", + "_meta": { + "title": "Load Checkpoint" + } + }, + "43": { + "inputs": { + "text": [ + "50", + 0 + ], + "clip": [ + "42", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "44": { + "inputs": { + "text": [ + "51", + 0 + ], + "clip": [ + "42", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "45": { + "inputs": { + "text": [ + "50", + 0 + ], + "clip": [ + "40", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "46": { + "inputs": { + "text": [ + "51", + 0 + ], + "clip": [ + "40", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "47": { + "inputs": { + "sampler_name": "dpmpp_2m_sde", + "scheduler": "karras" + }, + "class_type": "SeargeSamplerInputs", + "_meta": { + "title": "Sampler Settings" + } + }, + "48": { + "inputs": { + "lora_name": "SDXL/add-detail-xl.safetensors", + "strength_model": 1, + "strength_clip": 1, + "model": [ + "41", + 0 + ], + "clip": [ + "41", + 1 + ] + }, + "class_type": "LoraLoader", + "_meta": { + "title": "Load LoRA" + } + }, + "50": { + "inputs": { + "text": "API_PrePrompt" + }, + "class_type": "JWStringMultiline", + "_meta": { + "title": "String (Multiline)" + } + }, + "51": { + "inputs": { + "text": "API_NegativePrompt" + }, + "class_type": "JWStringMultiline", + "_meta": { + "title": "String (Multiline)" + } + }, + "52": { + "inputs": { + "image": [ + "38", + 0 + ] + }, + "class_type": "Image Size to Number", + "_meta": { + "title": "Image Size to Number" + } + }, + "55": { + "inputs": { + "op": "a * b", + "a": [ + "52", + 2 + ], + "b": [ + "65", + 0 + ], + "c": 0 + }, + "class_type": "SeargeFloatMath", + "_meta": { + "title": "Float Math" + } + }, + "58": { + "inputs": { + "model_name": "4x_foolhardy_Remacri.pth" + }, + "class_type": "UpscaleModelLoader", + "_meta": { + "title": "Load Upscale Model" + } + }, + "59": { + "inputs": { + "op": "a * b", + "a": [ + "52", + 3 + ], + "b": [ + "65", + 0 + ], + "c": 0 + }, + "class_type": "SeargeFloatMath", + "_meta": { + "title": "Float Math" + } + }, + "60": { + "inputs": { + "value": [ + "55", + 0 + ], + "mode": "round" + }, + "class_type": "JWFloatToInteger", + "_meta": { + "title": "Float to Integer" + } + }, + "64": { + "inputs": { + "value": [ + "59", + 0 + ], + "mode": "round" + }, + "class_type": "JWFloatToInteger", + "_meta": { + "title": "Float to Integer" + } + }, + "65": { + "inputs": { + "value": 2 + }, + "class_type": "JWFloat", + "_meta": { + "title": "Float" + } } } \ No newline at end of file diff --git a/sijapi/data/sd/workflows/wallpaper.json b/sijapi/data/sd/workflows/wallpaper.json index cb7a4f0..3edaaa0 100644 --- a/sijapi/data/sd/workflows/wallpaper.json +++ b/sijapi/data/sd/workflows/wallpaper.json @@ -10,7 +10,10 @@ }, "6": { "inputs": { - "text": "API_PrePrompt", + "text": [ + "50", + 0 + ], "clip": [ "4", 1 @@ -23,7 +26,10 @@ }, "7": { "inputs": { - "text": "API_NegativePrompt", + "text": [ + "51", + 0 + ], "clip": [ "4", 1 @@ -58,16 +64,16 @@ "Z": 0, "evolution": 0.1, "frame": 1, - "scale": 6.66, + "scale": 2, "octaves": 8, "persistence": 3, - "lacunarity": 6.66, - "exponent": 1, + "lacunarity": 4, + "exponent": 2, "brightness": 0, "contrast": 0, "clamp_min": 0, "clamp_max": 1, - "seed": 300432080108380, + "seed": 477685752000597, "device": "cpu", "optional_vae": [ "4", @@ -81,25 +87,25 @@ }, "13": { "inputs": { - "seed": 1125631171146107, + "seed": 686880884118590, "steps": 10, "cfg": 1.8, - "sampler_name": "dpmpp_2s_ancestral", + "sampler_name": "dpmpp_sde", "scheduler": "karras", "start_at_step": 0, "end_at_step": 10000, "enable_denoise": "false", "denoise": 1, "add_noise": "enable", - "return_with_leftover_noise": "enable", + "return_with_leftover_noise": "disable", "noise_type": "brownian_fractal", "noise_blending": "cuberp", "noise_mode": "additive", "scale": 1, "alpha_exponent": 1, - "modulator": 1, + "modulator": 1.05, "sigma_tolerance": 0.5, - "boost_leading_sigma": "false", + "boost_leading_sigma": "true", "guide_use_noise": "true", "model": [ "4", @@ -138,13 +144,13 @@ "Z": 0, "evolution": 0, "frame": 0, - "scale": 5, + "scale": 2.5, "octaves": 5, "persistence": 4, - "lacunarity": 5, - "exponent": 4.28, - "brightness": -0.3, - "contrast": -0.2 + "lacunarity": 3, + "exponent": 2, + "brightness": -0.1, + "contrast": -0.1 }, "class_type": "Perlin Power Fractal Settings (PPF Noise)", "_meta": { @@ -155,12 +161,12 @@ "inputs": { "frequency": 332.65500000000003, "octaves": 32, - "persistence": 1.616, - "num_colors": 256, + "persistence": 1.4000000000000001, + "num_colors": 128, "color_tolerance": 0.05, - "angle_degrees": 180, - "brightness": -0.5, - "contrast": -0.05, + "angle_degrees": 45, + "brightness": -0.25, + "contrast": 0, "blur": 1.3 }, "class_type": "Cross-Hatch Power Fractal Settings (PPF Noise)", @@ -209,19 +215,10 @@ "title": "ConditioningZeroOut" } }, - "24": { - "inputs": { - "model_name": "RealESRGAN_x4plus.pth" - }, - "class_type": "UpscaleModelLoader", - "_meta": { - "title": "Load Upscale Model" - } - }, "26": { "inputs": { "upscale_model": [ - "24", + "58", 0 ], "image": [ @@ -236,7 +233,7 @@ }, "27": { "inputs": { - "factor": 0.5, + "factor": 0.25, "interpolation_mode": "bicubic", "image": [ "30", @@ -280,62 +277,310 @@ }, "39": { "inputs": { - "upscale_by": 2, - "seed": 687912408861107, - "steps": 20, - "cfg": 1.9000000000000001, - "sampler_name": "heun", - "scheduler": "sgm_uniform", - "denoise": 0.2, - "mode_type": "Linear", - "tile_width": 512, - "tile_height": 512, - "mask_blur": 8, - "tile_padding": 32, - "seam_fix_mode": "Band Pass", - "seam_fix_denoise": 1, - "seam_fix_width": 64, - "seam_fix_mask_blur": 8, - "seam_fix_padding": 16, - "force_uniform_tiles": true, - "tiled_decode": true, + "noise_seed": 690275685743412, + "steps": 16, + "cfg": 7.5, + "base_ratio": 0.85, + "denoise": 0.25, + "scaled_width": [ + "60", + 0 + ], + "scaled_height": [ + "64", + 0 + ], + "noise_offset": 1, + "refiner_strength": 1, + "softness": 0, + "base_model": [ + "40", + 0 + ], + "base_positive": [ + "45", + 0 + ], + "base_negative": [ + "46", + 0 + ], + "refiner_model": [ + "42", + 0 + ], + "refiner_positive": [ + "43", + 0 + ], + "refiner_negative": [ + "44", + 0 + ], "image": [ "38", 0 ], - "model": [ - "4", - 0 - ], - "positive": [ - "6", - 0 - ], - "negative": [ - "23", - 0 - ], "vae": [ - "4", + "41", 2 ], + "sampler_name": [ + "47", + 0 + ], + "scheduler": [ + "47", + 1 + ], "upscale_model": [ - "40", + "58", 0 ] }, - "class_type": "UltimateSDUpscale", + "class_type": "SeargeSDXLImage2ImageSampler2", "_meta": { - "title": "Ultimate SD Upscale" + "title": "Image2Image Sampler v2 (Searge)" } }, "40": { "inputs": { - "model_name": "RealESRGAN_x2.pth" + "lora_name": "SDXL/SDXLLandskaper_v1-000003.safetensors", + "strength_model": 1, + "strength_clip": 1, + "model": [ + "48", + 0 + ], + "clip": [ + "48", + 1 + ] + }, + "class_type": "LoraLoader", + "_meta": { + "title": "Load LoRA" + } + }, + "41": { + "inputs": { + "ckpt_name": "SDXL/realismEngineSDXL_v20VAE.safetensors" + }, + "class_type": "CheckpointLoaderSimple", + "_meta": { + "title": "Load Checkpoint" + } + }, + "42": { + "inputs": { + "ckpt_name": "SDXL/sdxl_refiner_1.0.safetensors" + }, + "class_type": "CheckpointLoaderSimple", + "_meta": { + "title": "Load Checkpoint" + } + }, + "43": { + "inputs": { + "text": [ + "50", + 0 + ], + "clip": [ + "42", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "44": { + "inputs": { + "text": [ + "51", + 0 + ], + "clip": [ + "42", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "45": { + "inputs": { + "text": [ + "50", + 0 + ], + "clip": [ + "40", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "46": { + "inputs": { + "text": [ + "51", + 0 + ], + "clip": [ + "40", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "47": { + "inputs": { + "sampler_name": "dpmpp_2m_sde", + "scheduler": "karras" + }, + "class_type": "SeargeSamplerInputs", + "_meta": { + "title": "Sampler Settings" + } + }, + "48": { + "inputs": { + "lora_name": "SDXL/add-detail-xl.safetensors", + "strength_model": 1, + "strength_clip": 1, + "model": [ + "41", + 0 + ], + "clip": [ + "41", + 1 + ] + }, + "class_type": "LoraLoader", + "_meta": { + "title": "Load LoRA" + } + }, + "50": { + "inputs": { + "text": "API_PrePrompt" + }, + "class_type": "JWStringMultiline", + "_meta": { + "title": "String (Multiline)" + } + }, + "51": { + "inputs": { + "text": "API_NegativePrompt" + }, + "class_type": "JWStringMultiline", + "_meta": { + "title": "String (Multiline)" + } + }, + "52": { + "inputs": { + "image": [ + "38", + 0 + ] + }, + "class_type": "Image Size to Number", + "_meta": { + "title": "Image Size to Number" + } + }, + "55": { + "inputs": { + "op": "a * b", + "a": [ + "52", + 2 + ], + "b": [ + "65", + 0 + ], + "c": 0 + }, + "class_type": "SeargeFloatMath", + "_meta": { + "title": "Float Math" + } + }, + "58": { + "inputs": { + "model_name": "4x_foolhardy_Remacri.pth" }, "class_type": "UpscaleModelLoader", "_meta": { "title": "Load Upscale Model" } + }, + "59": { + "inputs": { + "op": "a * b", + "a": [ + "52", + 3 + ], + "b": [ + "65", + 0 + ], + "c": 0 + }, + "class_type": "SeargeFloatMath", + "_meta": { + "title": "Float Math" + } + }, + "60": { + "inputs": { + "value": [ + "55", + 0 + ], + "mode": "round" + }, + "class_type": "JWFloatToInteger", + "_meta": { + "title": "Float to Integer" + } + }, + "64": { + "inputs": { + "value": [ + "59", + 0 + ], + "mode": "round" + }, + "class_type": "JWFloatToInteger", + "_meta": { + "title": "Float to Integer" + } + }, + "65": { + "inputs": { + "value": 2 + }, + "class_type": "JWFloat", + "_meta": { + "title": "Float" + } } } \ No newline at end of file diff --git a/sijapi/data/sd/workflows/wallpaper_fast.json b/sijapi/data/sd/workflows/wallpaper_fast.json deleted file mode 100644 index d28a51e..0000000 --- a/sijapi/data/sd/workflows/wallpaper_fast.json +++ /dev/null @@ -1,281 +0,0 @@ -{ - "4": { - "inputs": { - "ckpt_name": "Other/dreamshaperXL_v21TurboDPMSDE.safetensors" - }, - "class_type": "CheckpointLoaderSimple", - "_meta": { - "title": "Load Checkpoint" - } - }, - "6": { - "inputs": { - "text": "API_PrePrompt", - "clip": [ - "4", - 1 - ] - }, - "class_type": "CLIPTextEncode", - "_meta": { - "title": "CLIP Text Encode (Prompt)" - } - }, - "7": { - "inputs": { - "text": "API_NegativePrompt", - "clip": [ - "4", - 1 - ] - }, - "class_type": "CLIPTextEncode", - "_meta": { - "title": "CLIP Text Encode (Prompt)" - } - }, - "8": { - "inputs": { - "samples": [ - "13", - 0 - ], - "vae": [ - "4", - 2 - ] - }, - "class_type": "VAEDecode", - "_meta": { - "title": "VAE Decode" - } - }, - "9": { - "inputs": { - "filename_prefix": "API_", - "images": [ - "27", - 0 - ] - }, - "class_type": "SaveImage", - "_meta": { - "title": "Save Image" - } - }, - "11": { - "inputs": { - "batch_size": 1, - "width": 1023, - "height": 1024, - "resampling": "nearest-exact", - "X": 0, - "Y": 0, - "Z": 0, - "evolution": 0, - "frame": 0, - "scale": 5, - "octaves": 8, - "persistence": 1.5, - "lacunarity": 2, - "exponent": 4, - "brightness": 0, - "contrast": 0, - "clamp_min": 0, - "clamp_max": 1, - "seed": 490162938389882, - "device": "cpu", - "optional_vae": [ - "4", - 2 - ] - }, - "class_type": "Perlin Power Fractal Latent (PPF Noise)", - "_meta": { - "title": "Perlin Power Fractal Noise 🦚" - } - }, - "13": { - "inputs": { - "seed": 697312143874418, - "steps": 8, - "cfg": 1.6, - "sampler_name": "dpmpp_2m_sde", - "scheduler": "karras", - "start_at_step": 0, - "end_at_step": 10000, - "enable_denoise": "false", - "denoise": 1, - "add_noise": "enable", - "return_with_leftover_noise": "disable", - "noise_type": "brownian_fractal", - "noise_blending": "cuberp", - "noise_mode": "additive", - "scale": 1, - "alpha_exponent": 1, - "modulator": 1, - "sigma_tolerance": 0.5, - "boost_leading_sigma": "false", - "guide_use_noise": "true", - "model": [ - "4", - 0 - ], - "positive": [ - "20", - 0 - ], - "negative": [ - "7", - 0 - ], - "latent_image": [ - "11", - 0 - ], - "ppf_settings": [ - "14", - 0 - ], - "ch_settings": [ - "15", - 0 - ] - }, - "class_type": "Power KSampler Advanced (PPF Noise)", - "_meta": { - "title": "Power KSampler Advanced 🦚" - } - }, - "14": { - "inputs": { - "X": 0, - "Y": 0, - "Z": 0, - "evolution": 0, - "frame": 0, - "scale": 5, - "octaves": 8, - "persistence": 1.5, - "lacunarity": 2, - "exponent": 4, - "brightness": 0, - "contrast": 0 - }, - "class_type": "Perlin Power Fractal Settings (PPF Noise)", - "_meta": { - "title": "Perlin Power Fractal Settings 🦚" - } - }, - "15": { - "inputs": { - "frequency": 320, - "octaves": 12, - "persistence": 1.5, - "num_colors": 16, - "color_tolerance": 0.05, - "angle_degrees": 45, - "brightness": 0, - "contrast": 0, - "blur": 2.5 - }, - "class_type": "Cross-Hatch Power Fractal Settings (PPF Noise)", - "_meta": { - "title": "Cross-Hatch Power Fractal Settings 🦚" - } - }, - "20": { - "inputs": { - "conditioning_1": [ - "6", - 0 - ], - "conditioning_2": [ - "21", - 0 - ] - }, - "class_type": "ConditioningCombine", - "_meta": { - "title": "Conditioning (Combine)" - } - }, - "21": { - "inputs": { - "text": "API_StylePrompt", - "clip": [ - "4", - 1 - ] - }, - "class_type": "CLIPTextEncode", - "_meta": { - "title": "CLIP Text Encode (Prompt)" - } - }, - "23": { - "inputs": { - "conditioning": [ - "7", - 0 - ] - }, - "class_type": "ConditioningZeroOut", - "_meta": { - "title": "ConditioningZeroOut" - } - }, - "24": { - "inputs": { - "model_name": "ESRGAN_SRx4_DF2KOST_official-ff704c30.pth" - }, - "class_type": "UpscaleModelLoader", - "_meta": { - "title": "Load Upscale Model" - } - }, - "26": { - "inputs": { - "upscale_model": [ - "24", - 0 - ], - "image": [ - "8", - 0 - ] - }, - "class_type": "ImageUpscaleWithModel", - "_meta": { - "title": "Upscale Image (using Model)" - } - }, - "27": { - "inputs": { - "factor": 0.5, - "interpolation_mode": "bicubic", - "image": [ - "30", - 0 - ] - }, - "class_type": "JWImageResizeByFactor", - "_meta": { - "title": "Image Resize by Factor" - } - }, - "30": { - "inputs": { - "blur_radius": 3, - "sigma": 1.5, - "image": [ - "26", - 0 - ] - }, - "class_type": "ImageBlur", - "_meta": { - "title": "ImageBlur" - } - } -} \ No newline at end of file diff --git a/sijapi/routers/note.py b/sijapi/routers/note.py index c600286..8c4ea3c 100644 --- a/sijapi/routers/note.py +++ b/sijapi/routers/note.py @@ -267,7 +267,7 @@ async def generate_banner(dt, location: Location = None, forecast: str = None, m location = locations[0] if not forecast: forecast = await update_dn_weather(date_time, False, location.latitude, location.longitude) - + prompt = await generate_context(date_time, location, forecast, mood, other_context) L.DEBUG(f"Prompt: {prompt}") final_path = await sd.workflow(prompt, scene=OBSIDIAN_BANNER_SCENE, destination_path=destination_path) @@ -333,6 +333,8 @@ async def generate_context(date_time, location: Location, forecast: str, mood: s prompt = "Generate an aesthetically appealing banner image for a daily note that helps to visualize the following scene information: " prompt += "\n".join([display_name, forecast, mood, other_context]) + return prompt + async def get_note(date_time: dt_datetime): diff --git a/sijapi/routers/sd.py b/sijapi/routers/sd.py index 48435db..de093bd 100644 --- a/sijapi/routers/sd.py +++ b/sijapi/routers/sd.py @@ -235,6 +235,7 @@ def get_scene(scene): SD_CONFIG = yaml.safe_load(SD_CONFIG_file) for scene_data in SD_CONFIG['scenes']: if scene_data['scene'] == scene: + L.DEBUG(f"Found scene for \"{scene}\".") return scene_data return None @@ -251,8 +252,13 @@ def get_matching_scene(prompt): count = sum(1 for trigger in sc['triggers'] if trigger in prompt_lower) if count > max_count: max_count = count + L.DEBUG(f"Found better-matching scene: the prompt contains {max_count} words that match triggers for {scene_data.get('name')}!") scene_data = sc - return scene_data if scene_data else SD_CONFIG['scenes'][0] # fall back on first scene, which should be an appropriate default scene. + if scene_data: + return scene_data + else: + L.DEBUG(f"No matching scenes found, falling back to default scene.") + return SD_CONFIG['scenes'][0]