From a75d69eb8ad7429a2004ad18aa3034c706170b63 Mon Sep 17 00:00:00 2001 From: tslil Date: Sun, 26 Jul 2026 17:14:42 +0100 Subject: wallpaper.py: explicit instructions to flux --- wallpaper.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/wallpaper.py b/wallpaper.py index 39e8929..07a7c6e 100755 --- a/wallpaper.py +++ b/wallpaper.py @@ -148,6 +148,7 @@ def step_llm( top_p: float, min_p: float, ctx: str, + explicit_instr: str, ) -> str: logger.info("Loading llm model...") model_path = hf_hub_download( @@ -200,7 +201,8 @@ def step_llm( text = output["choices"][0]["message"]["content"] text = re.sub(r".*?", "", text, flags=re.DOTALL) text = re.sub(r".*", "", text, flags=re.DOTALL) - return text.strip() + text = text.strip() + return text + " " + explicit_instr def step_diffuse( @@ -478,7 +480,7 @@ def parse_args() -> argparse.Namespace: llm.add_argument( "--llm-max-tokens", type=int, - default=200, + default=384, help="Max tokens of prompt to generate.", ) llm.add_argument( @@ -520,6 +522,11 @@ def parse_args() -> argparse.Namespace: help="System prompt for LLM.", ) flux2 = parser.add_argument_group("Flux Klein 4B settings") + flux2.add_argument( + "--flux2-explicit-instructions", + default="No railings, no glass, no people, no objects.", + help="Explicit instructions always provided to the diffusion model.", + ) flux2.add_argument( "--flux2-klein-repo-id", default="unsloth/FLUX.2-klein-4B-GGUF", @@ -609,6 +616,7 @@ def run() -> None: args.llm_top_p, args.llm_min_p, ctx, + args.flux2_explicit_instructions, ) logger.info(f"Prompt: {prompt_text}") -- cgit v1.2.3