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

bottom-left tile is missing. #93

Open
jyomu opened this issue Mar 31, 2023 · 10 comments
Open

bottom-left tile is missing. #93

jyomu opened this issue Mar 31, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@jyomu
Copy link

jyomu commented Mar 31, 2023

Problem

I confirmed that the bottom-left tile is missing.

00026-Euler-1steps

Reproduction Procedure

  1. Set the tile size to 2x2 or more and generate it.
  2. Confirm that the bottom-left tile is missing.

Expected Result

All tiles should be displayed correctly.

Execution Environment

Notes

If the missing area becomes larger, it also affects TiledVAE.
The leftmost column seems to be missing except for the top row.

00027-Euler-1steps
00050-Euler a-1steps
00076-Euler a-1steps

@pkuliyi2015 pkuliyi2015 added the bug Something isn't working label Apr 1, 2023
@mr-september
Copy link

mr-september commented Apr 19, 2023

+1, same issue here. For my left-most tiles, only the 1st/top tile is generated. Everything below that is one huge tall grey block.

@Davide-F5-Marincione
Copy link

I've encountered the same error, the problem seems to stem from a bug in the pytorch-directml library which manifests in large tensors (like the image) having their bottom left corner zeroed out (no matter the operations applied to It!).

My hacky solution was to replace the few operations that involve large tensors in the code with their numpy variant. This may cause a slow down of the whole process as the operations are now done in CPU and more data needs be copied from VRAM to RAM, but at least it works... Btw since the operations are not many I didn't really notice this possible slow down.

At any rate, I use an Rx590 8GB.

@pkuliyi2015
Copy link
Owner

I've encountered the same error, the problem seems to stem from a bug in the pytorch-directml library which manifests in large tensors (like the image) having their bottom left corner zeroed out (no matter the operations applied to It!).

My hacky solution was to replace the few operations that involve large tensors in the code with their numpy variant. This may cause a slow down of the whole process as the operations are now done in CPU and more data needs be copied from VRAM to RAM, but at least it works... Btw since the operations are not many I didn't really notice this possible slow down.

At any rate, I use an Rx590 8GB.

Thank you for let me understand the cause. it seems that I cannot fix this problem easily. So I will mark this problem as unresolved.

@Davide-F5-Marincione
Copy link

You are welcome!
Yes indeed this problem can't (and shouldn't) be solved by us, the only thing to do is to press the directml devs to solve the issue. And, if one is really interested to use this anyway, let him know he can hack away this problem with a bit of numpy knowledge.

@Monkellie
Copy link

for me it only does this when setting tile vae below 1024 128, if i stick it there it works but I can't hirez x2 from 512, only at most x1.8 on my rx 6600

@liquiddandruff
Copy link

I'm not sure the differences but using https://github.com/Coyote-A/ultimate-upscale-for-automatic1111 with controlnet tiling lets me generate 2k*2k images. But with this repo, I get the same bottom-left tile missing and out-of-memory errors.

I'm using an RX 6750XT, 12GB VRAM.

@pkuliyi2015
Copy link
Owner

Please use ultimate upscale if you encountered the missing tile problems. This extension still regard large image as a whole, so the DirectML bug of large tensors will affect your outcomes.

@xxmtg
Copy link

xxmtg commented Jul 28, 2023

I've encountered the same error, the problem seems to stem from a bug in the pytorch-directml library which manifests in large tensors (like the image) having their bottom left corner zeroed out (no matter the operations applied to It!).

My hacky solution was to replace the few operations that involve large tensors in the code with their numpy variant. This may cause a slow down of the whole process as the operations are now done in CPU and more data needs be copied from VRAM to RAM, but at least it works... Btw since the operations are not many I didn't really notice this possible slow down.

At any rate, I use an Rx590 8GB.

Can you point out the code? I curious about this plugin and want to get it work even using numpy array. I am also having an AMD setup here

@ChiaYen-Kan
Copy link

Hi
this problem is resolved ?
i use AMD Ryzen 5 5600g and stable diffusion next with directml backend also has this problem
thank you

@emwiwo
Copy link

emwiwo commented Nov 11, 2023

same on radeon vega64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants