aboutsummaryrefslogtreecommitdiffstats
path: root/modules/xlmr.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-05-11 18:25:15 +0000
committerGitHub <noreply@github.com>2023-05-11 18:25:15 +0000
commitabe32cefa39dee36d7f661d4e63c28ea8dd60c4f (patch)
tree1f1d817b59b49c6d3944c959151ce4c67d9041da /modules/xlmr.py
parentb4aaa339d529c81859858f0bedcc72b44fccd3d0 (diff)
parent49a55b410b66b7dd9be9335d8a2e3a71e4f8b15c (diff)
downloadstable-diffusion-webui-gfx803-abe32cefa39dee36d7f661d4e63c28ea8dd60c4f.tar.gz
stable-diffusion-webui-gfx803-abe32cefa39dee36d7f661d4e63c28ea8dd60c4f.tar.bz2
stable-diffusion-webui-gfx803-abe32cefa39dee36d7f661d4e63c28ea8dd60c4f.zip
Merge pull request #10285 from akx/ruff-spacing
Indentation + ruff whitespace fixes
Diffstat (limited to 'modules/xlmr.py')
-rw-r--r--modules/xlmr.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/xlmr.py b/modules/xlmr.py
index e056c3f6..a407a3ca 100644
--- a/modules/xlmr.py
+++ b/modules/xlmr.py
@@ -28,7 +28,7 @@ class BertSeriesModelWithTransformation(BertPreTrainedModel):
config_class = BertSeriesConfig
def __init__(self, config=None, **kargs):
- # modify initialization for autoloading
+ # modify initialization for autoloading
if config is None:
config = XLMRobertaConfig()
config.attention_probs_dropout_prob= 0.1
@@ -74,7 +74,7 @@ class BertSeriesModelWithTransformation(BertPreTrainedModel):
text["attention_mask"] = torch.tensor(
text['attention_mask']).to(device)
features = self(**text)
- return features['projection_state']
+ return features['projection_state']
def forward(
self,
@@ -134,4 +134,4 @@ class BertSeriesModelWithTransformation(BertPreTrainedModel):
class RobertaSeriesModelWithTransformation(BertSeriesModelWithTransformation):
base_model_prefix = 'roberta'
- config_class= RobertaSeriesConfig \ No newline at end of file
+ config_class= RobertaSeriesConfig