Code Monkey home page Code Monkey logo

Comments (5)

tyxsspa avatar tyxsspa commented on July 28, 2024 3

So there is no difference between inference.py and demo.py for GPU memory requirement?

How to resize batch_size so it can run on the small amount of GPU memory, the tradeoff is a little bit longer to process? (I cannot find the batch_size configuration in the anytext_sd15.yaml)

Hi,
in inference.py, you can reduce image_count in params:

params = {
    "show_debug": True,
    "image_count": 2,    # <---- batch size
    "ddim_steps": 20,
}

in demo.py, the Image Count is in Parameters.

BTW, I am trying FP16 inference and it seems to have little difference in performance. It is possible that the GPU memory requirement can be reduced to below 10GB. I will push the updated code later.

from anytext.

boringtaskai avatar boringtaskai commented on July 28, 2024 1

Thank you @tyxsspa , I fetch the FP16 commit, and now I success to run demo.py on my 8GB GPU. 🥰🙏

from anytext.

yhyu13 avatar yhyu13 commented on July 28, 2024

24GB vram was suggested

Edit:
Just finish a run on inference.py which peak at 20.6GB VRAM

from anytext.

boringtaskai avatar boringtaskai commented on July 28, 2024

So there is no difference between inference.py and demo.py for GPU memory requirement?

How to resize batch_size so it can run on the small amount of GPU memory, the tradeoff is a little bit longer to process?
(I cannot find the batch_size configuration in the anytext_sd15.yaml)

from anytext.

boringtaskai avatar boringtaskai commented on July 28, 2024

So there is no difference between inference.py and demo.py for GPU memory requirement?
How to resize batch_size so it can run on the small amount of GPU memory, the tradeoff is a little bit longer to process? (I cannot find the batch_size configuration in the anytext_sd15.yaml)

Hi, in inference.py, you can reduce image_count in params:

params = {
    "show_debug": True,
    "image_count": 2,    # <---- batch size
    "ddim_steps": 20,
}

in demo.py, the Image Count is in Parameters.

BTW, I am trying FP16 inference and it seems to have little difference in performance. It is possible that the GPU memory requirement can be reduced to below 10GB. I will push the updated code later.

Cool I cannot wait to see the update 😉

from anytext.

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.