ltdrdata / ComfyUI-extension-tutorials

584 stars 33 forks source link

Comfy's VAE compresses and loses pixels ,A1111 without losing, impack How does it do that? #32

Closed tjzoo111 closed 8 months ago

tjzoo111 commented 8 months ago

Comfy's VAE compresses and loses pixels ,A1111 without losing, impack How does it do that?
However, impack does not have VAE compressed data operations, only image output, no compressed space output Because I want to zoom in and manipulate data on compressed space operations. Can the VAE integrated into the refinement collector be compressed and the VAE decompressed to generate a single node, so that many other nodes can be used. Or is there any other alternative to comfy VAE compression?

ltdrdata commented 8 months ago

Comfy's VAE compresses and loses pixels ,A1111 without losing, impack How does it do that? However, impack does not have VAE compressed data operations, only image output, no compressed space output Because I want to zoom in and manipulate data on compressed space operations. Can the VAE integrated into the refinement collector be compressed and the VAE decompressed to generate a single node, so that many other nodes can be used. Or is there any other alternative to comfy VAE compression?

The VAE encode/decode process always incurs loss. If you believe it's lossless, that's a misconception, as it involves operations in the pixel space, and you mistakenly think that VAE is involved there.

In order to circumvent this issue, the Detailer in Impact Pack adopts a strategy of enlarging and then downsizing in the pixel space after i2i.

tjzoo111 commented 8 months ago

The reply is really fast, thanks for the reply. I knew that A1111 used a method to avoid this problem, so I was very confused about why comfy's VAE compression did not use the same method to avoid image deformation.

ltdrdata commented 8 months ago

The reply is really fast, thanks for the reply. I knew that A1111 used a method to avoid this problem, so I was very confused about why comfy's VAE compression did not use the same method to avoid image deformation.

If you want to use a task that doesn't use VAE in a1111 on ComfyUI, you can compose a workflow structure that doesn't use VAE on ComfyUI.

The problem is this.

In a1111, you don't know where the VAE is applied. In ComfyUI, it's explicitly revealed.

A workflow that structurally has to use VAE in ComfyUI can never be performed without VAE in a1111 as well.