Skip to content

Commit 188a515

Browse files
committed
make style
1 parent 0eb3eb8 commit 188a515

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/diffusers/loaders/ip_adapter.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -554,20 +554,21 @@ def set_ip_adapter_scale(self, scale: Union[float, List[float], List[List[float]
554554
Set IP-Adapter scales per-transformer block. Input `scale` could be a single config or a list of configs for
555555
granular control over each IP-Adapter behavior. A config can be a float or a list.
556556
557-
`float` is converted to list and repeated for the number of blocks and the number of IP adapters.
558-
`List[float]` length match the number of blocks, it is repeated for each IP adapter.
559-
`List[List[float]]` must match the number of IP adapters and each must match the number of blocks.
557+
`float` is converted to list and repeated for the number of blocks and the number of IP adapters. `List[float]`
558+
length match the number of blocks, it is repeated for each IP adapter. `List[List[float]]` must match the
559+
number of IP adapters and each must match the number of blocks.
560560
561561
Example:
562562
563563
```py
564564
# To use original IP-Adapter
565565
scale = 1.0
566566
pipeline.set_ip_adapter_scale(scale)
567+
568+
567569
def LinearStrengthModel(start, finish, size):
568-
return [
569-
(start + (finish - start) * (i / (size - 1))) for i in range(size)
570-
]
570+
return [(start + (finish - start) * (i / (size - 1))) for i in range(size)]
571+
571572
572573
ip_strengths = LinearStrengthModel(0.3, 0.92, 19)
573574
pipeline.set_ip_adapter_scale(ip_strengths)

0 commit comments

Comments
 (0)