跳到正文
cccskills
免费在 GitHub 公开

diffusers

Use this skill for Hugging Face Diffusers tasks: pipeline inference, schedulers, adapters/loaders, training recipes, modular pipelines, conversion helpers, CLI checks, and repo maintenance.

中文简介正在准备中。当前显示原文说明。

集成工具Hugging Face
查看安装方法

包含的文件(40)

  • SKILL.md8.3 KB
  • references/repo-provenance.md3.1 KB
  • references/repo-routing-metadata.json517 B
  • references/troubleshooting.md4.7 KB
  • scripts/check_diffusers_environment.py3.9 KB
  • sub-skills/adapters-and-loaders/references/api-map.md8.7 KB
  • sub-skills/adapters-and-loaders/references/troubleshooting.md10.0 KB
  • sub-skills/adapters-and-loaders/references/workflows.md9.7 KB
  • sub-skills/adapters-and-loaders/scripts/adapter_state_check.py6.7 KB
  • sub-skills/adapters-and-loaders/scripts/single_file_loader_template.py3.8 KB
  • sub-skills/adapters-and-loaders/SKILL.md3.9 KB
  • sub-skills/conversion-and-maintenance/references/cli-and-maintenance.md5.9 KB
  • sub-skills/conversion-and-maintenance/references/conversion-workflows.md7.0 KB
  • sub-skills/conversion-and-maintenance/references/troubleshooting.md5.7 KB
  • sub-skills/conversion-and-maintenance/scripts/conversion_command_builder.py7.4 KB
  • sub-skills/conversion-and-maintenance/scripts/diffusers_cli_probe.py2.6 KB
  • sub-skills/conversion-and-maintenance/SKILL.md3.7 KB
  • sub-skills/modular-pipelines/references/block-workflows.md7.7 KB
  • sub-skills/modular-pipelines/references/custom-blocks.md5.6 KB
  • sub-skills/modular-pipelines/references/testing.md3.5 KB
  • sub-skills/modular-pipelines/references/troubleshooting.md7.0 KB
  • sub-skills/modular-pipelines/scripts/modular_block_skeleton.py3.5 KB
  • sub-skills/modular-pipelines/scripts/modular_import_check.py4.2 KB
  • sub-skills/modular-pipelines/SKILL.md3.0 KB
  • sub-skills/pipelines-and-inference/references/loading-and-runtime.md7.0 KB
  • sub-skills/pipelines-and-inference/references/pipeline-workflows.md8.7 KB
  • sub-skills/pipelines-and-inference/references/troubleshooting.md8.6 KB
  • sub-skills/pipelines-and-inference/scripts/pipeline_env_check.py3.0 KB
  • sub-skills/pipelines-and-inference/scripts/pipeline_invocation_template.py6.0 KB
  • sub-skills/pipelines-and-inference/SKILL.md3.2 KB
  • sub-skills/schedulers/references/scheduler-reference.md11.5 KB
  • sub-skills/schedulers/references/troubleshooting.md9.8 KB
  • sub-skills/schedulers/scripts/scheduler_smoke.py5.6 KB
  • sub-skills/schedulers/SKILL.md4.1 KB
  • sub-skills/training-recipes/references/datasets-and-launch.md4.6 KB
  • sub-skills/training-recipes/references/recipes.md6.2 KB
  • sub-skills/training-recipes/references/troubleshooting.md5.2 KB
  • sub-skills/training-recipes/scripts/dataset_layout_check.py7.7 KB
  • sub-skills/training-recipes/scripts/training_command_builder.py11.0 KB
  • sub-skills/training-recipes/SKILL.md2.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Diffusers

Use this skill when a task involves Hugging Face Diffusers APIs, pipeline wiring, model loading, scheduler configuration, adapters, training command planning, modular pipelines, checkpoint conversion, or maintaining the Diffusers repository.

Start Here

  1. Check whether the user is using Diffusers as a package, editing a Diffusers checkout, or converting/training model assets.
  2. Verify install and optional backends with scripts/check_diffusers_environment.py when imports, CUDA, CLI availability, or optional dependencies are uncertain.
  3. Route to the narrowest sub-skill below instead of reading every reference.
  4. Keep model downloads, Hub pushes, training runs, and conversion jobs opt-in; many Diffusers workflows are network-, credential-, GPU-, or memory-sensitive.
  5. Read references/repo-provenance.md before deciding whether this skill is stale for a current Diffusers checkout.
  6. Use references/troubleshooting.md for cross-cutting install/import/backend failures before diving into workflow-specific troubleshooting.

Installation Baseline

For normal package use, install Diffusers with the backend needed for the task:

python -m pip install diffusers torch accelerate transformers safetensors

For source-checkout development, install editable package dependencies in an isolated environment:

python -m pip install -e .
python -m pip install torch accelerate transformers safetensors

Add extras only when the selected workflow needs them:

  • Training recipes commonly need accelerate, datasets, protobuf, tensorboard, Jinja2, peft, and timm.
  • Quantization and accelerator paths may need bitsandbytes, gguf, optimum-quanto, torchao, nvidia-modelopt, xFormers, ONNX Runtime, OpenVINO, or vendor-specific packages.
  • Flax/JAX, ONNX, TensorRT, Core ML, and other backend workflows require separate backend-specific installs.

Minimal import check:

python - <<'PY'
import diffusers
print(diffusers.__version__)
from diffusers import DiffusionPipeline, DDPMScheduler
print(DiffusionPipeline, DDPMScheduler)
PY

