Webcomic Background

v3.1.0
io.github.tobiasfong/webcomic-background Checked 2 days ago Published 5 days ago

Comic-panel backgrounds with a consistent world bible, rendered by FLUX 3 Klein on local ComfyUI.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

generate_background

Generate a manhwa-style background plate for a comic panel (FLUX 3 Klein). PROMPTING -- rules measured on FLUX.1 and kept for Klein (the far-distance one has already recurred on Klein): • Name what the place IS, as a list of physical objects. No mood, lighting or "cinematic" wording; darken afterwards with grade_plate. • No negatives. There is no negative-prompt parameter, on purpose: the model draws what a prompt names, including what it is told to avoid. • Name whatever fills the far distance (forest, hills, a rampart), or the model fi…

ParameterTypeDescription
prompt *string
height
location
match_canvas_to
projectstring
seed
sketch_path
width

generate_city_scene

Generate a giant city establishing panel from a procedural 3D city ("Metropolis mode"). Builds a 3D gothic city, renders it headless to a composition sketch, and has Klein draw the city the sketch lays out -- geometry from math, the look from the model. Two sources of geometry: • One-shot (`use_plan=False`, default): a self-contained city from `city_seed`. Same seed = same city, forever. • Persistent (`use_plan=True`): the project's GROWABLE city -- the plan in world/<project>/city_plan.json built with add_city_district. Every earlier district re…

ParameterTypeDescription
prompt *string
anchor_x
anchor_z
camerastring
city_seedinteger
focus
heightinteger
projectstring
seed
use_planboolean
widthinteger

generate_prop_scene

Generate a panel of repeated 3D OBJECTS (props) in a scene -- the citygen treatment extended from buildings to objects. Rows of repeated objects (a bike rack, market stalls, carts) fuse, crop or mutate when a model invents their structure. This tool builds real 3D prop meshes, places them with true occlusion, auto-frames a camera so nothing clips, renders a projection-correct sketch, and has Klein draw the scene inside it. On the bike-row sketch every bicycle and the bollard landed exactly where the sketch put them. Args: prompt: The setting around the…

ParameterTypeDescription
prompt *string
camera_anglenumber
camera_elevnumber
heightinteger
n_bikesinteger
objects
projectstring
seed
settingstring
widthinteger

add_city_district

Grow the project's persistent 3D city by one district. The city plan (world/<project>/city_plan.json) is the World Builder's growable 3D model: start with one neighborhood, keep appending districts as the story expands — a neighborhood, then a district, eventually a full city. Every earlier district re-renders identically (each has its own seed), so established panels stay canon. Render it with generate_city_scene(use_plan=True, focus="<district_id>"). Args: district_id: Name to reference later (e.g. "old_town", "docks"). x / z: Where the distric…

ParameterTypeDescription
district_id *string
densitynumber
landmarkboolean
projectstring
rowsinteger
seed
size_dnumber
size_wnumber
tierinteger
typestring
xnumber
znumber

list_city

Show the project's persistent 3D city plan (districts, positions, seeds).

ParameterTypeDescription
projectstring

register_location

Add an approved background to the World Builder bible as canonical for a place. Once registered, future panels of this place can be generated consistently by passing its id as `location` to generate_background. Use this on the version you finally picked (after discarding the ones you didn't like). Args: image_path: The finished background PNG to canonise (copied into world/<project>/). location_id: Short id to reference later (e.g. "iron_cross_slum"). Auto- slugged from name/filename if omitted. name: Human name (e.g. "Iron Cros…

ParameterTypeDescription
image_path *string
descriptionstring
location_id
name
panelstring
projectstring
tags

list_world

List the established locations in a project's World Builder bible.

ParameterTypeDescription
projectstring

list_projects

List the comic projects that have a World Builder bible.

check_status

Check whether the Klein ComfyUI is up, and whether its model files are installed.

grade_plate

Color-grade a finished plate for mood, without touching the original. Use this INSTEAD of asking for mood in a prompt. Mood words ("grimdark", "dim lighting", "deep shadow", "muted palette") dragged FLUX.1 off the manhwa aesthetic into semi-realistic murk (measured, v1.9.0), and the rule carries over to Klein, which takes color words literally. Generate a clean, bright, correctly-styled plate, then darken it here: deterministic, instant, CPU-only, and reversible because the master is never modified. Args: image_path: The plate to grade. preset: "gr…

ParameterTypeDescription
image_path *string
contrast
exposure
out_path
presetstring
saturation
temp
vignette

extract_palette

Read a reference image's dominant colors as PROMPT LANGUAGE. References drive color only if their palette gets into the prompt, and diffusion models can't consume hex — so this returns both the swatches and the words. Point it at anything in `references/` (or any approved plate) and paste the color words straight into a generate_* prompt. Note the stronger option if you want a reference's *whole* look rather than just its colors: pass it as `location`/img2img instead, which inherits its style, palette and composition together (v1.9.0's best result). Args:…

ParameterTypeDescription
image_path *string
ninteger

edit_background

Edit an existing plate with a plain-English instruction (FLUX 3 Klein). Start from a plate you already approved and change one thing, instead of re-rolling. Good for local changes: "remove the person on the bridge", "make the sign board a plain dark lacquered panel", "put rust on the ironwork". With `mask_box`, ONLY that rectangle changes -- Klein redraws the frame and just the box is composited back, so every pixel outside it is untouched. Without one, the whole redrawn frame is returned: fine for global changes, but nothing in the instruction protects the rest o…

ParameterTypeDescription
image_path *string
instruction *string
mask_box
projectstring
restyleboolean
seed