Spaces:
Running
on
Zero
Running
on
Zero
SunderAli17
commited on
Create losses/loss_config.py
Browse files- losses/loss_config.py +15 -0
losses/loss_config.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from dataclasses import dataclass, field
|
2 |
+
from typing import List
|
3 |
+
|
4 |
+
@dataclass
|
5 |
+
class SingleLossConfig:
|
6 |
+
name: str
|
7 |
+
weight: float = 1.
|
8 |
+
init_params: dict = field(default_factory=dict)
|
9 |
+
visualize_every_k: int = -1
|
10 |
+
|
11 |
+
|
12 |
+
@dataclass
|
13 |
+
class LossesConfig:
|
14 |
+
diffusion_losses: List[SingleLossConfig]
|
15 |
+
lcm_losses: List[SingleLossConfig]
|