[WIP]Vae preprocessor refactor (PR1) (#3557) · dxu/diffusers@5990014 · GitHub
Skip to content

Commit 5990014

Browse files
yiyixuxuyiyixuxupatrickvonplatenpcuencasayakpaul
authored
[WIP]Vae preprocessor refactor (PR1) (huggingface#3557)
VaeImageProcessor.preprocess refactor * refactored VaeImageProcessor - allow passing optional height and width argument to resize() - add convert_to_rgb * refactored prepare_latents method for img2img pipelines so that if we pass latents directly as image input, it will not encode it again * added a test in test_pipelines_common.py to test latents as image inputs * refactored img2img pipelines that accept latents as image: - controlnet img2img, stable diffusion img2img , instruct_pix2pix --------- Co-authored-by: yiyixuxu <yixu310@gmail,com> Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com> Co-authored-by: Pedro Cuenca <pedro@huggingface.co> Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
1 parent 1a6a647 commit 5990014

38 files changed

Lines changed: 624 additions & 344 deletions

‎src/diffusers/image_processor.py‎

Lines changed: 56 additions & 13 deletions

‎src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py‎

Lines changed: 33 additions & 15 deletions

0 commit comments

Comments
 (0)