prototype image2video

This commit is contained in:
Vladimir Mandic
2024-02-02 14:35:25 -05:00
parent 307fc35811
commit 5463768956
4 changed files with 133 additions and 0 deletions
+4
View File
@@ -407,9 +407,13 @@ def process_diffusers(p: processing.StableDiffusionProcessing):
shared.log.debug(f'Profile: pipeline call: {t1-t0:.2f}')
if not hasattr(output, 'images') and hasattr(output, 'frames'):
if hasattr(output.frames[0], 'shape'):
print('HERE', output.frames[0].shape)
shared.log.debug(f'Generated: frames={output.frames[0].shape[1]}')
else:
shared.log.debug(f'Generated: frames={len(output.frames[0])}')
if isinstance(output, dict):
from types import SimpleNamespace
output = SimpleNamespace(**output)
output.images = output.frames[0]
if isinstance(output.images, np.ndarray):
output.images = torch.from_numpy(output.images)