Skip to content

Commit

Permalink
Set default cache size for first time installation (#1706)
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei committed Jun 25, 2023
1 parent 95b0079 commit 8e143d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/global_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
def cache_preprocessors(preprocessor_modules: Dict[str, Callable]) -> Dict[str, Callable]:
""" We want to share the preprocessor results in a single big cache, instead of a small
cache for each preprocessor function. """
CACHE_SIZE = shared.cmd_opts.controlnet_preprocessor_cache_size
CACHE_SIZE = getattr(shared.cmd_opts, "controlnet_preprocessor_cache_size", 0)

# Set CACHE_SIZE = 0 will completely remove the caching layer. This can be
# helpful when debugging preprocessor code.
Expand Down

0 comments on commit 8e143d3

Please sign in to comment.