MichalGeyer / plug-and-play

Official Pytorch Implementation for “Plug-and-Play Diffusion Features for Text-Driven Image-to-Image Translation” (CVPR 2023)
926 stars 58 forks source link

Parse block string #3

Closed m-mandel closed 1 year ago

m-mandel commented 1 year ago

https://github.com/MichalGeyer/plug-and-play/blob/2598b6536cd8bd338ee04b7b4ef5155bec628195/run_self_attn_pca.py#L19

Should be blockidx = int(block.split('')[-1])

To allow for parsing of multiple digits (e.g. output_block_11)

tnarek commented 1 year ago

Fixed the block parsing, thanks!