InvokeAI/invokeai/backend/ip_adapter/scales.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
491 B
Python
Raw Normal View History

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)