e3c8979e8d
- cmd/fn/doctor.go - cmd/fn/main.go - cpp/apps/primitives_gallery/playground/tables/CMakeLists.txt - cpp/apps/primitives_gallery/playground/tables/data_table.cpp - cpp/apps/primitives_gallery/playground/tables/data_table_logic.cpp - cpp/apps/primitives_gallery/playground/tables/data_table_logic.h - cpp/apps/primitives_gallery/playground/tables/self_test.cpp - cpp/apps/primitives_gallery/playground/tables/tql.cpp - cpp/apps/primitives_gallery/playground/tables/viz.cpp - cpp/apps/primitives_gallery/playground/tables/viz.h - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.8 KiB
1.8 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| diffusers_load_lora | function | py | ml | 1.0.0 | impure | def diffusers_load_lora(pipe: Any, lora: LoraRef) -> Any | Carga un adaptador LoRA en un pipeline diffusers via pipe.load_lora_weights. Si lora.weight != 1.0, aplica set_adapters para escalar la contribucion del LoRA. |
|
|
false | error_go_core |
|
|
El mismo pipe con el LoRA cargado y peso aplicado. Modificacion in-place, retorna pipe para composicion. | false | python/functions/ml/diffusers_load_lora.py |
Ejemplo
from diffusers_load_lora import diffusers_load_lora
from lora_ref import LoraRef
lora = LoraRef(path="/path/to/my_lora.safetensors", weight=0.8)
pipe = diffusers_load_lora(pipe, lora)
Notas
Usa pipe.load_lora_weights(path) para cargar. Si lora.weight != 1.0:
- Intenta
pipe.set_adapters(["default"], adapter_weights=[weight])(diffusers >= 0.20). - Fallback a
pipe.fuse_lora(lora_scale=weight)para versiones antiguas.
El campo lora.scale (override de alpha) no se aplica aqui — diffusers no expone
un parametro directo equivalente en la API publica actual. Se puede setear via
pipe.load_lora_weights(path, weight_name=...) si el archivo tiene nombre especifico.
Import lazy de diffusers — ImportError descriptivo si no instalado.