JasonS09 / comfy_sd_krita_plugin

Make AI art between canvas and nodes with Krita.
MIT License
148 stars 7 forks source link

Scale ControlNet Preview #15

Closed ElliottLester closed 1 year ago

ElliottLester commented 1 year ago

Issue: ControlNet previews are 1:1 which is fine for small selections. When they increase in size making the dialog difficult to navigate

Fix: Rename QLabel preview -> scaled_preview to break all private accesses. Add ImageLoaderLayout.original_pixmap and get_pixmap to obtain the unscaled result. Add set_pixmap to better share all the scaling code. set a minimum width on the Qlable to allow it to shrink. same for controlnet annotator_preview Update controlnet.py to use set/get_pixmap