shiimizu / ComfyUI-PhotoMaker-Plus

PhotoMaker for ComfyUI
GNU General Public License v3.0
240 stars 21 forks source link

Fix scaling issue when using image nodes vs reference path #6

Closed jaretburkett closed 10 months ago

jaretburkett commented 10 months ago

Images coming in from nodes are already scaled. This fixes https://github.com/shiimizu/ComfyUI-PhotoMaker/issues/5

shiimizu commented 10 months ago

Thanks for the PR!. This didn't fix things in some scenarios I tried so I fixed it this way instead:

https://github.com/shiimizu/ComfyUI-PhotoMaker/commit/75542a4bb50aff055efc2a7b63fcacc2eb05642d:

It should be okay since encode_image will only rescale if necessary. https://github.com/shiimizu/ComfyUI-PhotoMaker/blob/75542a4bb50aff055efc2a7b63fcacc2eb05642d/photomaker.py#L129