aboutsummaryrefslogtreecommitdiff
path: root/modules/models
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-05-10 11:05:02 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-05-10 11:05:02 +0300
commit028d3f6425d85f122027c127fba8bcbf4f66ee75 (patch)
tree05e714f118aaa4d25920918807e0b83344133629 /modules/models
parente42de4b8a2356c6d286adb07292442d75e5595d3 (diff)
ruff auto fixes
Diffstat (limited to 'modules/models')
-rw-r--r--modules/models/diffusion/ddpm_edit.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/models/diffusion/ddpm_edit.py b/modules/models/diffusion/ddpm_edit.py
index 611c2b69..09432117 100644
--- a/modules/models/diffusion/ddpm_edit.py
+++ b/modules/models/diffusion/ddpm_edit.py
@@ -1130,7 +1130,7 @@ class LatentDiffusion(DDPM):
if cond is not None:
if isinstance(cond, dict):
cond = {key: cond[key][:batch_size] if not isinstance(cond[key], list) else
- list(map(lambda x: x[:batch_size], cond[key])) for key in cond}
+ [x[:batch_size] for x in cond[key]] for key in cond}
else:
cond = [c[:batch_size] for c in cond] if isinstance(cond, list) else cond[:batch_size]
@@ -1229,7 +1229,7 @@ class LatentDiffusion(DDPM):
if cond is not None:
if isinstance(cond, dict):
cond = {key: cond[key][:batch_size] if not isinstance(cond[key], list) else
- list(map(lambda x: x[:batch_size], cond[key])) for key in cond}
+ [x[:batch_size] for x in cond[key]] for key in cond}
else:
cond = [c[:batch_size] for c in cond] if isinstance(cond, list) else cond[:batch_size]
return self.p_sample_loop(cond,