GithubHelp home page GithubHelp logo

Comments (4)

fabbarix avatar fabbarix commented on May 9, 2024

Due to the prune_ckpt.py declaring the arg parsed in the global scope, when importing it the main arguments are overridden.
Comment out these lines from prune_ckpt.py:

# parser = argparse.ArgumentParser(description='Pruning')
# parser.add_argument('--ckpt', type=str, default=None, help='path to model ckpt')
# args = parser.parse_args()
# ckpt = args.ckpt

Better yet: it may be wise to move the pruner method in a separate file - in ldm - and then use it from there in prune_ckpt.py - so that we avoid these hacks.

from dreambooth-stable-diffusion.

fabbarix avatar fabbarix commented on May 9, 2024

Nope - that seems to be called only during errors... Need to dig deeper into this one.

from dreambooth-stable-diffusion.

fabbarix avatar fabbarix commented on May 9, 2024

Ah! Turns out you can just be nice and ask ModelCheckpoint to "save_weights_only": True. Testing it out now to see if it does what the docs say it should do.

from dreambooth-stable-diffusion.

fabbarix avatar fabbarix commented on May 9, 2024

It does, it makes the checkpoint 4GB, still pruning it will make it closer to 2.5GB. Looking for hooking into the ModelCheckpoint class and see if we can extend it.

from dreambooth-stable-diffusion.

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.