allow missing size

This commit is contained in:
Vladimir Mandic
2023-12-18 14:23:09 -05:00
parent 711c086be0
commit bcb54fed45
+6 -5
View File
@@ -230,10 +230,11 @@ def process_diffusers(p: StableDiffusionProcessing, seeds, prompts, negative_pro
is_img2img_model = bool('Zero123' in shared.sd_model.__class__.__name__)
if sd_models.get_diffusers_task(model) == sd_models.DiffusersTaskType.TEXT_2_IMAGE and not is_img2img_model:
p.ops.append('txt2img')
task_args = {
'height': 8 * math.ceil(p.height / 8),
'width': 8 * math.ceil(p.width / 8),
}
if hasattr(p, 'width') and hasattr(p, 'height'):
task_args = {
'width': 8 * math.ceil(p.width / 8),
'height': 8 * math.ceil(p.height / 8),
}
elif (sd_models.get_diffusers_task(model) == sd_models.DiffusersTaskType.IMAGE_2_IMAGE or is_img2img_model) and len(getattr(p, 'init_images' ,[])) > 0:
p.ops.append('img2img')
task_args = {
@@ -243,8 +244,8 @@ def process_diffusers(p: StableDiffusionProcessing, seeds, prompts, negative_pro
elif sd_models.get_diffusers_task(model) == sd_models.DiffusersTaskType.INSTRUCT and len(getattr(p, 'init_images' ,[])) > 0:
p.ops.append('instruct')
task_args = {
'height': 8 * math.ceil(p.height / 8),
'width': 8 * math.ceil(p.width / 8),
'height': 8 * math.ceil(p.height / 8),
'image': p.init_images,
'strength': p.denoising_strength,
}