flaxdiff 0.1.20__py3-none-any.whl → 0.1.21__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- flaxdiff/data/online_loader.py +4 -2
- {flaxdiff-0.1.20.dist-info → flaxdiff-0.1.21.dist-info}/METADATA +1 -1
- {flaxdiff-0.1.20.dist-info → flaxdiff-0.1.21.dist-info}/RECORD +5 -5
- {flaxdiff-0.1.20.dist-info → flaxdiff-0.1.21.dist-info}/WHEEL +0 -0
- {flaxdiff-0.1.20.dist-info → flaxdiff-0.1.21.dist-info}/top_level.txt +0 -0
flaxdiff/data/online_loader.py
CHANGED
@@ -83,13 +83,13 @@ def map_sample(
|
|
83
83
|
# check if the variance is too low
|
84
84
|
if np.std(image) < 1e-4:
|
85
85
|
return
|
86
|
-
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
86
|
+
# image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
87
87
|
downscale = max(original_width, original_height) > max(image_shape)
|
88
88
|
interpolation = downscale_interpolation if downscale else upscale_interpolation
|
89
89
|
|
90
90
|
image = image_processor(
|
91
91
|
image, image_shape, interpolation=interpolation)
|
92
|
-
|
92
|
+
|
93
93
|
data_queue.put({
|
94
94
|
"url": url,
|
95
95
|
"caption": caption,
|
@@ -98,6 +98,7 @@ def map_sample(
|
|
98
98
|
"original_width": original_width,
|
99
99
|
})
|
100
100
|
except Exception as e:
|
101
|
+
print(f"Error processing {url}", e)
|
101
102
|
# error_queue.put_nowait({
|
102
103
|
# "url": url,
|
103
104
|
# "caption": caption,
|
@@ -121,6 +122,7 @@ def map_batch(
|
|
121
122
|
with ThreadPoolExecutor(max_workers=num_threads) as executor:
|
122
123
|
executor.map(map_sample_fn, batch["url"], batch['caption'])
|
123
124
|
except Exception as e:
|
125
|
+
print(f"Error processing batch", e)
|
124
126
|
# error_queue.put_nowait({
|
125
127
|
# "batch": batch,
|
126
128
|
# "error": str(e)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
flaxdiff/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
flaxdiff/utils.py,sha256=B0GcHlzlVYDNEIdh2v5qmP4u0neIT-FqexNohuyuCvg,2452
|
3
3
|
flaxdiff/data/__init__.py,sha256=PM3PkHihyohT5SHVYKc8vQ4IeVfGPpCktkSVwvqMjQ4,52
|
4
|
-
flaxdiff/data/online_loader.py,sha256=
|
4
|
+
flaxdiff/data/online_loader.py,sha256=w6gi1tAzWr4gtPt7onpStzOxp7Kdo_2q8Ro4Yi7OT4w,10549
|
5
5
|
flaxdiff/models/__init__.py,sha256=FAivVYXxM2JrCFIXf-C3374RB2Hth25dBrzOeNFhH1U,26
|
6
6
|
flaxdiff/models/attention.py,sha256=ZbDGIb5Q6FRqJ6qRY660cqw4WvF9IwCnhEuYdTpLPdM,13023
|
7
7
|
flaxdiff/models/common.py,sha256=fd-Fl0VCNEBjijHNwGBqYL5VvXe9u0347h25czNTmRw,10780
|
@@ -34,7 +34,7 @@ flaxdiff/trainer/__init__.py,sha256=T-vUVq4zHcMK6kpCsG4Gu8vn71q6lZD-lg-Ul7yKfEk,
|
|
34
34
|
flaxdiff/trainer/autoencoder_trainer.py,sha256=al7AsZ7yeDMEiDD-gbcXf0ADq_xfk1VMxvg24GfA-XQ,7008
|
35
35
|
flaxdiff/trainer/diffusion_trainer.py,sha256=wKkg63DWZjx2MoM3VQNCDIr40rWN8fUGxH9jWWxfZao,9373
|
36
36
|
flaxdiff/trainer/simple_trainer.py,sha256=Z77zRS5viJpd2Mpl6sonJk5WcnEWi2Cd4gl4u5tIX2M,18206
|
37
|
-
flaxdiff-0.1.
|
38
|
-
flaxdiff-0.1.
|
39
|
-
flaxdiff-0.1.
|
40
|
-
flaxdiff-0.1.
|
37
|
+
flaxdiff-0.1.21.dist-info/METADATA,sha256=k1s_EIWBL0y4oCxXxr3QIi7LQbR47_jyDFfjVbURSMY,22083
|
38
|
+
flaxdiff-0.1.21.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
39
|
+
flaxdiff-0.1.21.dist-info/top_level.txt,sha256=-2-nXnfkJgSfkki1tjm5Faw6Dso7vhtdn2szwCdX5CQ,9
|
40
|
+
flaxdiff-0.1.21.dist-info/RECORD,,
|
File without changes
|
File without changes
|