Spaces:
Runtime error
Runtime error
Fixes for color matching
Browse files
src/color_matcher.py
CHANGED
|
@@ -142,8 +142,6 @@ def run(
|
|
| 142 |
write_video: bool = False,
|
| 143 |
**kwargs,
|
| 144 |
):
|
| 145 |
-
fabric = L.Fabric(devices=1, accelerator="auto", precision=precision)
|
| 146 |
-
|
| 147 |
source_imgs = torch.stack(
|
| 148 |
[to_torch(read_img(s)) * 0.5 + 0.5 for s in source_img], dim=0
|
| 149 |
)
|
|
@@ -168,7 +166,6 @@ def run(
|
|
| 168 |
os.makedirs(animation_dir, exist_ok=True)
|
| 169 |
|
| 170 |
source_full_res_cdl, cdl, lossses = train(
|
| 171 |
-
fabric,
|
| 172 |
criteria,
|
| 173 |
source_imgs,
|
| 174 |
target_imgs,
|
|
|
|
| 142 |
write_video: bool = False,
|
| 143 |
**kwargs,
|
| 144 |
):
|
|
|
|
|
|
|
| 145 |
source_imgs = torch.stack(
|
| 146 |
[to_torch(read_img(s)) * 0.5 + 0.5 for s in source_img], dim=0
|
| 147 |
)
|
|
|
|
| 166 |
os.makedirs(animation_dir, exist_ok=True)
|
| 167 |
|
| 168 |
source_full_res_cdl, cdl, lossses = train(
|
|
|
|
| 169 |
criteria,
|
| 170 |
source_imgs,
|
| 171 |
target_imgs,
|
src/gradio_demo/color_matching.py
CHANGED
|
@@ -127,7 +127,6 @@ def create_color_matching():
|
|
| 127 |
|
| 128 |
# Run color matching
|
| 129 |
source_matched, cdl, losses = train(
|
| 130 |
-
fabric=fabric,
|
| 131 |
criteria=criteria,
|
| 132 |
source_img=source_tensors,
|
| 133 |
target_img=target_tensors,
|
|
|
|
| 127 |
|
| 128 |
# Run color matching
|
| 129 |
source_matched, cdl, losses = train(
|
|
|
|
| 130 |
criteria=criteria,
|
| 131 |
source_img=source_tensors,
|
| 132 |
target_img=target_tensors,
|