inference-and-export
Run zi2zi checkpoint inference, style interpolation, transition GIF planning, and generator-only export from legacy TensorFlow 1.x checkpoints.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- inference-and-export
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Run zi2zi checkpoint inference, style interpolation, transition GIF planning, and generator-only export from legacy TensorFlow 1.x checkpoints.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/checkpoints-and-outputs.md2.0 KB
- 参考文档references/inference-workflow.md2.5 KB
- 参考文档references/troubleshooting.md2.0 KB
03 SKILL.md 正文
zi2zi inference and export
Use this sub-skill when a task is about generating glyphs from a trained zi2zi checkpoint, interpolating between style labels, creating frame sequences or a GIF, or exporting generator-only variables for later reuse. It does not launch long inference jobs automatically; it explains the checkpoint contract and prints safe command templates.
Use this sub-skill when
- The user has a checkpoint directory and wants generated glyphs.
- The task mentions
infer.py,export.py,model_dir,source_obj,embedding_ids,interpolate,steps,output_gif,uroboros, or exported generator weights. - The user wants to know how inference chooses between single-style generation and random style selection.
- The user needs to diagnose checkpoint restore failures, output-image naming, or interpolation problems.
Route elsewhere
- Data rendering and
.objpackaging go to data-preparation. - Training, fine-tuning, or label shuffling go to training-and-model.
- Compatibility questions go to the root compatibility reference.
Core inference facts
infer.pyrestores generator variables from a checkpoint and uses a source object file to provide images.- If
embedding_idscontains one integer, the model uses that style for every source image. If it contains multiple IDs, the script picks randomly from the list for each batch. interpolate=1asks the model to linearly interpolate between style vectors. Withuroboros=1, the interpolation path closes the loop by appending the first ID to the end of the chain.output_giftriggers GIF compilation from the rendered interpolation frames.export.pysaves generator-only variables, which include the embedding table and generator weights.
Output conventions
- Normal inference writes files named
inferred_%04d.pngin the save directory. - Interpolation writes
frame_<src>_<dst>_step_<idx>.pngfiles. - GIF compilation expects those frame PNGs in the save directory and writes the named GIF beside them.
- Export uses TensorFlow checkpoint naming with a generator model prefix.
Recommended workflow
- Verify the checkpoint directory contains a TensorFlow checkpoint state.
- Decide whether you want one style ID, a random mix, or interpolation between two or more style IDs.
- Confirm the source object file contains paired glyph records and that its batch size is compatible with the inference command.
- Use the command planner to validate flags and paths before launching any long job.
- Inspect outputs after the first few batches, especially if the chosen style labels or batch size do not match the training run.
Read inference-workflow.md for command shapes and evaluation steps. Read checkpoints-and-outputs.md for restore/export expectations and filename conventions. Read troubleshooting.md for checkpoint, batch-size, GIF, and source-object failures.
Bundled helper
- scripts/plan_zi2zi_inference.py validates inference, interpolation, and export arguments and prints the command that a future agent should run in a legacy zi2zi environment.
What not to promise automatically
- Do not promise restoration of a checkpoint without checking that the concrete checkpoint files exist and match the chosen hyperparameters.
- Do not promise a successful interpolation run unless
embedding_idscontains at least two integers. - Do not promise export success if the model directory contains only partial or mismatched checkpoint shards.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.