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

Error Code -9 #9

Open
Nightnightlight opened this issue Dec 13, 2024 · 4 comments
Open

Error Code -9 #9

Nightnightlight opened this issue Dec 13, 2024 · 4 comments

Comments

@Nightnightlight
Copy link

Getting a error code -9? I have all the model files / folders in the right location.
-9

@tdrussell
Copy link
Owner

I believe this means you are running out of memory (RAM, not VRAM) when loading the text encoder, and the process gets killed.

I took a look, the official HunyuanVideo code loads the text encoder in float32 precision then casts it to the configured dtype. I just pushed a patch that avoids this by directly loading it in the correct dtype (e.g. bfloat16). So it should use half the RAM while loading now. Pull the latest code and it might work now.

I'm assuming you probably have 32GB of RAM. Do note, the transformer model alone is 13b parameters, meaning 26GB in bfloat16. I think that the loading code loads it directly into fp8 though, if you have that configured? My point is though, there may be places where RAM usage is tight. The change I just pushed should fix the text encoder part but other parts might still OOM.

@Nightnightlight
Copy link
Author

Still getting it, and yea 32GBs. Guess I'll have to upgrade to 64GB to run it.

@Bocchi-Chan2023
Copy link

on wsl right? try assign more rams modifying .wslconfig. or increasing swap.

@Bocchi-Chan2023
Copy link

It's works fine on my 32GB PC.

[wsl2]
localhostForwarding=true
memory=24GB
swap=30GB
[experimental]
networkingMode=mirrored
dnsTunneling=true
autoProxy=true
sparseVhd=true
autoMemoryReclaim=gradual

@gsiisg gsiisg mentioned this issue Dec 25, 2024
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

3 participants