mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-15 16:13:29 +00:00
Fix typing syntax error
This commit is contained in:
parent
726fdfcaa0
commit
a220e5ca80
@ -1,5 +1,6 @@
|
||||
import torch
|
||||
from typing import Optional
|
||||
|
||||
import torch
|
||||
from .base import WeightAdapterBase
|
||||
|
||||
|
||||
@ -18,7 +19,7 @@ class GLoRAAdapter(WeightAdapterBase):
|
||||
alpha: float,
|
||||
dora_scale: torch.Tensor,
|
||||
loaded_keys: set[str] = None,
|
||||
) -> "GLoRAAdapter" | None:
|
||||
) -> Optional["GLoRAAdapter"]:
|
||||
if loaded_keys is None:
|
||||
loaded_keys = set()
|
||||
a1_name = "{}.a1.weight".format(x)
|
||||
|
@ -1,5 +1,6 @@
|
||||
import torch
|
||||
from typing import Optional
|
||||
|
||||
import torch
|
||||
from .base import WeightAdapterBase
|
||||
|
||||
|
||||
@ -18,7 +19,7 @@ class LoHaAdapter(WeightAdapterBase):
|
||||
alpha: float,
|
||||
dora_scale: torch.Tensor,
|
||||
loaded_keys: set[str] = None,
|
||||
) -> "LoHaAdapter" | None:
|
||||
) -> Optional["LoHaAdapter"]:
|
||||
if loaded_keys is None:
|
||||
loaded_keys = set()
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import torch
|
||||
from typing import Optional
|
||||
|
||||
import torch
|
||||
from .base import WeightAdapterBase
|
||||
|
||||
|
||||
@ -18,7 +19,7 @@ class LoKrAdapter(WeightAdapterBase):
|
||||
alpha: float,
|
||||
dora_scale: torch.Tensor,
|
||||
loaded_keys: set[str] = None,
|
||||
) -> "LoKrAdapter" | None:
|
||||
) -> Optional["LoKrAdapter"]:
|
||||
if loaded_keys is None:
|
||||
loaded_keys = set()
|
||||
lokr_w1_name = "{}.lokr_w1".format(x)
|
||||
|
Loading…
Reference in New Issue
Block a user