GithubHelp home page GithubHelp logo

AMD support about fooocus HOT 13 CLOSED

lllyasviel avatar lllyasviel commented on June 28, 2024 8
AMD support

from fooocus.

Comments (13)

kenwong1 avatar kenwong1 commented on June 28, 2024 3

The minimum requirements that @lllyasviel posted above says 16GB GPU memory required for AMD on Windows with DirectML

from fooocus.

ahgera avatar ahgera commented on June 28, 2024 1

ComfyUI already has support for AMD cards on Windows via Microsoft's DirectML, but it has to be activated through a CLI argument (--directml). Since Fooocus imports Comfy directly I don't see any way of setting the args.directml value to anything from Fooocus' code.

I tried to hack around this in the Comfy repository. First by changing if args.directml is not None: to if not torch.cuda.is_available() and platform.system() == "Windows":, but Fooocus for some reason pulls down the latest Comfy version from git at every start, thereby overwriting any changes.

So I commented out that code, and after a while I got the web UI running, but i was unable to generate any images since I apparently have too little RAM in my old computer (12 GB):
RuntimeError: [enforce fail at ..\c10\core\impl\alloc_cpu.cpp:72] data. DefaultCPUAllocator: not enough memory: you tried to allocate 84934656 bytes.

The GPU and VRAM was barely used during this, so there was some bug still preventing DirectML to be used I think.

On top of that xFormers complains that it was built for PyTorch with Cuda, and I could find any way of either installing a CPU only version, or disable it.


I got slightly better results trying to use the same SDXL models in ComfyUI, but ultimately I got out of memory error there as well and gave up.
[W D:\a\_work\1\s\pytorch-directml-plugin\torch_directml\csrc\engine\dml_heap_allocator.cc:120] DML allocator out of memory!
At least this time i could see that both the GPU and VRAM was being used, but I'm guessing the limiting factor is still RAM since I got 8 GB VRAM and there were still some free.

I should mention that in both Fooocus' and ComfyUI's Python environments i had installed torch-directml (version 0.2.0.dev230426), which obviously is needed to import it.

from fooocus.

icecore2 avatar icecore2 commented on June 28, 2024

Same issue with RX 6700 XT.

from fooocus.

johan-lejdung avatar johan-lejdung commented on June 28, 2024

Same on AMD 6750XT

from fooocus.

Small-Ku avatar Small-Ku commented on June 28, 2024

Related: comfyanonymous/ComfyUI#160

from fooocus.

chenshiwei-io avatar chenshiwei-io commented on June 28, 2024

Same on Amd RX588

from fooocus.

xiao-xiaozi avatar xiao-xiaozi commented on June 28, 2024

same on Amd 580

from fooocus.

Roninos avatar Roninos commented on June 28, 2024

RX 5700XT not work

from fooocus.

StarLord-bot avatar StarLord-bot commented on June 28, 2024

AMD Radeon RX 7900 XTX not working here as well

from fooocus.

SkyHype2000 avatar SkyHype2000 commented on June 28, 2024

AMD Radeon RX 6750 XT also does not work here

from fooocus.

lllyasviel avatar lllyasviel commented on June 28, 2024

See also https://github.com/lllyasviel/Fooocus?tab=readme-ov-file#minimal-requirement

from fooocus.

kenwong1 avatar kenwong1 commented on June 28, 2024

I've been using Fooocus on a 7900 XTX and it seems to work. Just need to make the changes mentioned in #624 (comment)

I would like to see some optimizations done to make it faster on AMD cards though

from fooocus.

SkyHype2000 avatar SkyHype2000 commented on June 28, 2024

thanks it works now ^^

edited: RuntimeError: Could not allocate tensor with 167772160 bytes. There is not enough GPU video memory available!

from fooocus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.