From b3020db63f3b58332d20057f86da4b9b09b66f57 Mon Sep 17 00:00:00 2001 From: Kohya S Date: Tue, 7 Feb 2023 22:29:12 +0900 Subject: [PATCH] support python 3.8 --- networks/lora.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/networks/lora.py b/networks/lora.py index 174feda5..a1f38c16 100644 --- a/networks/lora.py +++ b/networks/lora.py @@ -5,6 +5,7 @@ import math import os +from typing import List import torch from library import train_util @@ -98,7 +99,7 @@ class LoRANetwork(torch.nn.Module): self.alpha = alpha # create module instances - def create_modules(prefix, root_module: torch.nn.Module, target_replace_modules) -> list[LoRAModule]: + def create_modules(prefix, root_module: torch.nn.Module, target_replace_modules) -> List[LoRAModule]: loras = [] for name, module in root_module.named_modules(): if module.__class__.__name__ in target_replace_modules: