Spaces:
Running
on
Zero
Running
on
Zero
fix n_cluster=1
Browse files
app.py
CHANGED
@@ -4385,6 +4385,9 @@ with demo:
|
|
4385 |
images = [transform_image(image, resolution=(224, 224), stablediffusion=False) for image in resized_images]
|
4386 |
images = torch.stack(images)
|
4387 |
|
|
|
|
|
|
|
4388 |
is_cuda = torch.cuda.is_available()
|
4389 |
|
4390 |
dino = torch.hub.load('facebookresearch/dino:main', 'dino_vitb16').eval()
|
|
|
4385 |
images = [transform_image(image, resolution=(224, 224), stablediffusion=False) for image in resized_images]
|
4386 |
images = torch.stack(images)
|
4387 |
|
4388 |
+
if n_clusters == 1:
|
4389 |
+
return np.zeros(len(images)), None, resized_images
|
4390 |
+
|
4391 |
is_cuda = torch.cuda.is_available()
|
4392 |
|
4393 |
dino = torch.hub.load('facebookresearch/dino:main', 'dino_vitb16').eval()
|