diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-12-31 19:38:30 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-12-31 19:38:30 +0000 |
commit | a70dfb64a86b9b6d869deffdb0ffebe980365473 (patch) | |
tree | b43d1ca1076fb449d7b08fa2403705a95f69f0b0 /modules/xlmr_m18.py | |
parent | be5f1acc8f6e5bfc7f8234fd570d663b2fde9c27 (diff) | |
download | stable-diffusion-webui-gfx803-a70dfb64a86b9b6d869deffdb0ffebe980365473.tar.gz stable-diffusion-webui-gfx803-a70dfb64a86b9b6d869deffdb0ffebe980365473.tar.bz2 stable-diffusion-webui-gfx803-a70dfb64a86b9b6d869deffdb0ffebe980365473.zip |
change import statements for #14478
Diffstat (limited to 'modules/xlmr_m18.py')
-rw-r--r-- | modules/xlmr_m18.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/xlmr_m18.py b/modules/xlmr_m18.py index e3e81961..f6055504 100644 --- a/modules/xlmr_m18.py +++ b/modules/xlmr_m18.py @@ -4,8 +4,7 @@ import torch from transformers.models.xlm_roberta.configuration_xlm_roberta import XLMRobertaConfig from transformers import XLMRobertaModel,XLMRobertaTokenizer from typing import Optional - -from modules.torch_utils import get_param +from modules import torch_utils class BertSeriesConfig(BertConfig): @@ -71,7 +70,7 @@ class BertSeriesModelWithTransformation(BertPreTrainedModel): self.post_init() def encode(self,c): - device = get_param(self).device + device = torch_utils.get_param(self).device text = self.tokenizer(c, truncation=True, max_length=77, |