control fix input size and image mode

This commit is contained in:
Vladimir Mandic
2023-12-30 09:42:44 -05:00
parent 01e6da2df0
commit 4c4429c5b4
6 changed files with 25 additions and 15 deletions
+2
View File
@@ -139,6 +139,8 @@ def process_diffusers(p: StableDiffusionProcessing):
def task_specific_kwargs(model):
task_args = {}
is_img2img_model = bool('Zero123' in shared.sd_model.__class__.__name__)
if len(getattr(p, 'init_images' ,[])) > 0:
p.init_images = [p.convert('RGB') for p in p.init_images]
if sd_models.get_diffusers_task(model) == sd_models.DiffusersTaskType.TEXT_2_IMAGE and not is_img2img_model:
p.ops.append('txt2img')
if hasattr(p, 'width') and hasattr(p, 'height'):