conditioning-guidance
Use denoising-diffusion-pytorch conditioning and guidance APIs: classifier-free guidance, classifier-gradient cond_fn guidance, and XMWrapper multi-candidate loss.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- conditioning-guidance
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Use denoising-diffusion-pytorch conditioning and guidance APIs: classifier-free guidance, classifier-gradient cond_fn guidance, and XMWrapper multi-candidate loss.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/api-reference.md4.3 KB
- 参考文档references/troubleshooting.md2.8 KB
- 参考文档references/workflows.md3.1 KB
03 SKILL.md 正文
Conditioning Guidance
Use this sub-skill for conditioning and guidance surfaces in denoising-diffusion-pytorch: classifier-free guidance, class-label sampling controls, external classifier-gradient cond_fn guidance, and XMWrapper multi-candidate loss selection.
Route here when
- The task mentions classifier-free guidance, class conditioning,
num_classes, class labels,classes,cond_drop_prob,cond_scale,rescaled_phi, or CFG++ /use_cfg_plus_plus. - The task asks for an external classifier
cond_fn,guidance_kwargs, classifier-gradient sampling, label-conditioned classifier logits, or guidance shape/device debugging. - The task asks about
XMWrapper, explorative / multi-candidate loss,candidates,max_batch_size,random_time_method, orrandom_time_kwarg.
Route elsewhere for base setup
- 2D image
Unet,GaussianDiffusion, image folders,Trainer, FID, DDIM/DDPM basics, interpolation without classes, or RePaint setup: ../image-diffusion/SKILL.md. - 1D tensors,
Unet1D,GaussianDiffusion1D,Dataset1D,Trainer1D, sequence layout, sequence sampling, orchannel_first: ../sequence-diffusion/SKILL.md. - Karras models, continuous-time wrappers, learned variance, weighted objectives, simple diffusion, flash/SDPA attention, or other advanced variants: ../advanced-variants/SKILL.md.
Operating map
- Read references/api-reference.md for import paths, signatures, tensor contracts, and guidance-specific semantics.
- Read references/workflows.md for safe recipes: CFG loss/sample, classifier-gradient
cond_fn,XMWrapper, and candidate chunking. - Read references/troubleshooting.md for label shape errors, CFG schedule assertions, guidance strength issues,
cond_fngradient failures, andXMWrapperfailures. - Run scripts/smoke_conditioning_guidance.py after installing the package to verify tiny CPU or CUDA guidance checks without training, downloads, or data files.
Safe defaults
For quick local checks, keep models tiny: dim=8, dim_mults=(1,), channels=1, image_size=8 or seq_length=8, timesteps=8, sampling_timesteps=4, random tensors in [0, 1], candidates=2, and max_batch_size no larger than batch * candidates.
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.