From f6ff68315d16f5e68e1c3b25a039ad2ed29b69dc Mon Sep 17 00:00:00 2001 From: tslil Date: Thu, 23 Jul 2026 19:12:12 +0100 Subject: wallpaper.py: more tweaks, ternary bonsai 4b is slower than gemma:e4b --- wallpaper.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'wallpaper.py') diff --git a/wallpaper.py b/wallpaper.py index 3972f0e..516fc95 100755 --- a/wallpaper.py +++ b/wallpaper.py @@ -404,7 +404,7 @@ def parse_args() -> argparse.Namespace: wall.add_argument( "--taste-sample-frac", type=float, - default=0.6, + default=0.8, help="Fraction of taste keywords randomly sampled per run; lower " "values give more varied, less cluttered prompts.", ) @@ -462,6 +462,9 @@ def parse_args() -> argparse.Namespace: help="Command to run when setting wallpaper.", ) llm = parser.add_argument_group("llm") + llm.add_argument( + "--prompt-only", action="store_true", help="Terminate after running the LLM." + ) llm.add_argument( "--llm-repo-id", default="unsloth/gemma-4-E4B-it-GGUF", @@ -502,9 +505,8 @@ def parse_args() -> argparse.Namespace: "You are a wallpaper art director. " "Given the user's taste and the context, write one detailed text-to-image prompt for a diffusion model. " "You are repeatedly called upon to do this, and must introduce variation into your output. " - "The taste reference lists the architectural themes to build on; improvise around them, or drop some. " - "The output must have no recongnisably human objects (pots, people, buildings, vehicles etc). " - "The scene must look fantastical, in the distant future. " + "The taste reference lists the architectural themes to build on; improvise around them, or drop some if they don't make sense. " + "The scene must look fantastical, set in the distant future. " "The focus is about the strange contrast between provided user tastes and the environment. " "The required biome defines the landscape, vegetation, climate, and colour palette of the scene, and MUST dominate the environment; blend the taste reference's structures into it. " "The required perspective MUST be used as the camera viewpoint of the image; ground it in the biome's terrain, adapting its details so the combination is physically coherent (an open expanse may be sea, sand, snow, grass, or a vast hall floor depending on the biome). " @@ -557,7 +559,7 @@ def parse_args() -> argparse.Namespace: sr.add_argument( "--sr-tile", type=int, - default=256, + default=512, help="Tile size for tiled upscaling; bounds peak memory on " "constrained machines. 0 = full-frame (best quality).", ) @@ -611,6 +613,9 @@ def run() -> None: ) logger.info(f"Prompt: {prompt_text}") + if args.prompt_only: + return + # 3. diffusion at base resolution logger.info( "Diffuse: %dx%d @ %d steps", -- cgit v1.2.3