Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Prepare and launch LoRA, LoKr, or T-LoRA training through lora-scripts-next (SD-Trainer), Anima-first.
SkillScore82/100
Test results 82
3/3 safety checks passed
32%82%of test cases passed +50 pts
Passed 18 of 22 test cases with the skill, and 7 of 22 without it.
11 fixed7 passed either way4 still failing0 broke
This benchmark measured an earlier version of the skill.
A newer attempt on gemini-3.8-flash on 11/1/2026 did not produce a publishable comparison (graded differently). The snapshot above is the previously measured run.
One test taskI want to train a timestep-aware LoRA (T-LoRA) adapter for Anima. What model module name should be set in `network_module`?
Adds every file the skill has, pinned so you can update it. No account needed.
pip install "decimalai>=0.15"
decimalai skills add rinne414-lora-trainer
claude --plugin-dir "$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.agents"The same install from Python, for a notebook or a setup script.
pip install "decimalai>=0.15"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("rinne414-lora-trainer")
if result.exit_code:
raise SystemExit(result.problems)
print("Added. Start Claude Code with the command below.")claude --plugin-dir "$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.agents"Type these in a Claude Code session. No account or API key. It writes the skill and any files it bundles, and asks first when its safety rating isn't Passed.
/plugin marketplace add decimal-labs/decimalai-claude-plugins
/plugin install decimalai@decimalai/decimalai:install rinne414-lora-trainerThe plugin needs python3 and curl on your machine.
No Python or account. Claude Code picks it up in its next session.
curl -fsSL --create-dirs -o .claude/skills/rinne414-lora-trainer/SKILL.md https://app.decimal.ai/s/rinne414-lora-trainer/SKILL.md.claude/skills/rinne414-lora-trainer/SKILL.mdThis gets SKILL.md only. The skill's 5 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[claude-agent-sdk]"
decimalai skills add rinne414-lora-trainerimport asyncio
from claude_agent_sdk import ClaudeAgentOptions
from decimalai.claude_agent_sdk import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
async def main():
question = "Hello!"
async with support.run(question) as run: # one user message, one run
async for message in run.query(options=ClaudeAgentOptions(max_turns=6)):
print(message)
# In a notebook or async code: await main()
asyncio.run(main())Prefer its own loader? ClaudeAgentOptions(plugins=[skills_plugin()], skills="all") reads the same folder. Use one or the other: a skill delivered both ways reaches the prompt twice.
The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[claude-agent-sdk]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("rinne414-lora-trainer")
if result.exit_code:
raise SystemExit(result.problems)
import asyncio
from claude_agent_sdk import ClaudeAgentOptions
from decimalai.claude_agent_sdk import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
async def main():
question = "Hello!"
async with support.run(question) as run: # one user message, one run
async for message in run.query(options=ClaudeAgentOptions(max_turns=6)):
print(message)
# In a notebook or async code: await main()
asyncio.run(main())Prefer its own loader? ClaudeAgentOptions(plugins=[skills_plugin()], skills="all") reads the same folder. Use one or the other: a skill delivered both ways reaches the prompt twice.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/rinne414-lora-trainer/SKILL.mdimport asyncio
from pathlib import Path
from claude_agent_sdk import ClaudeAgentOptions, query
skill = Path(".agents/skills/rinne414-lora-trainer/SKILL.md").read_text()
options = ClaudeAgentOptions(system_prompt=f"You are a helpful agent.\n\n{skill}", max_turns=6)
async def main():
async for message in query(prompt="Hello!", options=options):
print(message)
# In a notebook or async code: await main()
asyncio.run(main())This gets SKILL.md only. The skill's 5 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[openai-agents]"
decimalai skills add rinne414-lora-trainerfrom agents import Agent, Runner
from decimalai.openai_agents import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = Agent(
name=support.name,
instructions=support.instructions, # your prompt, then the skill list
tools=[*support.tools], # your tools, then load_skill
)
# In a notebook or async code: result = await Runner.run(agent, "Hello!")
result = Runner.run_sync(agent, "Hello!")Using SandboxAgent? capabilities=[Shell(), decimalai.openai_agents.sandbox_skills()] points its own loader at the same folder.
The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[openai-agents]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("rinne414-lora-trainer")
if result.exit_code:
raise SystemExit(result.problems)
from agents import Agent, Runner
from decimalai.openai_agents import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = Agent(
name=support.name,
instructions=support.instructions, # your prompt, then the skill list
tools=[*support.tools], # your tools, then load_skill
)
# In a notebook or async code: result = await Runner.run(agent, "Hello!")
result = Runner.run_sync(agent, "Hello!")Using SandboxAgent? capabilities=[Shell(), decimalai.openai_agents.sandbox_skills()] points its own loader at the same folder.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/rinne414-lora-trainer/SKILL.mdfrom pathlib import Path
from agents import Agent, Runner
skill = Path(".agents/skills/rinne414-lora-trainer/SKILL.md").read_text()
agent = Agent(name="support", instructions=f"You are a helpful agent.\n\n{skill}")
# In a notebook or async code: result = await Runner.run(agent, "Hello!")
result = Runner.run_sync(agent, "Hello!")This gets SKILL.md only. The skill's 5 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[openai]"
decimalai skills add rinne414-lora-trainerimport json
from openai import OpenAI
from decimalai.openai import agent_config
client = OpenAI()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
def lookup_order(order_id: str) -> str:
return f"Order {order_id} shipped yesterday."
# Your tools, as Chat Completions takes them, and what answers each.
TOOLS = [{"type": "function", "function": {
"name": "lookup_order",
"description": "Look up the status of an order.",
"parameters": {"type": "object", "properties": {"order_id": {"type": "string"}},
"required": ["order_id"]},
}}]
FUNCTIONS = {"lookup_order": lookup_order}
question = "Where is order A1001?"
with support.run(question) as run: # one user message, one run
# run.system is your prompt, then the skill list.
messages = [{"role": "system", "content": run.system}, run.message]
while True:
reply = client.chat.completions.create(
model="gpt-5.4-mini",
messages=messages,
tools=[*TOOLS, *run.tools], # your tools, then load_skill
).choices[0].message
messages.append(reply)
if not reply.tool_calls:
break
for call in reply.tool_calls:
# load_skill is answered by the run; your own tools by FUNCTIONS.
function = FUNCTIONS.get(call.function.name)
messages.append(run.tool_result(call) or {
"role": "tool", "tool_call_id": call.id,
"content": function(**json.loads(call.function.arguments)) if function
else f"There is no tool named {call.function.name!r}.",
})
print(reply.content)
# The Responses API takes run.response_tools instead of run.tools.The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[openai]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("rinne414-lora-trainer")
if result.exit_code:
raise SystemExit(result.problems)
import json
from openai import OpenAI
from decimalai.openai import agent_config
client = OpenAI()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
def lookup_order(order_id: str) -> str:
return f"Order {order_id} shipped yesterday."
# Your tools, as Chat Completions takes them, and what answers each.
TOOLS = [{"type": "function", "function": {
"name": "lookup_order",
"description": "Look up the status of an order.",
"parameters": {"type": "object", "properties": {"order_id": {"type": "string"}},
"required": ["order_id"]},
}}]
FUNCTIONS = {"lookup_order": lookup_order}
question = "Where is order A1001?"
with support.run(question) as run: # one user message, one run
# run.system is your prompt, then the skill list.
messages = [{"role": "system", "content": run.system}, run.message]
while True:
reply = client.chat.completions.create(
model="gpt-5.4-mini",
messages=messages,
tools=[*TOOLS, *run.tools], # your tools, then load_skill
).choices[0].message
messages.append(reply)
if not reply.tool_calls:
break
for call in reply.tool_calls:
# load_skill is answered by the run; your own tools by FUNCTIONS.
function = FUNCTIONS.get(call.function.name)
messages.append(run.tool_result(call) or {
"role": "tool", "tool_call_id": call.id,
"content": function(**json.loads(call.function.arguments)) if function
else f"There is no tool named {call.function.name!r}.",
})
print(reply.content)
# The Responses API takes run.response_tools instead of run.tools.No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/rinne414-lora-trainer/SKILL.mdfrom pathlib import Path
from openai import OpenAI
client = OpenAI()
skill = Path(".agents/skills/rinne414-lora-trainer/SKILL.md").read_text()
reply = client.chat.completions.create(
model="gpt-5.4-mini",
messages=[
{"role": "system", "content": f"You are a helpful agent.\n\n{skill}"},
{"role": "user", "content": "Hello!"},
],
).choices[0].messageThis gets SKILL.md only. The skill's 5 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[anthropic]"
decimalai skills add rinne414-lora-trainerimport anthropic
from decimalai.anthropic import agent_config
client = anthropic.Anthropic()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
question = "Hello!"
with support.run(question) as run: # one user message, one run
answer = client.beta.messages.tool_runner(
model="claude-haiku-5-5",
max_tokens=4096,
system=run.system, # your prompt, then the skill list
tools=[*run.tools], # your tools, then load_skill
messages=[{"role": "user", "content": question}],
).until_done()The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[anthropic]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("rinne414-lora-trainer")
if result.exit_code:
raise SystemExit(result.problems)
import anthropic
from decimalai.anthropic import agent_config
client = anthropic.Anthropic()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
question = "Hello!"
with support.run(question) as run: # one user message, one run
answer = client.beta.messages.tool_runner(
model="claude-haiku-5-5",
max_tokens=4096,
system=run.system, # your prompt, then the skill list
tools=[*run.tools], # your tools, then load_skill
messages=[{"role": "user", "content": question}],
).until_done()No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/rinne414-lora-trainer/SKILL.mdfrom pathlib import Path
import anthropic
client = anthropic.Anthropic()
skill = Path(".agents/skills/rinne414-lora-trainer/SKILL.md").read_text()
reply = client.messages.create(
model="claude-haiku-5-5",
max_tokens=4096,
system=f"You are a helpful agent.\n\n{skill}",
messages=[{"role": "user", "content": "Hello!"}],
)This gets SKILL.md only. The skill's 5 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[google-genai]"
decimalai skills add rinne414-lora-trainerfrom google import genai
from google.genai import types
from decimalai.google_genai import agent_config
client = genai.Client()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
def lookup_order(order_id: str) -> str:
return f"Order {order_id} shipped yesterday."
# Your functions, as declarations for the model, and what answers each.
TOOLS = [{"function_declarations": [{
"name": "lookup_order",
"description": "Look up the status of an order.",
"parameters_json_schema": {"type": "object", "properties": {"order_id": {"type": "string"}},
"required": ["order_id"]},
}]}]
FUNCTIONS = {"lookup_order": lookup_order}
question = "Where is order A1001?"
with support.run(question) as run: # one user message, one run
config = types.GenerateContentConfig(
system_instruction=run.system, # your prompt, then the skill list
tools=[*TOOLS, *run.tool_params], # your functions, then load_skill
)
contents = [{"role": "user", "parts": [{"text": run.message}]}]
while True:
response = client.models.generate_content(
model="gemini-3.5-flash", contents=contents, config=config,
)
if not response.function_calls:
break
contents.append(response.candidates[0].content)
parts = []
for call in response.function_calls:
# load_skill is answered by the run; your own functions by FUNCTIONS.
# A loop of your own rather than automatic function calling, which
# raises KeyError when the model asks for a function you did not pass.
function = FUNCTIONS.get(call.name)
parts.append(run.tool_result(call) or {"function_response": {
"name": call.name, "id": call.id,
"response": {"result": function(**(call.args or {})) if function
else f"There is no function named {call.name!r}."},
}})
contents.append({"role": "user", "parts": parts})
print(response.text)The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[google-genai]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("rinne414-lora-trainer")
if result.exit_code:
raise SystemExit(result.problems)
from google import genai
from google.genai import types
from decimalai.google_genai import agent_config
client = genai.Client()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
def lookup_order(order_id: str) -> str:
return f"Order {order_id} shipped yesterday."
# Your functions, as declarations for the model, and what answers each.
TOOLS = [{"function_declarations": [{
"name": "lookup_order",
"description": "Look up the status of an order.",
"parameters_json_schema": {"type": "object", "properties": {"order_id": {"type": "string"}},
"required": ["order_id"]},
}]}]
FUNCTIONS = {"lookup_order": lookup_order}
question = "Where is order A1001?"
with support.run(question) as run: # one user message, one run
config = types.GenerateContentConfig(
system_instruction=run.system, # your prompt, then the skill list
tools=[*TOOLS, *run.tool_params], # your functions, then load_skill
)
contents = [{"role": "user", "parts": [{"text": run.message}]}]
while True:
response = client.models.generate_content(
model="gemini-3.5-flash", contents=contents, config=config,
)
if not response.function_calls:
break
contents.append(response.candidates[0].content)
parts = []
for call in response.function_calls:
# load_skill is answered by the run; your own functions by FUNCTIONS.
# A loop of your own rather than automatic function calling, which
# raises KeyError when the model asks for a function you did not pass.
function = FUNCTIONS.get(call.name)
parts.append(run.tool_result(call) or {"function_response": {
"name": call.name, "id": call.id,
"response": {"result": function(**(call.args or {})) if function
else f"There is no function named {call.name!r}."},
}})
contents.append({"role": "user", "parts": parts})
print(response.text)No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/rinne414-lora-trainer/SKILL.mdfrom pathlib import Path
from google import genai
from google.genai import types
client = genai.Client()
skill = Path(".agents/skills/rinne414-lora-trainer/SKILL.md").read_text()
response = client.models.generate_content(
model="gemini-3.5-flash",
contents="Hello!",
config=types.GenerateContentConfig(system_instruction=f"You are a helpful agent.\n\n{skill}"),
)This gets SKILL.md only. The skill's 5 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[langchain]" langchain-openai
decimalai skills add rinne414-lora-trainerfrom langchain.agents import create_agent
from decimalai.langchain import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = create_agent(
"openai:gpt-5.4-mini",
tools=[], # your tools; the middleware adds load_skill
middleware=[support.middleware], # your prompt, the skill list and load_skill
)
result = agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[langchain]" langchain-openaifrom decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("rinne414-lora-trainer")
if result.exit_code:
raise SystemExit(result.problems)
from langchain.agents import create_agent
from decimalai.langchain import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = create_agent(
"openai:gpt-5.4-mini",
tools=[], # your tools; the middleware adds load_skill
middleware=[support.middleware], # your prompt, the skill list and load_skill
)
result = agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/rinne414-lora-trainer/SKILL.mdfrom pathlib import Path
from langchain.agents import create_agent
skill = Path(".agents/skills/rinne414-lora-trainer/SKILL.md").read_text()
agent = create_agent("openai:gpt-5.4-mini", tools=[], system_prompt=f"You are a helpful agent.\n\n{skill}")
result = agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})This gets SKILL.md only. The skill's 5 other files are not included.
CrewAI's own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" "crewai>=1.15.27"
decimalai skills add rinne414-lora-trainerimport decimalai.crewai
from crewai import Agent, Crew, Task
agent = Agent(
role="Support", goal="Help the customer", backstory="A support agent.",
llm=llm, # your own CrewAI LLM
skills=decimalai.crewai.skills(), # the installed folder
tools=decimalai.crewai.skill_tools(), # reads a skill's files, runs its scripts
)
task = Task(description="Hello!", expected_output="an answer", agent=agent)
Crew(agents=[agent], tasks=[task]).kickoff()The same install from Python, for a notebook or a setup script. CrewAI's own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" "crewai>=1.15.27"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("rinne414-lora-trainer")
if result.exit_code:
raise SystemExit(result.problems)
import decimalai.crewai
from crewai import Agent, Crew, Task
agent = Agent(
role="Support", goal="Help the customer", backstory="A support agent.",
llm=llm, # your own CrewAI LLM
skills=decimalai.crewai.skills(), # the installed folder
tools=decimalai.crewai.skill_tools(), # reads a skill's files, runs its scripts
)
task = Task(description="Hello!", expected_output="an answer", agent=agent)
Crew(agents=[agent], tasks=[task]).kickoff()No DecimalAI package. CrewAI's own loader reads the folder, and nothing pins or updates it.
.agents/skills/rinne414-lora-trainer/SKILL.mdfrom pathlib import Path
from crewai import Agent, Crew, Task
agent = Agent(
role="Support", goal="Help the customer", backstory="A support agent.",
llm=llm, # your own CrewAI LLM
skills=[Path(".agents/skills")],
)
task = Task(description="Hello!", expected_output="an answer", agent=agent)
Crew(agents=[agent], tasks=[task]).kickoff()This gets SKILL.md only. The skill's 5 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[adk]"
decimalai skills add rinne414-lora-trainerfrom decimalai.adk import DecimalAIPlugin, agent_config
from google.adk.agents import LlmAgent
from google.adk.apps import App
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = LlmAgent(
name="support", # ADK needs a Python identifier
model="gemini-3.5-flash",
instruction=support.instruction, # your prompt, then the skill list
tools=[*support.tools], # your tools, then load_skill
)
# DecimalAIPlugin makes each invocation of runners built from this App one trace.
app = App(name="support", root_agent=agent, plugins=[DecimalAIPlugin()])Prefer ADK's own loader? SkillToolset(skills=decimalai.adk.skills(), ...) reads the same folder. Use one or the other: a skill delivered both ways reaches the prompt twice.
The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[adk]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("rinne414-lora-trainer")
if result.exit_code:
raise SystemExit(result.problems)
from decimalai.adk import DecimalAIPlugin, agent_config
from google.adk.agents import LlmAgent
from google.adk.apps import App
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = LlmAgent(
name="support", # ADK needs a Python identifier
model="gemini-3.5-flash",
instruction=support.instruction, # your prompt, then the skill list
tools=[*support.tools], # your tools, then load_skill
)
# DecimalAIPlugin makes each invocation of runners built from this App one trace.
app = App(name="support", root_agent=agent, plugins=[DecimalAIPlugin()])Prefer ADK's own loader? SkillToolset(skills=decimalai.adk.skills(), ...) reads the same folder. Use one or the other: a skill delivered both ways reaches the prompt twice.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/rinne414-lora-trainer/SKILL.mdfrom pathlib import Path
from google.adk.agents import LlmAgent
skill = Path(".agents/skills/rinne414-lora-trainer/SKILL.md").read_text()
agent = LlmAgent(
name="support",
model="gemini-3.5-flash",
instruction=lambda context: f"You are a helpful agent.\n\n{skill}",
)This gets SKILL.md only. The skill's 5 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[pydantic-ai]"
decimalai skills add rinne414-lora-trainerfrom pydantic_ai import Agent
from decimalai.pydantic_ai import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = Agent(
"openai:gpt-4o-mini",
name=support.name,
tools=[], # your tools; the capability adds load_skill
capabilities=[support], # your prompt, the skill list and load_skill
)
# In a notebook or async code: result = await agent.run("Hello!")
result = agent.run_sync("Hello!")On the Pydantic AI harness, decimalai.pydantic_ai_harness.skills(project) uses its own loader instead.
The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[pydantic-ai]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("rinne414-lora-trainer")
if result.exit_code:
raise SystemExit(result.problems)
from pydantic_ai import Agent
from decimalai.pydantic_ai import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = Agent(
"openai:gpt-4o-mini",
name=support.name,
tools=[], # your tools; the capability adds load_skill
capabilities=[support], # your prompt, the skill list and load_skill
)
# In a notebook or async code: result = await agent.run("Hello!")
result = agent.run_sync("Hello!")On the Pydantic AI harness, decimalai.pydantic_ai_harness.skills(project) uses its own loader instead.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/rinne414-lora-trainer/SKILL.mdfrom pathlib import Path
from pydantic_ai import Agent
skill = Path(".agents/skills/rinne414-lora-trainer/SKILL.md").read_text()
agent = Agent("openai:gpt-4o-mini", instructions=f"You are a helpful agent.\n\n{skill}")
# In a notebook or async code: result = await agent.run("Hello!")
result = agent.run_sync("Hello!")This gets SKILL.md only. The skill's 5 other files are not included.
Deep Agents' own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" deepagents
decimalai skills add rinne414-lora-trainerimport decimalai.deepagents
from deepagents import create_deep_agent
agent = create_deep_agent(model=model, **decimalai.deepagents.skills())
agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})The default backend reads files but has no shell. To run a skill's scripts, pass skills(backend=LocalShellBackend(...)).
The same install from Python, for a notebook or a setup script. Deep Agents' own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" deepagentsfrom decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("rinne414-lora-trainer")
if result.exit_code:
raise SystemExit(result.problems)
import decimalai.deepagents
from deepagents import create_deep_agent
agent = create_deep_agent(model=model, **decimalai.deepagents.skills())
agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})The default backend reads files but has no shell. To run a skill's scripts, pass skills(backend=LocalShellBackend(...)).
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/rinne414-lora-trainer/SKILL.mdfrom pathlib import Path
from deepagents import create_deep_agent
skill = Path(".agents/skills/rinne414-lora-trainer/SKILL.md").read_text()
agent = create_deep_agent(model=model, system_prompt=f"You are a helpful agent.\n\n{skill}")
agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})This gets SKILL.md only. The skill's 5 other files are not included.
Its own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" agent-framework
decimalai skills add rinne414-lora-trainerimport asyncio
from agent_framework import Agent
from decimalai.agent_framework import skills
agent = Agent(client=client, instructions="You are a helpful agent.", context_providers=[skills()])
asyncio.run(agent.run("Hello!"))It caches skills by default, so restart the process after decimalai skills update.
The same install from Python, for a notebook or a setup script. Its own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" agent-frameworkfrom decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("rinne414-lora-trainer")
if result.exit_code:
raise SystemExit(result.problems)
import asyncio
from agent_framework import Agent
from decimalai.agent_framework import skills
agent = Agent(client=client, instructions="You are a helpful agent.", context_providers=[skills()])
asyncio.run(agent.run("Hello!"))It caches skills by default, so restart the process after decimalai skills update.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/rinne414-lora-trainer/SKILL.mdimport asyncio
from pathlib import Path
from agent_framework import Agent
skill = Path(".agents/skills/rinne414-lora-trainer/SKILL.md").read_text()
agent = Agent(client=client, instructions=f"You are a helpful agent.\n\n{skill}")
asyncio.run(agent.run("Hello!"))This gets SKILL.md only. The skill's 5 other files are not included.
Strands' own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" strands-agents
decimalai skills add rinne414-lora-trainerfrom decimalai.strands import skills
from strands import Agent
from strands.vended_tools import file_editor, shell
agent = Agent(
model=model, # always pass one: the default is Amazon Bedrock
system_prompt="You are a helpful agent.",
tools=[file_editor, shell],
plugins=[skills()],
)
agent("Hello!")Strands loads an agent's skills once, so build the agent again after decimalai skills update.
The same install from Python, for a notebook or a setup script. Strands' own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" strands-agentsfrom decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("rinne414-lora-trainer")
if result.exit_code:
raise SystemExit(result.problems)
from decimalai.strands import skills
from strands import Agent
from strands.vended_tools import file_editor, shell
agent = Agent(
model=model, # always pass one: the default is Amazon Bedrock
system_prompt="You are a helpful agent.",
tools=[file_editor, shell],
plugins=[skills()],
)
agent("Hello!")Strands loads an agent's skills once, so build the agent again after decimalai skills update.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/rinne414-lora-trainer/SKILL.mdfrom pathlib import Path
from strands import Agent
skill = Path(".agents/skills/rinne414-lora-trainer/SKILL.md").read_text()
agent = Agent(model=model, system_prompt=f"You are a helpful agent.\n\n{skill}")
agent("Hello!")This gets SKILL.md only. The skill's 5 other files are not included.
Adds every file the skill has, pinned so you can update it. Cursor, Copilot, Cline and Warp read this folder by themselves.
pip install "decimalai>=0.15"
decimalai skills add rinne414-lora-trainerNo Python or account. Cursor, Copilot, Cline and Warp read this folder by themselves.
curl -fsSL --create-dirs -o .agents/skills/rinne414-lora-trainer/SKILL.md https://app.decimal.ai/s/rinne414-lora-trainer/SKILL.md.agents/skills/rinne414-lora-trainer/SKILL.mdThis gets SKILL.md only. The skill's 5 other files are not included.
Give its text to your model as instructions. No account or package needed.
This gets SKILL.md only. The skill's 5 other files are not included.
Raw files: /s/rinne414-lora-trainer/SKILL.md · /s/rinne414-lora-trainer.json
Fetch the file and give its text to your model as instructions. No account or package needed.
curl -fsSL https://app.decimal.ai/s/rinne414-lora-trainer/SKILL.mdcurl -fsSL https://app.decimal.ai/s/rinne414-lora-trainer.jsonThis gets SKILL.md only. The skill's 5 other files are not included.
You don't need a DecimalAI account.
Saved prompts and skills, pinned versions, and traces of this skill in your runs. DecimalAI does not run your agent.
Claude Code reads files from your project, so DecimalAI config does not apply there.
On Claude Agent SDK: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On OpenAI Agents: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On OpenAI SDK: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On Anthropic: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On Gemini API: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On LangChain: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On CrewAI: set DECIMAL_API_KEY and add decimalai.init(crewai=True) to record runs and skill use. The skill version stays in your repo.
On Google ADK: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On Pydantic AI: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On Deep Agents: set DECIMAL_API_KEY and add decimalai.init(langchain=True) to record runs and skill use. The skill version stays in your repo.
On Microsoft Agent Framework: set DECIMAL_API_KEY and add decimalai.init(otel=True, agent_name="support") to record runs and skill use. The skill version stays in your repo.
On Strands: set DECIMAL_API_KEY and add decimalai.init(otel=True, agent_name="support") to record runs and skill use. The skill version stays in your repo.
Editors read files from your project, so DecimalAI config does not apply there.
Anywhere else: record a use with decimalai.log_skill_activation() inside a trace.
把「训练一个 LoRA」的意图,变成一次受控的训练:准备数据 → 体检 → 组装配置 → 用户确认 → 通过 trainer API 开训 → 监看 log。本 skill 默认 Anima 优先,也支持 SD1.5 / SDXL / Flux。
训练耗时、占显存、难回退。在
POST /api/run之前必须把组装好的配置摊给用户、明确确认;未确认不开训。
底层 = lora-scripts-next(SD-Trainer)的 mikazuki FastAPI(http://127.0.0.1:28000,路由前缀 /api)。完整契约见 ../references/trainer-api.md。
本 skill 的开训与打标只针对 SD-Trainer 的 mikazuki API——trainer-api.md 的契约只对它成立。绝不要把这套 /api/run body 发给别的训练器(kohya_ss GUI、OneTrainer、ai-toolkit…),它们的 API 完全不同。用户在用别的训练器时,按可移植性分层处理:
dataset-doctor 与 fix_dataset.py 是训练器无关的(标准 kohya <repeats>_<concept> + sidecar caption 约定),完整可用,全程离线。anima-params.md / presets.md 的键就是 kohya sd-scripts 词汇(network_dim、unet_lr、repeats/epochs 步数预算)。可以据此给参数建议,或替用户生成一份 kohya 风格 TOML / 命令行,让他们在自己的训练器里手动跑。/api/version 连不上 ≠ 中止一切:数据整理、体检、修复全部离线可做;开训需要 trainer 在线,打标则按底模需要已配置的 sd-image-sorter 或 trainer 端点。
../references/。两条路都必须过 dataset-doctor 闸门,必须确认后才开训。
0. 连 trainer、读显卡。 GET /api/version 确认在跑(连不上 → 让用户启动 run_gui.bat,可建议在输入框输入 ! run_gui.bat 直接在会话里运行)。再 GET /api/graphic_cards 自动读显存——不要问用户显存多大。然后看队列:
python scripts/trainer_state.py queue
ask_user_before_start=true(restored.waiting)时,把 restored.message_zh / message_en 转给用户,先问,同意了才 python scripts/trainer_state.py start-queue --confirmed(它内部是 POST /api/queue/start;不带 --confirmed 会拒绝)。interrupted 里列的是被重启打断的训练:绝不自动重新排队,只告诉用户有这几个,要不要重训由用户在 trainer 里点「重新排队」决定。available=false(老版 trainer 没有队列)就跳过,注明「老版本,已跳过」。1. 收集最少输入。 必需:图片文件夹路径、练单角色/概念还是画风。单角色再明确 1girl / 1boy / 1other;画风 trigger 必须用 @ 前缀。其余自动推:
mychar → mych4r)。写进确认卡让用户改。<concept>-anima-v1;版本号冲突就 +1。2. 自动准备数据。 每步先跑 dry-run 把计划摊给用户,确认一次后加 --apply 执行(fixer 不删文件,原件进 _quarantine/):
<repeats>_<concept> 结构 → fix_dataset.py organize --repeats <R> --concept <name>(R 见第 3 步)。../lora-pipeline/scripts/tag_dataset.py --dataset-dir <concept-dir> --trigger <T> --subject-tag <count>;画风传 --style。快速通道与完整 pipeline 必须使用同一套分段 caption、模型阈值和语义审查。其他底模才用 POST /api/interrogate。doctor.py --trigger <T> --epochs <N> 体检:FAIL/WARN 的每个 issue code 都有对应建议(见 ../dataset-doctor/SKILL.md 修复手册)。把要做的修复一次列全、统一确认,再逐条执行;重检到 PASS,或让用户明确接受剩余 WARN。3. 自动选参。 不要让用户做数学:
repeats = clamp(round(150 / 图片数), 1, 10),epochs = 10(画风 12)→ 约 1500 步仅作首轮预算。doctor 去重后重算实际步数,并通过固定 seed 快照比较决定是否早停。../references/presets.md):显存 ≥16GB → preset 1(角色)/ 2(画风);≤12GB → preset 3(LoKr + blocks_to_swap=16;8GB 改 24)。4. 环境预检 + 确认卡(强制)。 先把组装好的 flat config 存成 JSON,跑:
python scripts/trainer_state.py preflight --config <config.json>
它调 GET /api/engines 与 POST /api/engines/diagnose(带 train_type 和这份 config),把引擎状态、模型文件找不到之类的问题在开训前报出来,不用等启动失败。verdict=problems 时把 engine.reason_* / hint_*、issues、config_issues 里的 reason_zh|en 与 hint_zh|en 原文写进确认卡的「环境」一行并让用户决定;warnings(例如 Windows 上的共享显存提示 windows_sysmem_fallback)照实写一句,不拦;unknown + notes 说明是老版 trainer 没有这些路由,注明「已跳过」。actions_needing_the_user 里的「重新安装」是完整重装,只转述,不替用户点;没问用户之前绝不调用 /api/plugins/anima-lora/repair(脚本里也没有这个命令)。
用人话摊牌,等用户回「确认」:
📋 训练确认卡
- 练什么:角色 LoRA「zkz」 · trigger: zkz(要换就说)
- 数据:32 张图 × 5 重复 × 10 轮 = 1600 步
- 显卡:RTX 4070 12GB → 用省显存配置(LoKr)
- 输出:./output/zkz-anima-v1/,每 2 轮存一个文件
- 底模:Anima(dim32/alpha16 · bf16 · unet_lr 2e-5)
回复「确认」开训;想改哪一项直接说。
5. 开训 + 监看。 同进阶流程第 5–6 步。
1. 收集输入。 train_data_dir(<repeats>_<concept> 的父目录)、trigger word、output_name、模型类型、目标(角色/画风/概念)。缺就问。
2. 闸门:先体检。 调 dataset-doctor 跑 doctor.py --trigger <TRIGGER> --epochs <N> --batch-size <B>:FAIL → 停,先修(用 fix_dataset.py 对应命令)再重检;WARN → 摊给用户确认是否继续;PASS → 继续。
3. 组装 config。 从 ../references/presets.md 选模板,填 <TRAIN_DATA_DIR> / <OUTPUT_NAME>,用 doctor 的 effective_images 估算总步数:
steps_per_epoch = ceil(effective_images / train_batch_size)
total_steps = steps_per_epoch × max_train_epochs # 角色首轮检查区间约 1000–2500
偏离区间就调 repeats/epochs。Anima 官方起点是 rank 32、unet_lr=2e-5;训练器服务端默认 5e-5 不是官方推荐。其余关键项:mixed_precision=bf16、gradient_checkpointing=true、attn_mode 留空自动、Windows max_data_loader_n_workers=0。caption 一律用单行 .txt;不要发送无效的 prefer_json_caption。
4. 摊牌 + 确认(强制)。 列出关键项(模型类型、底模、train_data_dir、network_dim/alpha、unet_lr、epochs、total_steps、output_dir、显存预估),明确征得同意再开训。
5. 开训。 用户确认后:
python scripts/trainer_state.py submit --config <config.json> --confirmed
它 POST /api/run(body = 组装好的 flat config),并跟着新版 trainer 的队列条目找到真正的 task_id(新版总是先回 queued + entry_id,老版直接回 task_id;老版用 Invoke-RestMethod 直接 POST 也行,示例见 trainer-api.md)。--confirmed 只在用户已回「确认」之后才能加。读结果:
status: fail → 把 message 给用户并修正(可再对这段文字跑 failure_catalogue.py --text "<message>" 认原因)。output_name 才是实际用的名字:同名输出已存在或已排队时,trainer 会自动改成 name_2,output_name_renamed = {from, to} 记录了这次改名。必须告诉用户改名了,并且后面的 task_insights.py --output-name、预览图、lora_base_info.py 和结果记录全部用新名字,别用确认卡上的旧名字。task_id 有值 → 用它监看。task_id 为空且 waiting_for_queue_start=true → 队列被扣着或被暂停,告诉用户并先问,同意了再 start-queue --confirmed;不要自己启动。6. 监看。 轮询 GET /api/train/log/tail/{task_id}?limit=240(或让用户开 data.train_log_url / 6008 监控面板)。每次轮询都跑一次故障目录:
python scripts/failure_catalogue.py --task-id <task_id> --state ./insights/log_watch.json
avr_loss=nan、缺模型文件、缺 caption、0 张图、num_repeats < 1、文件夹没写重复次数、不支持的训练类型、页面文件不足(os error 1455)、DLL 加载失败、磁盘满、端口占用、xformers / flash-attn 不可用等。匹配的是训练器真正打印的报错,不会被 --nan_guard、xformers = true、num_repeats: 1 这类参数回显误触发。findings 每条带中英文一句话(message_zh / message_en)和具体修法(fix_zh / fix_en);同一类 60 秒内只报一次,被压下的次数在 suppressed。按用户的语言原文转述,不要自己编原因。missed_lines > 0 表示两次轮询之间日志滚得太快、漏读了一些,缩短轮询间隔;error 非空(task_unknown_to_trainer 等)如实说没读到日志,不要当作「没问题」。done=true 时输出多一个 final_findings:对日志尾部的一次性扫描,每类一条。训练失败或没产出文件时先看它。--file <日志文件> --tail 400,或 --text "<message>"(POST /api/run 失败的 message、队列条目的 error)。Windows:显存溢出到共享内存(训练悄悄变慢)。 显存满了以后 Windows 驱动不一定报 OOM,而是把 CUDA 分配溢出到共享系统内存,训练慢几倍却没有任何报错。开训后在 Windows 上每隔几分钟跑一次(只读,不改任何设置):
python scripts/wddm_sysmem.py --task-id <task_id> --state ./insights/wddm.json
GET /api/tasks 里的 config_path 找到训练进程,经 PowerShell Get-Counter '\GPU Process Memory(pid_<PID>*)\Shared Usage' 读该进程的共享显存,并用 nvidia-smi 看显卡是否快满:共享显存 > 1 GiB 且显卡已用 ≥ 90% 才是 status=warn,announce=true 时把 message_* 和 fix_* 原文转给用户(只第一次出现时 announce=true,之后同一次不再重复提醒)。status=unavailable(非 Windows、计数器名被本地化、读不到该进程)就如实说「无法检查」,不是「没有问题」;status=ok 且带 note_* 说明共享显存虽高但显卡没满,不是溢出。读 loss 曲线和预览图。 开训前记下发出 POST /api/run 的 unix 时间 <LAUNCH_TS>,监看时每隔几分钟(或每个 epoch)跑一次:
python scripts/task_insights.py --task-id <task_id> --out ./insights --output-dir <output_dir> --output-name <output_name> --logging-dir <logging_dir> --since <LAUNCH_TS> --base-model <pretrained_model_name_or_path>
GET /api/tasks/{task_id}/metrics 与 /previews(已按本次任务的起止时间过滤,同名重训不会混进上一次的图和曲线)。脚本优先用它们,输出里 source = trainer_api。<output_dir>/sample 和 TensorBoard 的 logging_dir,source = folder_scan,fallback_because 写明原因。退回扫描时必须带 --since,否则同名旧图和旧曲线会混进来。loss_summary:has_nan_or_inf=true → 按上面的 nan 处理。loss 噪声大,只当辅助:last 明显高于 min 或后半段回升,只说明「值得试更早的快照」,不是定论。预览图落在 --out 目录,每次只看新增的几张。loss_reason / previews_reason 非空表示没拿到数据(没开 enable_preview、没装 tensorboard、还没到第一次出图……),照实转述,不要编数据。output_dir 下:按 save_every_n_epochs 会有多个 epoch 快照(<name>-000002.safetensors …)+ 最终档。
每次训练结束都要报告 base:task_insights.py 的输出里 lora_base 读的是产物 safetensors 文件头(只读头,不加载权重;也可单独跑 python scripts/lora_base_info.py <lora> --base-model <pretrained_model_name_or_path>)。按 key 里最大的 blocks_<n>:只有 0–27 → 28 块(Anima 2B / 1.0);出现 28–39 → 40 块(2.9B)。同时读底模文件头的块数并对比,compatible=false 或 warnings 非空时把原话(中英文都有)转给用户:28 块 LoRA 放到 2.9B 上要先做 key 重映射(如 ComfyUI-Anima-28to40-Lora-Stack 节点),否则会作用到错误的层;40 块 LoRA 在 2B 上无法正确加载。notes 里的「只找到 0–27 块」说明按 key 布局无法区分「从不碰 28–39 块的原生 40 块 LoRA」,照实转述。最终报告里写明:产物是 28 块还是 40 块、配置的底模路径和它的块数。命名沿用 <concept>-anima-v<N>,该约定没有位置放块数标签,所以不改文件名,base 只写进 lora_base。读不了文件头(error)就如实说「未能确认」,不要猜。validate.py 在相同 seed 下与 strength 0 baseline 比较。选择能表达目标、同时仍响应姿势/主体/背景变化的快照。trainer 自带的预览图和 loss(scripts/task_insights.py)只做粗筛辅助,不替代 validate.py 的同 seed 对比。scripts/failure_catalogue.py --task-id <task_id>(done=true 后看 final_findings),把匹配到的中英文说明和修法转给用户;没匹配到任何一类就如实说「没认出原因」,并给出日志尾部原文,不要猜。模型类型(决定 model_train_type 与底模,见 trainer-api.md 映射表):默认 → Anima(anima-lora,networks.lora_anima);用户点名 SDXL / SD1.5 / Flux → sdxl-lora / sd-lora / flux-lora;全量微调 → anima-finetune / sdxl-finetune(Anima ~24GB,先提醒)。
适配器 lora_type(见 anima-params.md):默认 lora;显存紧 / 小文件强风格 → lokr;timestep-aware → tlora(network_dim=32)。
| 需要处理的事 | 读取 / 执行 |
|---|---|
| 开训前体检数据集 / caption | ../dataset-doctor/scripts/doctor.py |
| 一行命令修数据集问题(dry-run → --apply) | ../dataset-doctor/scripts/fix_dataset.py |
API 端点、/api/run body、SSE、打标、显卡查询 | ../references/trainer-api.md |
| 开训前看引擎状态、重启后队列、同名输出被改名、拿到真正的 task_id | scripts/trainer_state.py |
| 日志里出现报错 / 训练失败时认原因并给修法(OOM、NaN、缺文件、页面文件不足…) | scripts/failure_catalogue.py |
| Windows 上训练变慢、怀疑显存溢出到共享内存 | scripts/wddm_sysmem.py |
| 读本次训练的 loss 曲线 / 预览图(优先 trainer API,老版自动退回扫描文件夹) | scripts/task_insights.py |
| 判断产物 LoRA 是 28 块(2B / 1.0)还是 40 块(2.9B),并对比底模 | scripts/lora_base_info.py(或 task_insights.py 输出里的 lora_base) |
| 参数含义、默认值、VRAM、步数预算 | ../references/anima-params.md |
| 起手配置模板(角色/画风/低显存) | ../references/presets.md |
| caption 写法、trigger 取法 | ../references/caption-guide.md |
/api/run 契约发给别的训练器,而是走「适用范围」的分层处理。/api/version);显存来自 /api/graphic_cards,没问用户。dataset-doctor;FAIL 没放行,WARN 已让用户确认。fix_dataset.py 修复都先 dry-run、经用户确认才 --apply;没有手写删除/改写命令。model_train_type 与底模 / network_module 一致(Anima=networks.lora_anima,LoKr=lycoris.kohya,T-LoRA=networks.tlora_anima)。cache_text_encoder_outputs=true、shuffle_caption=false。若显式开启 shuffle,必须用足够的 keep_tokens 或 keep_tokens_separator 保留完整固定前缀,而不是假设 trigger 在首位。total_steps;~1000–2500 只作首轮检查区间,偏离时已说明依据而非硬拦截。bf16;Automagic/CAME 会被服务端强制 bf16。task_insights.py;退回文件夹扫描时带了 --since,并如实转述 loss_reason / previews_reason。failure_catalogue.py;findings 的说明和修法原文转给用户,error / missed_lines 如实说明,没有把「没读到日志」当成「没报错」。wddm_sysmem.py;warn 只转述并建议、没有替用户改驱动设置;unavailable 照实说「无法检查」。trainer_state.py queue(restored.waiting 先问用户,interrupted 不自动重排)和 preflight(reason_* / hint_* 原文转述;老版 trainer 的 404 注明已跳过)。submit 开训并读了 output_name_renamed:改名后的新名字用于输出、预览、lora_base_info 和结果记录,并告诉了用户;没有在用户同意前调用 /api/queue/start,没有调用 /api/plugins/anima-lora/repair。用户:「用 D:/data/mychar 这堆图练个角色 LoRA」(文件夹里是 30 张散图,没 caption)。
/api/version OK;/api/graphic_cards → 4070 12GB。mych4r(mychar 是常见词,做数字变体)。fix_dataset.py organize "D:/data/mychar" --repeats 5 --concept mych4r(dry-run 摊牌 → 确认 → --apply)→ tag_dataset.py --dataset-dir ... --trigger mych4r --subject-tag 1girl → 复查语义审查 → doctor.py --trigger mych4r --epochs 10 → PASS 或剩余 WARN 已接受。POST /api/run → 监看 → 报告 ./output/mych4r-anima-v1/*.safetensors,并提示先试最后一个快照。dataset-doctor(体检 doctor.py,修复 fix_dataset.py)。../references/trainer-api.md;参数 → ../references/anima-params.md;模板 → ../references/presets.md;caption → ../references/caption-guide.md。Automatically, when a task matches. Use when the user asks to train a character, style, or concept LoRA, choose parameters or repeats and epochs, start a run, or monitor training on Anima, SD1.5, SDXL, or Flux. Organize and caption the dataset, run dataset-doctor, choose a documented starting preset from image count and VRAM, show one confirmation card, then call the mikazuki API and monitor its log.
Skills that do similar work, with their headline benchmark lift.
From the same source and nearby in the catalogue.