A Tkinter-based planner UI for building, validating, exporting, and running model merge workflows. It is designed to sit on top of Chattiori-Model-Merger and gives you a visual editor for checkpoint merges, LoRA bake steps, download/local model registration, notebook generation, execution monitoring, and optional Hugging Face upload.
-
Plan Creator UI for editing merge workflows line by line.
-
Structured plan editing with support for:
- Checkpoint Merge
- LoRA Bake
The below functions is integrated to the system automatically
- Download Model
- Local Model
- Remove Model
-
Base model switching for multiple families:
- Stable Diffusion 1.5
- Stable Diffusion XL
- Flux
- Z-Image
- Anima
-
Ratio modes:
- Single
- Block weight
- Elemental
-
Legacy plan text compatibility (
CM,LB,LC,+,-) alongside structured internal plan data. -
Notebook export and execution using generated Jupyter notebooks.
-
Execution console with:
- IDLE log view
- raw Jupyter output
- rendered notebook output view
- progress tracking
- stop button for running jobs
-
Pre-validation / issue explanation UI to help locate missing references, duplicate aliases, unreferenced outputs, and similar plan problems.
-
Optional Hugging Face upload for the newest generated
.safetensorsfile. -
Optional T2I run stage after merge execution.
-
Auto-detection / assisted install of the backend merger repository.
This planner is currently composed of the following main files:
main.py— desktop UI, validation, console, notebook execution integration, upload helper, and general planner interaction.plan.py— plan normalization, legacy text parsing/export, command generation, notebook compilation, runtime helper code.install_planner_deps.py— dependency installer and backend repository bootstrapper.
After setup, the planner expects the Chattiori backend to exist at one of these locations:
tools/chattiori_model_mergetools/chattiori_model_merger
The default installer target is:
tools/chattiori_model_merger
- Python 3.10+ is recommended.
The included installer script installs these packages automatically:
requestsfilelockfake_useragenthuggingface_hubpillowpapermilljupyternbconvertnbformatipythonipykernel
The generated notebook runtime may also install additional runtime packages such as torch, torchvision, diffusers, torchsde, peft, and torchao depending on your environment and run settings.
The generated notebook install stage attempts to use system package managers to install:
aria2git
Supported install paths are included for Linux, macOS, and Windows package managers where available.
This project uses Tkinter. On some Linux distributions, you may need to install the Tk runtime separately if it is not bundled with your Python installation.
git clone https://github.com/Faildes/TC-Model-Merge-Planner-GUI
cd TC-Model-Merge-Planner-GUIpython install_planner_deps.pyThis script will:
- install the Python packages needed by the planner,
- clone or update Chattiori-Model-Merger,
- install that repository's
requirements.txtif present.
python install_planner_deps.py --skip-pip
python install_planner_deps.py --skip-repo
python install_planner_deps.py --check-update
python install_planner_deps.py --force-updatepython main.pyWhen the UI opens, start with the left panel:
-
Base Model
Choose the model family you are planning for. -
Plan Text Path
Set the.txtfile used for loading/saving the plan. -
Workspace Path
Set the working directory used by generated notebooks. -
Model Dir (Opt.)
Optional custom checkpoint directory. -
VAE Dir (Opt.)
Optional custom VAE directory. -
Notebook Title
Sets the output notebook base name. -
HuggingFace Token / CivitAI API
Fill these only if you need authenticated downloads or uploads. -
User/Repo ID
Set this when you want to upload the final result to Hugging Face. -
Notebook Run Options
- Ignore Install Deps
- Upload After Merge
- Run T2I
The planner stores session-style settings in config.tccm.
A typical workflow is:
- Create or load a plan text file.
- Add the necessary source models.
- Build merge and/or LoRA bake steps in Plan Creator.
- Save the plan text.
- Run pre-validation and fix any unresolved aliases or missing references.
- Export a notebook or run it directly.
- Review progress in the console.
- Optionally upload the newest result to Hugging Face.
The planner includes these main actions:
- Run Merge Notebook — generate and execute a notebook from the current plan.
- Save Plan Text — write the current in-memory plan back to the plan file.
- Export as notebook — create a Jupyter notebook without executing it.
- Export as txt — export the compiled text plan.
- Show Console — open the execution console.
- Upload Latest Model — upload the newest
.safetensorsfrom the model directory.
Each plan line has a Model Merge Type. The current implementation supports five line types.
Create a merge step using one of the available merge modes.
Fields include:
- Merge Mode
- Model 0
- Model 1
- Model 2 (only when required)
- Alpha
- Beta (only when required)
- Output Name
- Additional Signatures
Bake one or more LoRAs / LyCORIS models into a checkpoint.
Fields include:
- Checkpoint
- one or more LoRA blocks
- per-LoRA ratio
- Output Name
- Additional Signatures
A single scalar value such as:
0.35
One value per block. This is useful when you want finer layer-level control over transfer strength.
Example shape:
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Free-form elemental text such as layer / element / strength style expressions. The planner also includes popup assistance for elemental editing and resolves candidate JSON files per base model, for example:
elemental_candidates_sdxl.jsonelemental_candidates_anima.json- (future implementation)
elemental_candidates_zimage.json - (future implementation)
elemental_candidates_sd15.json - (future implementation)
elemental_candidates_flux.json
Example style:
IN04:attn:0.12,OUT03:res:0.08
The planner passes extra CLI-style options through the Additional Signatures field.
Recognized @ style tokens include:
@c/@cosine@f/@fine@s/@seed@m/@mode@p/@precision@rank@arch
These are normalized by the plan compiler and appended to the backend commands.
The planner can load and export a legacy text-style plan format. This is useful if you want to version-control plans in plain text.
+ModelAlias, https://example.com/model
LoRA / LyCORIS style:
+MyLoRA, https://example.com/lora, %LR
LC, /path/to/model.safetensors, Checkpoint
-OldAlias
Example style:
CM Base + Donor 0.25 Result @mode WS
Difference / triple-input / beta-using lines are also supported internally and exported according to the active merge mode.
LB BaseModel StyleLoRA:0.8,PoseLoRA:0.35 FinalModel
Below is a minimal example plan:
+BaseModel, https://example.com/base-model
+PoseDonor, https://example.com/pose-model
+HandsLoRA, https://example.com/hands-lora, %LR
CM BaseModel + PoseDonor 0.20 PoseMixed
LB PoseMixed HandsLoRA:0.75 FinalOutput
What this does:
- registers a base checkpoint,
- registers a donor checkpoint,
- registers a LoRA,
- merges the base and donor into
PoseMixed, - bakes the LoRA into
PoseMixedto createFinalOutput.
When you use Run Merge Notebook, the planner will:
- save or materialize the current plan,
- compile the plan into notebook cells,
- prepare install/runtime helper cells,
- execute merge and bake commands,
- stream progress back into the console,
- optionally upload the final model,
- optionally run T2I validation.
The generated notebook runtime also includes support for:
- VAE download and registration,
- progress-style command streaming,
- runtime path resolution for executables,
- model registry tracking,
- cleanup / cache flush helpers.
The Planner Runner console is designed for long-running jobs. It provides:
- current state,
- current step,
- progress text / percent,
- IDLE-style log output,
- raw Jupyter output,
- rendered notebook output,
- a stop button for the current process.
This is especially useful for download-heavy or multi-step notebook workflows.
The planner performs plan validation and highlights problem rows in the plan list. Examples of detected issues include:
- missing checkpoint references,
- missing LoRA references,
- duplicate produced aliases,
- outputs that are never used later,
- disabled lines that break later references.
The pre-validation UI can also show:
- cause details,
- available aliases before a failing line,
- suggested fixes,
- current line payload details.
Make sure the model alias is introduced by an earlier active line and not removed later.
Either connect it into a later step or remove the unused line.
Disabled lines are excluded from export/runtime. Re-enable them if later steps depend on them.
Check that:
User/Repo IDis set,HuggingFace Tokenis valid,- your model directory contains at least one
.safetensorsfile.
Run:
python install_planner_deps.pyagain and verify that tools/chattiori_model_merger exists.
A practical repository layout is:
.
├─ main.py
├─ plan.py
├─ install_planner_deps.py
├─ README.md
├─ tools/
│ └─ chattiori_model_merger/
├─ elemental_candidates_sdxl.json
├─ elemental_candidates_flux.json
└─ ...
You do not need all elemental candidate JSON files immediately, but the planner is already prepared to use them.
- Malkis for the idea about GUI planner
- Crody for implementing auto model recognition
This project also relies on or integrates with:
- Python / Tkinter
- Jupyter / IPython / nbformat / nbconvert / papermill
- Pillow
- huggingface_hub
- requests
- filelock
- fake_useragent
- PyTorch / diffusers ecosystem during notebook runtime
- Planner UI / structured plan workflow / notebook wrapper: this repository