aboutsummaryrefslogtreecommitdiffstats
path: root/modules/xlmr.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-12-31 19:38:30 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2023-12-31 19:38:30 +0000
commita70dfb64a86b9b6d869deffdb0ffebe980365473 (patch)
treeb43d1ca1076fb449d7b08fa2403705a95f69f0b0 /modules/xlmr.py
parentbe5f1acc8f6e5bfc7f8234fd570d663b2fde9c27 (diff)
downloadstable-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.py')
-rw-r--r--modules/xlmr.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/xlmr.py b/modules/xlmr.py
index 6e000a56..319771b7 100644
--- a/modules/xlmr.py
+++ b/modules/xlmr.py
@@ -5,7 +5,7 @@ from transformers.models.xlm_roberta.configuration_xlm_roberta import XLMRoberta
from transformers import XLMRobertaModel,XLMRobertaTokenizer
from typing import Optional
-from modules.torch_utils import get_param
+from modules import torch_utils
class BertSeriesConfig(BertConfig):
@@ -65,7 +65,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,