Buckets:

|
download
raw
3.03 kB

LyCORIS

LyCORIS (Lora beYond Conventional methods, Other Rank adaptation Implementations for Stable diffusion) are LoRA-like matrix decomposition adapters that modify the cross-attention layer of the UNet. The LoHa and LoKr methods inherit from the Lycoris classes here.

LycorisConfig[[peft.tuners.lycoris_utils.LycorisConfig]]

peft.tuners.lycoris_utils.LycorisConfig[[peft.tuners.lycoris_utils.LycorisConfig]]

Source

A base config for LyCORIS like adapters

LycorisLayer[[peft.tuners.lycoris_utils.LycorisLayer]]

peft.tuners.lycoris_utils.LycorisLayer[[peft.tuners.lycoris_utils.LycorisLayer]]

Source

A base layer for LyCORIS like adapters

mergepeft.tuners.lycoris_utils.LycorisLayer.mergehttps://github.com/huggingface/peft/blob/vr_3206/src/peft/tuners/lycoris_utils.py#L114[{"name": "safe_merge", "val": ": bool = False"}, {"name": "adapter_names", "val": ": Optional[list[str]] = None"}]- safe_merge (bool, optional) -- If True, the merge operation will be performed in a copy of the original weights and check for NaNs before merging the weights. This is useful if you want to check if the merge operation will produce NaNs. Defaults to False.

  • adapter_names (List[str], optional) -- The list of adapter names that should be merged. If None, all active adapters will be merged. Defaults to None.0

Merge the active adapter weights into the base weights

Parameters:

safe_merge (bool, optional) : If True, the merge operation will be performed in a copy of the original weights and check for NaNs before merging the weights. This is useful if you want to check if the merge operation will produce NaNs. Defaults to False.

adapter_names (List[str], optional) : The list of adapter names that should be merged. If None, all active adapters will be merged. Defaults to None.

unmerge[[peft.tuners.lycoris_utils.LycorisLayer.unmerge]]

Source

This method unmerges all merged adapter layers from the base weights.

LycorisTuner[[peft.tuners.lycoris_utils.LycorisTuner]]

peft.tuners.lycoris_utils.LycorisTuner[[peft.tuners.lycoris_utils.LycorisTuner]]

Source

A base tuner for LyCORIS like adapters

Parameters:

model (torch.nn.Module) : The model to be adapted.

config (LoraConfig) : The configuration of the Lora model.

adapter_name (str) : The name of the adapter, defaults to "default".

low_cpu_mem_usage (bool, optional, defaults to False) : Create empty adapter weights on meta device. Useful to speed up the loading process.

Xet Storage Details

Size:
3.03 kB
·
Xet hash:
51631c2b1fdedafbc42dad5424f3fc8b5f49b778c0c175bb800d31a180bfac16

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.