If you trained a ZIT LoRA on ModelScope and are facing a "Deployment Error" on Tensor.Art, this script is for you.
The error usually happens because ModelScope outputs in Diffusers format, while Tensor.Art requires ComfyUI/WebUI layer naming (CMIIW). This Colab script converts your model structure and injects the necessary metadata to make it compatible.
Note: According to reports (shoutout to Jhournee), Qwen-based LoRAs might not have this issue, but standard ZIT models often do.
📝 How to use this script:
Step 1: Install Dependencies
Simply run this cell to set up the environment. No input needed.Step 2: Clone Repository
Enter your ModelScope repo_id (e.g., username/model_name). If your model is private, paste your access_token; otherwise, leave it blank. Run to download.Step 3: Patch & Metadata (The Fix)
Copy the path of the downloaded model into input_file and set a path for the output_file. Enter your lora_name. Run this cell to automatically rename layers and save the fixed file.
⚠️ Final Step:
Once Step 3 is complete, download the fixed .safetensors file from the file browser on the left, and manually upload it to Tensor.Art.
(Cells 4-6 are extra utilities if you need to check the file hash or manage files within Colab).
🔗 Script Link: https://colab.research.google.com/github/sevunk/fixing_layer_name/blob/main/fixing_layer_name.ipynb