Skip to content

Commit d95f58a

Browse files
authored
Merge pull request #1298 from MouseLand/flows_and_message
Flows and message
2 parents 56f11e0 + c41fcf8 commit d95f58a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

cellpose/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ def run_net(net, imgi, batch_size=8, augment=False, tile_overlap=0.1, bsize=224,
247247
y = np.reshape(y, (-1, 3, ly, lx))
248248
yfi = transforms.average_tiles(y, ysub, xsub, Lyt, Lxt)
249249
yf[b] = yfi[:, :imgb.shape[-2], :imgb.shape[-1]]
250-
stylei = stylea[i * ntiles:(i + 1) * ntiles].sum(axis=0)
251-
stylei /= (stylei**2).sum()**0.5
252-
styles[b] = stylei
250+
# stylei = stylea[i * ntiles:(i + 1) * ntiles].sum(axis=0)
251+
# stylei /= (stylei**2).sum()**0.5
252+
# styles[b] = stylei
253253
# slices from padding
254254
yf = yf[:, :, ypad1 : Ly-ypad2, xpad1 : Lx-xpad2]
255255
yf = yf.transpose(0,2,3,1)

cellpose/vit_sam.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ def __init__(self, backbone="vit_l", ps=8, nout=3, bsize=256, rdrop=0.4,
5050
blk.window_size = 0
5151

5252
self.dtype = dtype
53+
if self.dtype != torch.float32:
54+
self = self.to(self.dtype)
5355

5456
def forward(self, x):
5557
# same progression as SAM until readout

0 commit comments

Comments
 (0)