Added clone() to KeyframePartGroup to prevent keyframe bleedover between subsequent Queue prompts
This commit is contained in:
@@ -37,6 +37,12 @@ class KeyframePartGroup:
|
||||
|
||||
def is_empty(self) -> bool:
|
||||
return len(self.keyframes) == 0
|
||||
|
||||
def clone(self) -> 'KeyframePartGroup':
|
||||
cloned = KeyframePartGroup()
|
||||
for k in self.keyframes:
|
||||
cloned.add(k)
|
||||
return cloned
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -34,6 +34,7 @@ class KeyframePartNode:
|
||||
def load_keyframe_part(self, image, batch_index, denoise, part=None):
|
||||
if not part:
|
||||
part = KeyframePartGroup()
|
||||
part = part.clone()
|
||||
keyframe = KeyframePart(batch_index, image, denoise)
|
||||
part.add(keyframe)
|
||||
return (part,)
|
||||
@@ -75,6 +76,7 @@ class KeyframeInterpolationPartNode:
|
||||
|
||||
if not part:
|
||||
part = KeyframePartGroup()
|
||||
part = part.clone()
|
||||
current_group = KeyframePartGroup()
|
||||
|
||||
steps = batch_index_to - batch_index_from
|
||||
|
||||
Reference in New Issue
Block a user