mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
20 lines
491 B
Python
20 lines
491 B
Python
|
class Scales:
|
||
|
"""The IP-Adapter scales for a patched UNet. This object can be used to dynamically change the scales for a patched
|
||
|
UNet.
|
||
|
"""
|
||
|
|
||
|
def __init__(self, scales: list[float]):
|
||
|
self._scales = scales
|
||
|
|
||
|
@property
|
||
|
def scales(self):
|
||
|
return self._scales
|
||
|
|
||
|
@scales.setter
|
||
|
def scales(self, scales: list[float]):
|
||
|
assert len(scales) == len(self._scales)
|
||
|
self._scales = scales
|
||
|
|
||
|
def __len__(self):
|
||
|
return len(self._scales)
|