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

Jagged edges in depth anything v2 #453

Open
KaruroChori opened this issue Sep 10, 2024 · 4 comments
Open

Jagged edges in depth anything v2 #453

KaruroChori opened this issue Sep 10, 2024 · 4 comments

Comments

@KaruroChori
Copy link

KaruroChori commented Sep 10, 2024

I noticed that depth anything v2 has some serious case of edge jaggedness.
For example on the boundaries of those two tables (you might want to zoom in).
image

The issue is present regardless of the generated subject.
Is the final image just up-sampled to the desired resolution from a low-res source?
Or is it and artifact specifically of depth anything v2?
Has anyone encountered the same problem?

@Fannovel16
Copy link
Owner

@KaruroChori Yes the output of DA2 is resized to the desired resolution

@KaruroChori
Copy link
Author

KaruroChori commented Sep 10, 2024

Do you know what the native resolution is?
Still, those borders are quite harsh. Most interpolation methods would not generate them except for nearest-neighbor. Which I am not sure is a good fit for this application.

@KaruroChori
Copy link
Author

KaruroChori commented Sep 10, 2024

https://github.com/Fannovel16/comfyui_controlnet_aux/blob/main/src/custom_controlnet_aux/depth_anything_v2/__init__.py
Found it. I will try few things to see how it goes.

From the original repo

--input-size (optional): By default, we use input size 518 for model inference. You can increase the size for even more fine-grained results.

So using a higher resolution if so desired should not be an issue.

@KaruroChori
Copy link
Author

For comparison, this is the one generated with the same model by https://github.com/kijai/ComfyUI-DepthAnythingV2
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants