Update app.py
Browse files
app.py
CHANGED
@@ -313,7 +313,9 @@ def restore_on_gpu(
|
|
313 |
with torch.no_grad():
|
314 |
input_image = upscale_image(input_image, upscale, unit_resolution=32, min_size=min_size)
|
315 |
LQ = np.array(input_image) / 255.0
|
316 |
-
LQ = np.power(LQ, gamma_correction)
|
|
|
|
|
317 |
LQ *= 255.0
|
318 |
LQ = LQ.round().clip(0, 255).astype(np.uint8)
|
319 |
LQ = LQ / 255 * 2 - 1
|
|
|
313 |
with torch.no_grad():
|
314 |
input_image = upscale_image(input_image, upscale, unit_resolution=32, min_size=min_size)
|
315 |
LQ = np.array(input_image) / 255.0
|
316 |
+
#LQ = np.power(LQ, gamma_correction)
|
317 |
+
LQ = np.power(LQ, float(gamma_correction) if isinstance(gamma_correction, (int, float)) else gamma_correction.value)
|
318 |
+
|
319 |
LQ *= 255.0
|
320 |
LQ = LQ.round().clip(0, 255).astype(np.uint8)
|
321 |
LQ = LQ / 255 * 2 - 1
|