preload.py 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. def preload(parser):
  2. parser.add_argument(
  3. "--controlnet-dir",
  4. type=str,
  5. help="Path to directory with ControlNet models",
  6. default=None,
  7. )
  8. parser.add_argument(
  9. "--controlnet-annotator-models-path",
  10. type=str,
  11. help="Path to directory with annotator model directories",
  12. default=None,
  13. )
  14. parser.add_argument(
  15. "--no-half-controlnet",
  16. action="store_true",
  17. help="do not switch the ControlNet models to 16-bit floats (only needed without --no-half)",
  18. default=None,
  19. )
  20. # Setting default max_size=16 as each cache entry contains image as both key
  21. # and value (Very costly).
  22. parser.add_argument(
  23. "--controlnet-preprocessor-cache-size",
  24. type=int,
  25. help="Cache size for controlnet preprocessor results",
  26. default=16,
  27. )
  28. parser.add_argument(
  29. "--controlnet-loglevel",
  30. default="INFO",
  31. choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
  32. help="Set the log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)",
  33. )