Upload graph-byclip.py
Browse files- graph-byclip.py +5 -4
graph-byclip.py
CHANGED
|
@@ -27,11 +27,12 @@ matplotlib.use('QT5Agg') # Set the backend to TkAgg
|
|
| 27 |
|
| 28 |
import matplotlib.pyplot as plt
|
| 29 |
|
| 30 |
-
|
| 31 |
-
# 'RN50', 'RN101', 'RN50x4', 'RN50x16', 'RN50x64', 'ViT-B/32', 'ViT-B/16', 'ViT-L/14', 'ViT-L/14@336px'
|
| 32 |
-
CLIPname= "ViT-L/14"
|
| 33 |
#CLIPname= "ViT-B/16"
|
|
|
|
| 34 |
#CLIPname= "ViT-L/14@336px"
|
|
|
|
|
|
|
| 35 |
|
| 36 |
device=torch.device("cuda")
|
| 37 |
print("loading CLIP model",CLIPname)
|
|
@@ -85,7 +86,7 @@ if len(text2) >0:
|
|
| 85 |
# Add labels, title, and legend
|
| 86 |
#ax.set_xlabel('Index')
|
| 87 |
ax.set_ylabel('Values')
|
| 88 |
-
ax.set_title(
|
| 89 |
ax.legend()
|
| 90 |
|
| 91 |
# Display the graph
|
|
|
|
| 27 |
|
| 28 |
import matplotlib.pyplot as plt
|
| 29 |
|
| 30 |
+
### The stablediffusion standard model is Vit-L/14
|
|
|
|
|
|
|
| 31 |
#CLIPname= "ViT-B/16"
|
| 32 |
+
CLIPname= "ViT-L/14"
|
| 33 |
#CLIPname= "ViT-L/14@336px"
|
| 34 |
+
# Available models:
|
| 35 |
+
# 'RN50', 'RN101', 'RN50x4', 'RN50x16', 'RN50x64', 'ViT-B/32', 'ViT-B/16', 'ViT-L/14', 'ViT-L/14@336px'
|
| 36 |
|
| 37 |
device=torch.device("cuda")
|
| 38 |
print("loading CLIP model",CLIPname)
|
|
|
|
| 86 |
# Add labels, title, and legend
|
| 87 |
#ax.set_xlabel('Index')
|
| 88 |
ax.set_ylabel('Values')
|
| 89 |
+
ax.set_title(f"Graph of Embeddings in {CLIPname}")
|
| 90 |
ax.legend()
|
| 91 |
|
| 92 |
# Display the graph
|