Commit
·
39bb242
1
Parent(s):
83ec49b
Update handler.py
Browse filesuse the 2x scale model
- handler.py +2 -2
handler.py
CHANGED
|
@@ -19,8 +19,8 @@ from RealESRGAN import RealESRGAN
|
|
| 19 |
class EndpointHandler():
|
| 20 |
def __init__(self, path="."):
|
| 21 |
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 22 |
-
self.model = RealESRGAN(self.device, scale=
|
| 23 |
-
self.model.load_weights('/repository/
|
| 24 |
|
| 25 |
|
| 26 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
|
|
|
| 19 |
class EndpointHandler():
|
| 20 |
def __init__(self, path="."):
|
| 21 |
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 22 |
+
self.model = RealESRGAN(self.device, scale=2)
|
| 23 |
+
self.model.load_weights('/repository/RealESRGAN_x2.pth', download=True)
|
| 24 |
|
| 25 |
|
| 26 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|