Add missing import (#3917)

## What type of PR is this? (check all applicable)

- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
- [ ] Community Node Submission

## Description

This import is missing and used later in the file.
This commit is contained in:
blessedcoolant 2023-07-24 20:01:12 +12:00 committed by GitHub
commit 14659277e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -474,7 +474,7 @@ class ModelPatcher:
@staticmethod @staticmethod
def _lora_forward_hook( def _lora_forward_hook(
applied_loras: List[Tuple[LoraModel, float]], applied_loras: List[Tuple[LoRAModel, float]],
layer_name: str, layer_name: str,
): ):
@ -519,7 +519,7 @@ class ModelPatcher:
def apply_lora( def apply_lora(
cls, cls,
model: torch.nn.Module, model: torch.nn.Module,
loras: List[Tuple[LoraModel, float]], loras: List[Tuple[LoRAModel, float]],
prefix: str, prefix: str,
): ):
original_weights = dict() original_weights = dict()

View File

@ -10,6 +10,7 @@ from .base import (
SubModelType, SubModelType,
classproperty, classproperty,
InvalidModelException, InvalidModelException,
ModelNotFoundException,
) )
# TODO: naming # TODO: naming
from ..lora import LoRAModel as LoRAModelRaw from ..lora import LoRAModel as LoRAModelRaw