mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
fix sd3 img2img and hires
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user