AGENT SKILL

dalle2-pytorch

Use the DALLE2-pytorch package for DALL-E 2 style text-to-image model APIs, diffusion prior/decoder training, WebDataset data layouts, and tracker/checkpoint workflows.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
dalle2-pytorch
license
MIT
metadata
{ "disco-role": "operating" }
description
Use the DALLE2-pytorch package for DALL-E 2 style text-to-image model APIs, diffusion prior/decoder training, WebDataset data layouts, and tracker/checkpoint workflows.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

DALLE2-pytorch

Use this repo skill when a task involves the dalle2-pytorch package, DALL-E 2 style CLIP-latent text-to-image generation, diffusion prior training, cascaded decoder training, DALLE2 checkpoints, WebDataset embedding data, or the package's training/experiment tracking utilities.

What This Skill Covers

  • Public Python APIs for DALLE2, DiffusionPriorNetwork, DiffusionPrior, Unet, Decoder, CLIP adapters, VQGAN/VAE latent diffusion, inpainting, tokenization, and the dream CLI.
  • JSON config classes and bundled training launchers for decoder and diffusion-prior training.
  • WebDataset and EmbeddingReader data layouts, sidecar embedding folders, shard/index validation, trackers, checkpoint loading, and checkpoint saving.
  • Troubleshooting for install/import, CLIP downloads, CPU vs GPU expectations, config validation, data layout, tracker credentials, and checkpoint format mismatches.

Install And Minimal Check

Install the public package:

python -m pip install dalle2-pytorch

Run the bundled package check from this skill directory:

python scripts/check_install.py --mode imports
python scripts/check_install.py --mode cli-help

For a CPU-only synthetic API smoke test that avoids CLIP downloads and model weights:

python sub-skills/generation-and-api/scripts/check_dalle2_runtime.py --mode tiny-forward

Choose A Sub-Skill

generation-and-api

Read sub-skills/generation-and-api/SKILL.md for Python model construction and generation tasks:

  • Build or call DALLE2, DiffusionPrior, Decoder, Unet, CLIP adapters, or VQGanVAE.
  • Use dream, load generation checkpoints, tokenize prompts, sample images, or perform decoder inpainting.
  • Debug checkpoint architecture mismatches, CLIP weight downloads, CPU/GPU limitations, inpaint mask shape, or classifier-free guidance.

training-and-configs

Read sub-skills/training-and-configs/SKILL.md for training and configuration tasks:

  • Author/validate TrainDecoderConfig or TrainDiffusionPriorConfig JSON.
  • Use DecoderTrainer or DiffusionPriorTrainer directly.
  • Build python or accelerate launch commands, run bundled training wrappers, resume/save trainer checkpoints, or debug unet_training_mask, resampling, DeepSpeed fp16, and config errors.

data-and-tracking

Read sub-skills/data-and-tracking/SKILL.md for data and experiment-management tasks:

  • Validate decoder WebDataset shard names, sample keys, sidecar image/text embedding folders, shard_width, or index_width.
  • Use ImageEmbeddingDataset, create_image_embedding_dataloader, get_reader, make_splits, or PriorEmbeddingDataset.
  • Configure console/W&B logging, local/URL/W&B checkpoint loading, or local/W&B/HuggingFace saving.

Important Constraints

  • Real training and useful image sampling normally need GPU memory and trained checkpoints. CPU is suitable for imports, config parsing, CLI help, and tiny synthetic forward-loss tests.
  • CLIP adapters (OpenAIClipAdapter, OpenClipAdapter) may download weights and require network/cache. Do not instantiate them in offline smoke checks unless weights are already cached.
  • Training examples may need datasets, W&B/HuggingFace/S3 credentials, metric assets, and long runtime. Validate configs and data layout before launch.
  • The dream CLI expects a combined DALLE2 checkpoint with package-expected init/model keys; trainer checkpoints are a different format.
  • If clip-anytorch fails because pkg_resources is missing, install setuptools<81 and rerun python -m pip check.

Root References

Self-Containment Rule

Use the bundled references and scripts in this skill tree. Do not require future agents to open, run, or copy scripts, docs, configs, tests, or examples from an original DALLE2-pytorch checkout. When a user wants to train in a checkout intentionally, treat that checkout as their working project, not as this skill's required evidence source.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351