Downloads · 30 days
0
licyk/lora_for_invokeai
lora_for_invokeai is a machine learning model from licyk. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
仓库中的 LoRA 已移除其中的 Norm 块,使其兼容 InvokeAI 5.6.0 及以上的版本,避免AttributeError: 'LayerNorm' object has no attribute 'getnumpatches'。
Downloads · 30 days
0
Access
Public
Updated Sep 3, 2026
Repo size
28 GB
Likes
0
Public
Click a slice to open those files.
.safetensors28.1 GB · 100%
From the Hugging Face model README
仓库中的 LoRA 已移除其中的 Norm 块,使其兼容 InvokeAI 5.6.0 及以上的版本,避免AttributeError: 'LayerNorm' object has no attribute 'get_num_patches'。
移除 Norm 层代码。
import os
from safetensors.torch import load_file, save_file
lora_path = "D:/Downloads/BaiduNetdiskDownload/ill-xl-01-rurudo_3-000034.safetensors"
save_path = os.path.join(
os.path.dirname(lora_path),
os.path.splitext(os.path.basename(lora_path))[0] + "_without_norm_block.safetensors"
)
norm_block_list = []
model_weights = load_file(lora_path)
for block, _ in model_weights.items():
if "norm" in block:
norm_block_list.append(block)
for block in norm_block_list:
del model_weights[block]
save_file(model_weights, save_path)