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

High Ram consumption #792

Closed
fervguida opened this issue Oct 26, 2023 · 4 comments
Closed

High Ram consumption #792

fervguida opened this issue Oct 26, 2023 · 4 comments

Comments

@fervguida
Copy link

I installed it for the first time and I can't use it because it consumes all my RAM, I have 16GB of RAM and it's unusable! They told me it was lighter than the SD XL and Automatic 111, both of which I use without problems, and now I have a problem with the Fooocus. This must be a bug, I don't believe you need to have more than 16GB of RAM to use it, the heavier ones don't even consume 4GB. My entire computer freezes to the point where I have to turn it off for it to unlock because it uses up all the RAM. Too scary!

@lllyasviel
Copy link
Owner

Hi if you are using Windows, see also the parts about "Microsoft’s Virtual Swap" in the readme. This is likely to be caused by a system swap problem.

@fervguida
Copy link
Author

Oi se você estiver usando o Windows, consulte também as partes sobre "Microsoft Virtual Swap" no readme. É provável que isso seja causado por um problema de troca de sistema.

I had already tested everything! Nothing works, I already made all the recommended settings as soon as I installed it and even checked to see! Everything is set up right! The high RAM consumption when opening Fooocus prevents me from doing anything to the point of crashing the entire PC! My PC is much higher than recommended! I can't understand this RAM problem on Fooocus!

I can't send a photo, but it consumes all of my 16 GB of RAM!

Print of the correct configuration
https://gyazo.com/4604c1a7a3ab39d1f921c965751c0b01

print of high ram consumption by Fooocus
https://gyazo.com/55709c4c9723a6b94aff755dc5805f3d

@FlatMapIO
Copy link

FlatMapIO commented Oct 29, 2023

I have the same problem, I limited memory and cpu in docker compose, but it still freezes the OS when it runs, and I have to hit the reboot button, I've tried it several times.

Envs:

  • ubuntu 16g RTX-3090
  • docker pytorch 2.1 cuda 12.1
services:
  fooocus:
    build:
      context: .
      dockerfile: docker/Dockerfile.Fooocus
    user: vscode
    deploy:
      resources:
        limits:
          cpus: '8'
          memory: 12000M
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    working_dir: /app
    volumes:
      - ./Fooocus:/app
      - ./mount/storage/models/:/app/models/
      - ./Fooocus/models/configs:/app/models/configs
      - ./Fooocus/models/prompt_expansion:/app/models/prompt_expansion
      - ./mount/storage/outputs:/app/outputs:rw

    ports:
      - 7860:7860
    command: python launch.py --listen=0.0.0.0

UPDATE

After replacing the 64GB memory, there were no issues. When fooocus started, the system memory usage exceeded 16GB, which seems to be a necessary condition. It is necessary to record it here.

@lllyasviel
Copy link
Owner

Hi all, fooocus can run in 12GB RAM in linux without swap. see also the colab demo (linux, 12GB RAM, no swap, T4 GPU) in Readme. But this may also related to many complicated factors like CPU arch, etc

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