diff --git a/modules/processing_args.py b/modules/processing_args.py index 0e03ec1ba..0b0d969a4 100644 --- a/modules/processing_args.py +++ b/modules/processing_args.py @@ -256,12 +256,13 @@ def set_pipeline_args(p, model, prompts: list, negative_prompts: list, prompts_2 # handle missing resolution if args.get('image', None) is not None and ('width' not in args or 'height' not in args): - if isinstance(args['image'], torch.Tensor) or isinstance(args['image'], np.ndarray): - args['width'] = 8 * args['image'].shape[-1] - args['height'] = 8 * args['image'].shape[-2] - else: - args['width'] = 8 * math.ceil(args['image'][0].width / 8) - args['height'] = 8 * math.ceil(args['image'][0].height / 8) + if 'width' in possible and 'height' in possible: + if isinstance(args['image'], torch.Tensor) or isinstance(args['image'], np.ndarray): + args['width'] = 8 * args['image'].shape[-1] + args['height'] = 8 * args['image'].shape[-2] + else: + args['width'] = 8 * math.ceil(args['image'][0].width / 8) + args['height'] = 8 * math.ceil(args['image'][0].height / 8) # handle implicit controlnet if 'control_image' in possible and 'control_image' not in args and 'image' in args: diff --git a/modules/sd_samplers.py b/modules/sd_samplers.py index 89b5a8a79..82171e0b7 100644 --- a/modules/sd_samplers.py +++ b/modules/sd_samplers.py @@ -77,7 +77,7 @@ def create_sampler(name, model): if 'Lumina' in model.__class__.__name__: shared.log.warning(f'AlphaVLLM-Lumina: sampler="{name}" unsupported') return None - if 'StableDiffusion3Pipeline' in model.__class__.__name__: + if 'StableDiffusion3' in model.__class__.__name__: if sampler.name != 'Heun FlowMatch': return None return None