Make sure current_index exists, to match latest ComfyUI changes (backwards compatible)

This commit is contained in:
Jedrzej Kosinski
2023-11-21 20:46:26 -06:00
parent ef7d6e883f
commit 36d72f3ae1
+2 -1
View File
@@ -100,7 +100,8 @@ def forward_timestep_embed(
x = layer(x, context)
elif isinstance(layer, SpatialTransformer):
x = layer(x, context, transformer_options)
transformer_options["current_index"] += 1
if "current_index" in transformer_options:
transformer_options["current_index"] += 1
elif isinstance(layer, openaimodel.Upsample):
x = layer(x, output_shape=output_shape)
else: