{"record":{"id":"fbe5ce51dc624a95","repo":"sgl-project/sglang","slug":"adapter-nickname-not-found-in-the-pipeline-plea","errorCode":null,"errorMessage":"Adapter {nickname} not found in the pipeline. Please provide lora_path to load it.","messagePattern":"Adapter (.+?) not found in the pipeline\\. Please provide lora_path to load it\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/lora/pipeline.py","lineNumber":991,"sourceCode":"        self._reject_lora_on_packed_weights()\n\n        # Disable layerwise offload before convert_to_lora_layers to ensure weights are accessible\n        # This is critical because convert_to_lora_layers needs to save cpu_weight from actual weights,\n        # not from offloaded placeholder tensors\n        if not self.lora_initialized:\n            with self._temporarily_disable_offload(\n                target=\"all\", use_module_names_only=True\n            ):\n                self.convert_to_lora_layers()\n\n        # Check adapter presence and load missing adapters\n        adapter_updated = False\n        rank = dist.get_rank()\n\n        # load required adapters\n        for nickname, path, alpha in zip(lora_nicknames, lora_paths, lora_alphas):\n            if nickname not in self.lora_adapters and path is None:\n                raise ValueError(\n                    f\"Adapter {nickname} not found in the pipeline. Please provide lora_path to load it.\"\n                )\n            # Check if adapter needs to be loaded\n            should_load = False\n            if path is not None:\n                if nickname not in self.loaded_adapter_paths:\n                    should_load = True\n                elif self.loaded_adapter_paths[nickname] != path:\n                    should_load = True\n            if should_load:\n                adapter_updated = True\n                self.load_lora_adapter(path, nickname, rank, lora_alpha=alpha)\n            elif (\n                alpha is not None and self.loaded_adapter_alphas.get(nickname) != alpha\n            ):\n                self.loaded_adapter_alphas[nickname] = alpha\n                adapter_updated = True\n","sourceCodeStart":973,"sourceCodeEnd":1009,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/lora/pipeline.py#L973-L1009","documentation":"When set_lora iterates zip(lora_nicknames, lora_paths, lora_alphas), a nickname that is not already loaded (not in self.lora_adapters) must come with a lora_path; passing None for both means there is nothing to apply.","triggerScenarios":"Calling set_lora(lora_nicknames=['myadapter']) with no lora_paths entry (or None) when 'myadapter' was never previously loaded into the pipeline.","commonSituations":"Referencing an adapter by nickname expecting it to be pre-loaded, but the pipeline was restarted or the adapter load failed earlier; nickname typo so the lookup misses.","solutions":["Provide the checkpoint path: set_lora(lora_nicknames=['a'], lora_paths=['/path/to/a.safetensors'])","Verify the nickname matches one previously loaded (check pipeline.lora_adapters.keys())","Fix the typo in the nickname"],"exampleFix":"# before\npipeline.set_lora(lora_nicknames=['style'], lora_paths=[None])\n# after\npipeline.set_lora(lora_nicknames=['style'], lora_paths=['/ckpt/style.safetensors'])","handlingStrategy":"validation","validationCode":"for n, p in zip(nora_nicknames or [], lora_paths or []):\n    if n not in pipeline.lora_adapters:\n        assert p, f'{n} not loaded and no path given'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Maintain pipeline.lora_adapters keys as the source of truth for nicknames","Always pass paths for cold-start adapters"],"tags":["lora","missing-adapter"],"backgroundTag":"resource-not-found","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}