agent doc: add a requirement for PR communications by yiyixuxu · Pull Request #14709 · huggingface/diffusers · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .ai/AGENTS.md
2 changes: 2 additions & 0 deletions .ai/references/modular.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ ComponentSpec(

10. **Raw `torch.randn(device=...)` for noise.** Use `randn_tensor(...)` from `utils/torch_utils`: it draws on the generator's device and moves the result, so CPU generators (what the test mixins pass) work, and the CUDA-generator path is bit-identical to `torch.randn`.

11. **Helpers taking `components`.** Prefer explicit args, for example, `get_xx_prompt_embeds(text_encoder, tokenizer, prompt)` instead of `get_xx_prompt_embeds(components, prompt)`. Helpers and block methods should take only what they use so dependencies are visible and they can run without an assembled pipeline. Leave the full `components` object to `__call__`, which unpacks what its helpers need. See `get_qwen_prompt_embeds` in `qwenimage/encoders.py`.

## Conversion checklist

- [ ] Read original pipeline's `__call__` end-to-end, map stages
Expand Down
1 change: 1 addition & 0 deletions docs/source/en/conceptual/contribution.md
Loading