Skip to content

Commit 59c43fa

Browse files
committed
decouple vision tower
Signed-off-by: Kyle Sayers <[email protected]>
1 parent 5b3ddff commit 59c43fa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/llmcompressor/pipelines/sequential/helpers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,14 +277,14 @@ def topological_partition(graph: GraphModule, targets: Set[Module]) -> List[List
277277
while len(queue) > 0:
278278
node = queue.popleft()
279279

280-
# assign to partition
281-
partitions[partition_index].append(node)
282-
283280
# guarantee targets are assigned to disjoint partitions
284-
if node in target_nodes:
281+
if node in target_nodes and len(partitions[partition_index]) > 0:
285282
partition_index += 1
286283
partitions.append([])
287284

285+
# assign to partition
286+
partitions[partition_index].append(node)
287+
288288
# recurse on last indegree only in order to guarantee that
289289
# the node is assigned to maximal partition
290290
for user in node.users:

0 commit comments

Comments
 (0)