fix bugs about multi input for generate (#1525)

### What problem does this PR solve?



### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2024-07-16 09:28:13 +08:00
committed by GitHub
parent d4332643c4
commit 2a647162a8
3 changed files with 10 additions and 1 deletions

View File

@ -193,9 +193,13 @@ class Canvas(ABC):
self.answer.append(c)
else:
if DEBUG: print("RUN: ", c)
if cpn.component_name == "Generate":
cpids = cpn.get_dependent_components()
if any([c not in self.path[-1] for c in cpids]):
continue
ans = cpn.run(self.history, **kwargs)
self.path[-1].append(c)
ran += 1
ran += 1
prepare2run(self.components[self.path[-2][-1]]["downstream"])
while 0 <= ran < len(self.path[-1]):