SaveLatent reports its outputs so they are visible to API

This commit is contained in:
FuamiCake 2023-07-30 16:36:55 -05:00
parent 3cd31d0e24
commit 3dcad78fe1
1 changed files with 9 additions and 1 deletions

View File

@ -362,6 +362,14 @@ class SaveLatent:
metadata[x] = json.dumps(extra_pnginfo[x])
file = f"{filename}_{counter:05}_.latent"
results = list()
results.append({
"filename": file,
"subfolder": subfolder,
"type": "output"
})
file = os.path.join(full_output_folder, file)
output = {}
@ -369,7 +377,7 @@ class SaveLatent:
output["latent_format_version_0"] = torch.tensor([])
comfy.utils.save_torch_file(output, file, metadata=metadata)
return {}
return { "ui": { "latents": results } }
class LoadLatent: