Simple web GUI for training Qwen-Image LoRA models using Musubi Tuner.
webgui.py– the Flask/Waitress web GUI.MUSUBITLX_GUI.md– full user guide for the GUI.start_gui.bat– automated setup and launch script for Windows (recommended for first-time users).start_gui.sh– automated setup and launch script for Linux/macOS (recommended for first-time users).
Do not copy this README into your Musubi Tuner folder. (Because Musubi-Tuner already have a readme and we dont want to overwrite it ;) ) Only copy the other filer next to your existing
musubi-tunerinstallation. Or if you dont have Musubi-tuner installed, just clone this repo to a folder and the installation script will solve everything.
You have three ways to install and run MusubiTLX GUI:
These scripts automate the entire setup process and are perfect if you're starting from scratch.
What it does:
- Automatically clones the
musubi-tunerrepository if it's not already installed - Creates a Python virtual environment (
venv) - Installs dependencies (PyTorch, torchvision, musubi-tuner)
- Offers to install optional dependencies (ascii-magic, matplotlib, tensorboard, prompt-toolkit)
- Checks for required model files and offers to download them
- Starts the web GUI server
How to use:
- Download or clone this repository
- Double-click
start_gui.bat(or run it from Command Prompt) - Follow the on-screen prompts
- The GUI will open automatically at
http://127.0.0.1:5000
Requirements:
- Python 3.10+ installed and in your PATH
- Git installed (for automatic cloning)
- PowerShell (for model downloads)
What it does:
- Automatically clones the
musubi-tunerrepository if it's not already installed - Creates a Python virtual environment (
venv) - Installs dependencies (PyTorch, torchvision, musubi-tuner)
- Offers to install optional dependencies (ascii-magic, matplotlib, tensorboard, prompt-toolkit)
- Checks for required model files and offers to download them (using curl or wget)
- Starts the web GUI server in background mode (survives SSH disconnects)
- Can run in foreground mode with
./start_gui.sh --fg
How to use:
- Download or clone this repository
- Make the script executable:
chmod +x start_gui.sh - Run:
./start_gui.sh - The GUI will be available at
http://0.0.0.0:5000 - Use
./start_gui.sh --stopto stop the server - Use
./start_gui.sh --statusto check if it's running
Requirements:
- Python 3.10+ installed
- Git installed (for automatic cloning)
- curl or wget (for model downloads)
Note: The script automatically uses nohup to run the server in the background, so it will continue running even if you disconnect from SSH.
Use this method if you prefer to control each step manually, or if you already have Musubi Tuner installed.
Steps:
-
Clone or install Musubi Tuner manually:
git clone https://github.com/kohya-ss/musubi-tuner.git cd musubi-tuner 2. Copy
webgui.pyandMUSUBITLX_GUI.mdinto themusubi-tunerdirectory. -
Create and activate a virtual environment: python -m venv venv source venv/bin/activate # Linux/macOS venv\Scripts\activate # Windows 4. Install dependencies:
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124 pip install -e . 5. (Optional) Install extra dependencies: pip install ascii-magic matplotlib tensorboard prompt-toolkit
-
Download required model files from Hugging Face:
- DiT Model:
qwen_image_bf16.safetensors - VAE Model:
diffusion_pytorch_model.safetensors - Text Encoder (optional):
qwen_2.5_vl_7b.safetensors
- DiT Model:
-
Start the GUI: python webgui.py 8. Open
http://127.0.0.1:5000in your browser.
If you already have Musubi Tuner set up and working:
- Copy
webgui.pyandMUSUBITLX_GUI.mdto your existing Musubi Tuner directory. - Activate your virtual environment.
- Ensure all dependencies are installed (see Option 2, steps 4-5).
- Run:
python webgui.py - Open
http://127.0.0.1:5000in your browser.
-
Use Option 1 (Automated Scripts) if:
- You're installing for the first time
- You want the easiest setup experience
- You're not comfortable with manual command-line setup
- You want automatic dependency and model file handling
-
Use Option 2 (Manual Installation) if:
- You prefer full control over each step
- You want to understand exactly what's being installed
- You need to customize the installation
- You're an experienced Python developer
-
Use Option 3 (Existing Installation) if:
- You already have Musubi Tuner working
- You just want to add the GUI
- You've already set up your Environment
- Python 3.10 or later
- CUDA-capable GPU with 12GB+ VRAM (24GB+ recommended)
- 64GB+ RAM recommended (32GB + swap may work)
- Windows, Linux, or macOS
The automated setup scripts (start_gui.bat and start_gui.sh) can download required model files for you, or you can download them manually from Hugging Face:
- Required:
- DiT Model:
qwen_image_bf16.safetensors - VAE Model:
diffusion_pytorch_model.safetensors - Text Encoder:
qwen_2.5_vl_7b.safetensors
- DiT Model:
- Virtual environment issues: Make sure Python 3.10+ is installed and accessible from your PATH or venv.
- Missing dependencies: Run
pip install -e .from the musubi-tuner directory. - Model download failures: You can download models manually from the web GUI after starting the server.
- Port already in use: The GUI uses port 5000 by default. Stop any other services using this port.
- Windows script errors: Make sure you're running
start_gui.batfrom Command Prompt or by double-clicking it. - Linux/macOS permissions: Make sure
start_gui.shis executable:chmod +x start_gui.sh
For more detailed information, see MUSUBITLX_GUI.md.
Result in ComfyUI with only trigger word as prompt