ImageGen
Extensions for the workflows
Every *. file in this folder (or in the folder from - / IMAGEGEN_, in Docker
${IMAGEGEN_) is loaded by build_. Its function apply(b) receives the module
build_ and can change anything in it before the files are written:
b.– all workflows (title → nodes, mapping, video settings)WORKFLOWS b.,WEBAPP b.,ENHANCE_ HINT b.– texts and duration for the web appSUMMARY_ NSFW b.– insert a LoRA slot into the model pathadd_ model_ loras(nodes, {target node: (new ID, LoRA file)})
All files here except the two READMEs are in .. That way your own or private extensions (e.g. LoRAs for
adult content) stay out of the repository.
Example: a “style” choice with a LoRA for “Image to video”
# extras/wan_style.py
STYLE = {"default": 1, "levels": [
{"label": "None", "set": []},
{"label": "Watercolour", "prefix": "watercolor style, ",
"set": [["60", "lora_name", "my_watercolour_high.safetensors"], ["60", "strength_model", 0.8],
["61", "lora_name", "my_watercolour_low.safetensors"], ["61", "strength_model", 0.8]]},
]}
def apply(b):
wf = b.WORKFLOWS["Video aus Bild - Wan 2.2"] # internal title, shown as “Image to video - Wan 2.2”
b.add_model_loras(wf["nodes"], {"8": ("60", "my_watercolour_high.safetensors"),
"9": ("61", "my_watercolour_low.safetensors")})
wf["video"]["action"] = STYLE
The web app shows options under the keys motion (“Motion”) and action (“Action”) as choice buttons. With
"nsfw": True in the option, only users who were given NSFW access by the admin can see them; the server rejects other
levels for everyone else.