mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
@@ -336,6 +336,9 @@ def set_pipeline_args(p, model, prompts:list, negative_prompts:list, prompts_2:t
|
||||
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]
|
||||
elif isinstance(args['image'], Image.Image):
|
||||
args['width'] = args['image'].width
|
||||
args['height'] = args['image'].height
|
||||
elif isinstance(args['image'][0], torch.Tensor) or isinstance(args['image'][0], np.ndarray):
|
||||
args['width'] = 8 * args['image'][0].shape[-1]
|
||||
args['height'] = 8 * args['image'][0].shape[-2]
|
||||
|
||||
Reference in New Issue
Block a user