Save resulting latent

After editing, when saving the image, you also save the resulting latent for continuing working on it later on (or e.g. generate interpolations)
pull/65/head
Diego Porres 3 years ago committed by GitHub
parent 948327cbf0
commit 9b7e474f26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -31,6 +31,7 @@ class CaptureWidget:
viz = self.viz
try:
_height, _width, channels = image.shape
print(viz.result)
assert image.dtype == np.uint8
os.makedirs(self.path, exist_ok=True)
file_id = 0
@ -44,6 +45,7 @@ class CaptureWidget:
else:
pil_image = PIL.Image.fromarray(image[:, :, :3], 'RGB')
pil_image.save(os.path.join(self.path, f'{file_id:05d}.png'))
np.save(os.path.join(self.path, f'{file_id:05d}.npy'), viz.result.w)
except:
viz.result.error = renderer.CapturedException()

Loading…
Cancel
Save