huggingface / huggingface/diffusers
process_encoder_hidden_states function is applied on each denoising step
- Lingua principale
- Python
- Stelle
- 34.5k
- Fork
- 7.3k
- Merge medio
- 3g 3h
- PR unite (30g)
- 91
Descrizione
https://github.com/huggingface/diffusers/blob/31058cdaef63ca660a1a045281d156239fba8192/src/diffusers/models/unets/unet_2d_condition.py#L1004
Hey! I noticed that `process_encoder_hidden_states` is applied on each denoising step that influences on an inference performance. This function can be executed only once before running UNet2DConditionModel.forward. The output of `process_encoder_hidden_states` should be combined with `encoder_hidden_states` and be provided to UNet2DConditionModel.forward
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start at src/diffusers/models/unets/unet_2d_condition.py around the referenced process_encoder_hidden_states call and inspect how its result enters UNet2DConditionModel.forward. Trace the denoising-step caller to determine where the processed encoder states can be prepared once; done means forward receives the combined states without repeating that processing on every step.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python, pytorch
- Ambito
- machine-learning, performance
- Tipo di issue
- Refactoring
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100