Model: Ditch awful current_model hack

thanks to whjms for spotting that this could be zapped
This commit is contained in:
somebody
2023-03-09 19:08:08 -06:00
parent 885c226651
commit fb0b2f0467
2 changed files with 9 additions and 16 deletions

View File

@@ -22,10 +22,6 @@ except ModuleNotFoundError as e:
if utils.koboldai_vars.use_colab_tpu:
raise e
# I don't really like this way of pointing to the current model but I can't
# find a way around it in some areas.
current_model = None
# We only want to use logit manipulations and such on our core text model
class use_core_manipulations:
"""Use in a `with` block to patch functions for core story model sampling."""
@@ -176,9 +172,6 @@ class InferenceModel:
self._load(save_model=save_model, initial_load=initial_load)
self._post_load()
global current_model
current_model = self
def _post_load(self) -> None:
"""Post load hook. Called after `_load()`."""