Route by Task

  • Pipeline inference and serving: use sub-skills/pipelines-and-inference/SKILL.md for DiffusionPipeline.from_pretrained, AutoPipeline*, text-to-image, img2img, inpainting, ControlNet/T2I-Adapter/IP-Adapter execution context, callbacks, batching, seeds, device maps, offload, local/offline loading, and server-safe invocation.
  • Schedulers and sampling: use sub-skills/schedulers/SKILL.md for DDIM/DDPM/Euler/DPM-Solver/FlowMatch/LCM schedulers, set_timesteps, custom timesteps/sigmas, prediction_type, Karras/AYS settings, scheduler config round-trips, and sampler troubleshooting.
  • Adapters and loaders: use sub-skills/adapters-and-loaders/SKILL.md for LoRA/PEFT, textual inversion, IP-Adapter, T2I-Adapter, ControlNet loading, single-file checkpoints, adapter fusion/unloading, state-dict validation, and local-file loading plans.
  • Training recipes: use sub-skills/training-recipes/SKILL.md for DreamBooth, LoRA, textual inversion, text-to-image, ControlNet, T2I-Adapter, InstructPix2Pix, SDXL, SD3, Flux, dataset layout checks, and accelerate launch planning.
  • Modular pipelines: use sub-skills/modular-pipelines/SKILL.md for ModularPipeline, pipeline blocks, states, component managers, sequential/loop blocks, custom block packaging, and modular-pipeline tests.
  • Conversion, CLI, and maintenance: use sub-skills/conversion-and-maintenance/SKILL.md for diffusers-cli, environment reports, safe conversion planning, ONNX/export notes, copied-code maintenance, dummy dependency checks, style, and focused repo tests.

Boundary Rules

  • Do not start training, conversion, Hub upload, benchmark, or long inference jobs without explicit user confirmation.
  • Do not assume a GPU-specific package is installed just because the host has GPUs; run the environment checker and inspect torch.cuda.is_available().
  • Do not rely on original Diffusers repo docs, examples, or scripts when using this skill as a standalone runtime skill. The sub-skills include distilled references and safe helpers.
  • When the user is editing a Diffusers checkout, follow the repo's copied-code policy: do not edit # Copied from ... blocks directly unless intentionally breaking the copy link; run copy/style checks before PR handoff.
  • Keep pipeline execution guidance separate from training and conversion guidance. Loading an adapter for inference belongs to adapters/loaders plus pipelines; training that adapter belongs to training recipes.
  • Treat original repo tests and examples as native verification candidates for a checkout, not as runtime dependencies for this skill.

High-Value Helpers

Common Decision Points

  • Package use vs repo maintenance: package use usually routes to pipelines, schedulers, adapters, training, or modular pipelines. Editing source, dependency tables, copied code, or CLI modules routes to conversion/maintenance.
  • Local/offline vs Hub access: prefer local_files_only=True, local config paths, and safetensors for offline or untrusted-file work. Ask before using gated models or private tokens.
  • CPU vs CUDA: CPU is suitable for import checks and skeleton planning. Real generation/training/conversion may need CUDA, bf16/fp16, offload, or smaller fixtures.
  • Adapters vs full model changes: LoRA/textual inversion/IP-Adapter/T2I-Adapter loading is usually reversible and belongs to adapters/loaders; merging or extracting weights belongs to conversion/maintenance; training new adapters belongs to training recipes.
  • Classic vs modular pipelines: use classic pipelines for most user generation tasks; use modular pipelines when the user needs block/state/component customization or custom block packaging.

Verification Expectations

For generated code or guidance, prefer the smallest safe check first:

  • Import and CLI help checks for environment issues.
  • Parser/help or dry-run checks for skill-owned helper scripts.
  • Tiny local fixtures for dataset or adapter path validation.
  • Focused native pytest selections only when working in a Diffusers checkout and the commands are short, deterministic, and safe.
  • Skip and document checks that require network, credentials, real model weights, long training, destructive writes, or unavailable hardware.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Routes 3D ResNets PyTorch video action-recognition workflows across training, inference, and data preparation.

中文简介正在准备中。当前显示原文说明。

VectorSpaceLab/AREX-Skill3392026年9月3日 更新

3ddfa

免费

Guide 3DDFA Python inference, geometry rendering, training/evaluation, and optional C++ ONNX workflows for 3D dense face alignment.

中文简介正在准备中。当前显示原文说明。

VectorSpaceLab/AREX-Skill3392026年9月3日 更新

3ddfa-v2

免费

Routes 3DDFA_V2 face-alignment setup, still-image demos, video tracking, and ONNX benchmarking workflows.

中文简介正在准备中。当前显示原文说明。

VectorSpaceLab/AREX-Skill3392026年9月3日 更新

ab3dmot

免费

Operate AB3DMOT 3D multi-object tracking workflows for KITTI and nuScenes data, tracking, evaluation, and visualization.

中文简介正在准备中。当前显示原文说明。

VectorSpaceLab/AREX-Skill3392026年9月3日 更新

Use Hugging Face Accelerate for PyTorch training-loop migration, distributed launch/configuration, DeepSpeed/FSDP/TPU backend setup, big-model inference/offload, checkpointing, tracking, and troubleshooting.

中文简介正在准备中。当前显示原文说明。

VectorSpaceLab/AREX-Skill3392026年9月3日 更新

acme

免费

Route Acme reinforcement-learning framework tasks across core loops, replay/data, JAX agents, and TensorFlow/Sonnet agents.

中文简介正在准备中。当前显示原文说明。

VectorSpaceLab/AREX-Skill3392026年9月3日 更新

查看 VectorSpaceLab 的全部技能

报告此技能的问题