mirror of
https://github.com/vladmandic/automatic
synced 2026-08-26 23:20:59 +02:00
error handling on incompatible batch-sizes
This commit is contained in:
@@ -298,8 +298,10 @@ def process_diffusers(p: processing.StableDiffusionProcessing):
|
||||
clean['generator'] = generator_device
|
||||
clean['parser'] = parser
|
||||
for k, v in clean.items():
|
||||
if isinstance(v, torch.Tensor) or isinstance(v, np.ndarray) or (isinstance(v, list) and len(v) > 0 and (isinstance(v[0], torch.Tensor) or isinstance(v[0], np.ndarray))):
|
||||
if isinstance(v, torch.Tensor) or isinstance(v, np.ndarray):
|
||||
clean[k] = v.shape
|
||||
if isinstance(v, list) and len(v) > 0 and (isinstance(v[0], torch.Tensor) or isinstance(v[0], np.ndarray)):
|
||||
clean[k] = [x.shape for x in v]
|
||||
shared.log.debug(f'Diffuser pipeline: {model.__class__.__name__} task={sd_models.get_diffusers_task(model)} set={clean}')
|
||||
if p.hdr_clamp or p.hdr_maximize or p.hdr_brightness != 0 or p.hdr_color != 0 or p.hdr_sharpen != 0:
|
||||
txt = 'HDR:'
|
||||
|
||||
Reference in New Issue
Block a user