Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SaveAnimatedWEBP node doesn't save metadata #4058

Closed
Lex-DRL opened this issue Jul 19, 2024 · 6 comments
Closed

SaveAnimatedWEBP node doesn't save metadata #4058

Lex-DRL opened this issue Jul 19, 2024 · 6 comments
Labels
Potential Bug User is reporting a bug. This should be tested.

Comments

@Lex-DRL
Copy link

Lex-DRL commented Jul 19, 2024

Expected Behavior

Similar to a regular Save Image node, any other saving node (which outputs to a file type supporting metadata) should save the workflow to metadata, too.

Actual Behavior

Only image itself is saved to WEBP with a built-in node, not a workflow.

Steps to Reproduce

  1. Reset your workflow to default.
    • Change prompt a little - to see whether it'll be loaded later.
  2. Queue the workflow.
  3. Clear workflow and load it from the saved image, by drag-n-drop'ing the file into browser window.
    • The workflow is loaded from the image.
  4. Now, add SaveAnimatedWEBP node and queue the workflow once again.
  5. Similarly, clear workfow and drag the generated file into browser window.
    • Nothing happens... even though vanilla ComfyUI CAN indeed load metadata from webp. But only if the webp file was saved with a custom node, not with SaveAnimatedWEBP.

Debug Logs

Probably not needed, but since it's required...

Total VRAM 24208 MB, total RAM 31878 MB
pytorch version: 2.3.1+cu121
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync
Using pytorch cross attention
[Prompt Server] web root: /BigData/SD/SwarmUI/dlbackend/ComfyUI/web
Skipping loading of custom nodes
Starting server

To see the GUI go to: http://127.0.0.1:8188
got prompt
model_type EPS
Using pytorch attention in VAE
Using pytorch attention in VAE
Requested to load SD1ClipModel
Loading 1 new model
Requested to load BaseModel
Loading 1 new model
  0%|                                                                                                                                           | 0/20 [00:00<?, ?it/s]/BigData/SD/SwarmUI/dlbackend/ComfyUI/venv/lib/python3.12/site-packages/torchsde/_brownian/brownian_interval.py:608: UserWarning: Should have tb<=t1 but got tb=14.614643096923828 and t1=14.614643.
  warnings.warn(f"Should have {tb_name}<=t1 but got {tb_name}={tb} and t1={self._end}.")
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:00<00:00, 22.86it/s]
Requested to load AutoencoderKL
Loading 1 new model
Prompt executed in 3.16 seconds
got prompt
Prompt executed in 0.00 seconds

Other

Related issue: Kaharos94/ComfyUI-Saveaswebp#10

System info:

  • Manjaro Linux 24.0.4
  • Firefox 128.0 (64-bit)
  • intel 13700K
  • RTX 4090
@Lex-DRL Lex-DRL added the Potential Bug User is reporting a bug. This should be tested. label Jul 19, 2024
@comfyanonymous
Copy link
Owner

SaveAnimatedWEBP does save the metadata in the WebP file.

If you try loading the files on here does it work? https://comfyanonymous.github.io/ComfyUI_examples/video/

Can you upload one of your WebP files?

@Lex-DRL
Copy link
Author

Lex-DRL commented Jul 19, 2024

does it work? https://comfyanonymous.github.io/ComfyUI_examples/video/

No, none of the two files loads workspace. Neither by dragging-and-dropping the file onto browser, nor by choosing it with the Load button.

Here are my files:
testWEBP.zip

  1. BuiltInPNG_00001_.png - saved with the default Save Image node.
  2. BuiltInWEBP_00001_.webp - saved with SaveAnimatedWEBP node.
  3. CustomNodeWEBP_00001_.webp saved with this custom node.

Files 1 and 3 both load their workspace with no issue. Even when ComfyUI launched with --disable-all-custom-nodes flag.
File 2 doesn't load anything - whether I start ComfyUI with or without this flag. 🤷🏻‍♂️

@comfyanonymous
Copy link
Owner

All 3 work load fine here, can you try on a clean ComfyUI to see if you still can't load it?

@Lex-DRL
Copy link
Author

Lex-DRL commented Jul 19, 2024

That would take quite some time, since I have a complicated setup (all the models are stored outside ComfyUI and symlinked by each folder, individually).
But yeah. Give me about an hour to get to my desktop PC and try it.

@Lex-DRL
Copy link
Author

Lex-DRL commented Jul 19, 2024

Hmmm... You were right. On a clean ComfyUI install, all 3 files load their workspace.

I'm no web-programmer, but by comparing my old and clean ComfyUI installs, I've found that the old one has an extra file under web/extensions/webpinfo/webpinfo.js. I'm guessing, this file was added by the aforementioned custom node and it overrides some webp-related behavior.
And since it's outside custom_nodes folder, it still might've been doing what it does, even when ComfyUI was launched with --disable-all-custom-nodes.
webpinfo.zip

So the solution would be removing that custom node, AS WELL AS this file, wouldn't it?
Removing webpinfo.js shouldn't break my main ComfyUI installation in any other way, should it?

I'd like to avoid setting it up from scratch, with all the custom nodes I have installed.

@comfyanonymous
Copy link
Owner

yes you should try removing that web/extensions/webpinfo/webpinfo.js file, it shouldn't break anything.

@Lex-DRL Lex-DRL closed this as completed Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Potential Bug User is reporting a bug. This should be tested.
Projects
None yet
Development

No branches or pull requests

2 participants