ModelScope-LoRA 预设管理
A config-file editor disguised as a ComfyUI node
- lora_model_id
- lora_weight
- preset_info
Most of the ModelScope pack's nodes are cloud calls. This one never touches the network - it's a management tool for the pack's LoRA preset list, which lives in modelscope_config.json inside the pack folder. Instead of opening a JSON file by hand, you get four actions in a dropdown: 查看预设 (view presets), 添加预设 (add), 删除预设 (delete), and 保存预设 (save/update an existing one).
The Chinese preset defaults
Here's the thing that'll trip up English users immediately: the whole UI is in Chinese, and the pack ships with five presets tuned for the Chinese social-media aesthetic - 小红书 (Xiaohongshu/RED) style beauties, sweet-girl looks, illustration layouts, and a Douyin hand-held-selfie one. Each preset is just a ModelScope LoRA model ID plus a default weight, e.g. qiyuanai/TikTok_Xiaohongshu_career_line_beauty_v1 at 0.8. If that's not your vibe, that's fine - this node is how you replace them with your own.
Managing your own presets
The workflow for using your own LoRA: set action to 添加预设 (add), type a preset_name, paste the LoRA's ModelScope model ID into lora_model_id, set a default_weight, and run. The node writes the new preset into the config file. Want to fix an existing one's weight or ID? Use 保存预设 with target_preset selected. Use 查看预设 with a target_preset to pull that preset's ID and weight out, or just to list everything - the listing comes back in the preset_info output.
Inputs and outputs
Inputs and outputs, for the record:
- action (required) - one of the four Chinese actions above.
- preset_name - name for a new preset (default "自定义LoRA").
- lora_model_id - the ModelScope LoRA ID to save.
- default_weight (0–2, step 0.1) - the weight new or updated presets store.
- target_preset - which existing preset to view/delete/save; the "无LoRA" (no LoRA) entry is protected from deletion.
- Outputs: lora_model_id (
STRING), lora_weight (FLOAT), and preset_info (STRING) - the human-readable summary you can preview or log.
Two caveats
It's genuinely useful glue, with two caveats. First, the presets it writes are only consumed by this pack's other nodes (the LoRA loaders and the image/edit nodes' lora*_id fields) - it won't register LoRAs for anything else in ComfyUI. Second, the preset list is stored in the pack's own config file, so a clean reinstall or git pull that overwrites modelscope_config.json will silently drop your presets. Back that file up, or keep your presets in a note.
Installing it
Installing is the same as every node in this pack - ComfyUI Manager, searching "ComfyUI ModelScope API Node", or:
cd ComfyUI/custom_nodes
git clone https://github.com/hujuying/ComfyUI-ModelScope-API
then restart. No extra Python dependencies; this node is just JSON wrangling in a node-shaped box. One tip: after you add presets, the dropdowns on the loader nodes are built when the node is created, so drag in a fresh loader (or reload the workflow) to see the new names.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| action | COMBO | 查看预设 | 4 options: 查看预设, 添加预设, 删除预设, 保存预设 |
| preset_nameopt | STRING | 自定义LoRA | — |
| lora_model_idopt | STRING | — | |
| default_weightopt | FLOAT | 0.80–2 | — |
| target_presetopt | COMBO | 无LoRA | 6 options: 无LoRA, Qwen-小红书风格美人, Qwen-小红书甜妹, Qwen-小红薯-风格插画-排版, Qwen-真实人像小红书风格, Qwen-抖音小红书手持手机自拍美女 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| lora_model_id | STRING | — |
| lora_weight | FLOAT | — |
| preset_info | STRING | — |