技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
dalle-training【数据与研究】Train and resume DALLE-pytorch transformer workflows with image-text folders, WebDataset shards, VAE choices, tokenizers, and checkpoints.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill for DALLE transformer training, resume checkpoints, image-text folder/WebDataset preparation, tokenizer choices, model hyperparameters, and DALL-E checkpoint payloads.
references/workflows.md for API and command-style training flows.references/data-formats.md for image-text folder and WebDataset schemas.references/checkpoints-and-tokenizers.md for VAE/DALL-E checkpoint and tokenizer compatibility.references/troubleshooting.md for empty datasets, tokenization, CUDA, W&B, VAE mismatch, and resume failures.scripts/validate_image_text_folder.py before training on a folder dataset.scripts/build_train_dalle_command.py to produce a shell-safe training command template.| Request | Action |
|---|---|
| "Train DALL-E on my image/caption folder" | Run/describe validate_image_text_folder.py, choose VAE path or VAE wrapper, then build a command template. |
| "Use WebDataset" | Read data-formats.md, require --wds image_key,caption_key, and confirm tar/shard/URL/GCS source behavior. |
| "Resume training" | Inspect checkpoint keys; use --dalle_path and keep original model/tokenizer/VAE assumptions. |
| "Use a custom tokenizer" | Read tokenizer section; make sure vocab_size and padding id match checkpoint/training choices. |
| "Write DALLE API code" | Use references/workflows.md and root references/api-reference.md for constructor/forward details. |
import torch
from dalle_pytorch import DiscreteVAE, DALLE
vae = DiscreteVAE(image_size=128, num_layers=3, num_tokens=8192, codebook_dim=512, hidden_dim=256)
dalle = DALLE(dim=512, vae=vae, num_text_tokens=10000, text_seq_len=256, depth=2, heads=8)
text = torch.randint(0, 10000, (4, 256))
images = torch.randn(4, 3, 128, 128)
loss = dalle(text, images, return_loss=True)
loss.backward()
../vae-training/SKILL.md.../generation-and-ranking/SKILL.md.../distributed-and-backends/SKILL.md.Before giving a training answer:
--vae_path, OpenAI VAE, or VQGAN) is chosen deliberately;text_seq_len;