Skip to content

0.1.0rc1

Pre-release
Pre-release
Compare
Choose a tag to compare
@ljleb ljleb released this 04 Feb 04:23
d61c178
  • new merge method API (@merge_method, Parameter(...), Return(...))
  • new model config API (get rid of blocks embedded in configs in favor of additional blocks configs + conversion)
  • replace block-wise merging with key-wise merging
  • it is now possible to implement all lycoris types (but be aware that only kohya lora is currently implemented)
  • new merge method sd_mecha.fallback(a, b) (delegate keys that are missing in a to b)
  • new merge method sd_mecha.cast(a, *, device, dtype) that replaces the old device and dtype kwargs that were automatically added
  • unification of args and kwargs of merge methods: there is now no special meaning attributed to how a parameter is passed
  • remove "hyper"s
  • introduction of param merge space, which corresponds to the old notion of "hyper". (merge method parameters with a default value are automatically in param merge space)
  • introduction of the StateDict[...] parameter type, which allows to load arbitrary keys from an input parameter for each output key to be merged (it also allows to not load a key if it is not needed (i.e. weighted_sum with alpha=1.0 doesn't need to load model A into memory at all))
  • bump serialization format version (it is not backwards compatible with the old format version but can easily be converted)
  • None, Tensor, bool, int, float, str, a TypeVar with constraints that are a subset of these types, and StateDict[Tensor, bool, int, float, str or a TypeVar] are all valid merge method parameter types now (and will also be serialized and deserialized properly)
  • a cache mechanism is now built into each merge method and can be enabled or disabled at will
  • automatic config conversion using sd_mecha.convert
  • automatic model config detection (no need to specify "sdxl" in sd_mecha.model now)
  • rename "sd1" model config to "sd1-ldm", and "sdxl" to "sdxl-sgm"
  • many other things, see docs or hop in the Discord for more info

Note: the yaml configs listed under here are necessary for the code to work. They are pre-included in the pypi release. To install from source using pip install -e ., they must be placed under sd_mecha/extensions/builtin/model_configs. This is a temporary measure, until configs are a part of a public web API that is under construction.