The PAI ArtLab ModelScope training tool is a LoRA model training tool jointly developed by the Alibaba ModelScope and PAI ArtLab teams. It lets you use a small number of images to rapidly perform LoRA fine-tuning on large models like Qwen-Image, Qwen-Image-Edit, Z-Image, and FLUX to get custom LoRA models in your desired style. This tool offers a training experience identical to that in the ModelScope AIGC zone and uses dedicated PAI resources, so your training jobs start without queuing.
Log on to the PAI ArtLab console.
Prerequisites
-
You have completed PAI ArtLab activation and authorization.
-
(Optional) You have claimed free trial resources, a coupon, or purchased a resource package. For more information, see PAI ArtLab billing.
Please use the resources, coupon, or resource package within their validity period. For details, see View usage and validity period.
Launch the tool
Log on to PAI ArtLab. On the Toolkit page, click the ModelScope Model Training card to launch the tool. The ModelScope Model Training tool has the following resource requirements:
-
Recommended configuration: CPU/memory ≥ 8-core 64 GiB, 96 GB of GPU memory.
-
Minimum configuration: CPU/memory ≥ 8-core 64 GiB, 48 GB of GPU memory. Using a lower configuration might slightly reduce the LoRA training quality for some larger models.
Procedure
Step 1: Upload training data
The ModelScope Model Training tool offers two methods for uploading training data:
-
Method 1: Directly upload images from your local machine on the Initiate Training page.
-
Method 2: First create a dataset and upload images on the Data Management page, then select the existing dataset on the Initiate Training page.
The right side of the Initiate Training page lists the training data requirements: images should have distinct features, varied angles, be between 512 and 2048 pixels in width and height, and be between 10 and 100 in number. Images must not be blurry or contain watermarks.
For Method 1, upload images directly from your local device. Only images are supported; annotation files are not. A single training task supports a maximum of 1,000 images, as LoRA fine-tuning scenarios typically do not require more images.
For Method 2, create a dataset and upload images on the Data Management page. If you have annotation files, you can upload a compressed package containing both images and annotation files. The annotation files must be in .txt format and named to match the corresponding image files (for example, 1.png and 1.txt, 2.png and 2.txt).
Step 2: Preprocess images
After you upload an image dataset, the tool offers flexible preprocessing options. For example, you can use the JoyCaption model to label your images with rich, accurate text descriptions. You can also manually edit the annotation content.
If you upload images directly on the Initiate Training page, you can view the generated training dataset and its corresponding annotation information on the Data Management page after the training task starts. If you perform annotation on a dataset from the Data Management page, the results are displayed directly in the dataset.
Note that image preprocessing is an optional step. If you do not label the images beforehand, the tool automatically labels them during the training process. However, you cannot manually modify the image annotations mid-training.
The automatic operation bar at the bottom of the training page includes four preprocessing functions: Image Tagging, Image Cropping, Batch Add Text, and Batch Clear Text.
Select all the images you want to process. In the operation panel that appears at the bottom of the page, set Operation Type to Image Tagging and Tagging Model to JoyCaption Beta, and then click Start Processing.
The labeling results are displayed in English below each image. The page also supports other automatic operations such as Image Cropping, Batch Add Text, and Batch Clear Text.
Step 3: Configure training parameters
On the left side of the Initiate Training page, select a base model and configure the training parameters.
Base models for image generation and image editing are currently supported, and video models will be added soon. You can choose a model based on your requirements. Image generation models support training for models such as Qwen-Image, Z-Image, and FLUX. Image editing models support training for models like Qwen-Image-Edit, and also support multi-image (image group) training.
Training parameters include:
-
Repeats per Image: Defines the number of times each image is used during training. Adjusting this parameter affects how deeply the model learns from each sample.
-
Training Epochs: Sets the number of complete passes the model makes over the entire dataset. Adjust this parameter to balance training effectiveness and efficiency.
-
LoRA Model Name: Defines a custom name for the model output after training.
-
Model Trigger Word (optional): Enter a word that corresponds to the training concept. Avoid common English words. Using the pinyin of the concept is recommended.
If you have more advanced training needs, click the Advanced Parameters panel to customize additional training parameters.
The Advanced Parameters panel includes seven configuration tabs on the right: Sample Image Settings, Save Settings, Learning Rate & Optimizer, Dataset Settings, Network Settings, Special Features, and Advanced Settings. In the main area on the left, you can set parameters such as Total Learning Rate (default: 0.0001), Optimizer (default: AdamW), Image Resolution (width and height, default: 1328), and Network rank dim (default: 16). You can also enable the LoRA+ switch and adjust the LoRA+ Lambda learning rate multiplier (default: 3).
Step 4: Start training
After confirming that the basic information is correct, click the "Start Training" button to submit the training task.
Step 5: Monitor training progress
After you submit a training task, a new task card appears on the Training Management page.
You can click this card to view the details of the training task and its current status.
A training task can have the following statuses:
-
Queuing
-
Training
-
Training Completed
-
Training Failed
-
Timeout Termination: If a task enters this state, you can click the "Restart" button in the upper-right corner of its card to resume training.
The task card displays information such as the training name, duration, LoRA type, and start time. A delete button is available in the upper-right corner of the card.
On the training task details page, the lower-left corner shows LoRA checkpoint information. The tool saves a new LoRA checkpoint at an interval defined by the "Save one LoRA every N epochs" setting in the Advanced Parameters. Each LoRA checkpoint generates a sample image, and the model from each checkpoint can be downloaded.
The right side of the page displays the training parameter details.
PAI ArtLab automatically imports the generated LoRA checkpoint models into its Models module. You can find the trained LoRA models on the My Models page.
To navigate there, click Models in the left-side navigation pane, and then select the My Models tab at the top.
Step 6: Generate images
In the ComfyUI Dedicated Edition, LoRA nodes can directly load models trained in the ModelScope Model Training tool, enabling you to use them for personalized creation.
In the LoRA Loader node, click the model name drop-down menu. Use the Filter list search box to find and select your trained AliyunICON model file, such as AliyunICON_20251211164518/AliyunICON_10.safetensors.