Spaces:
Build error
Build error
temp
Browse files
sgm/modules/diffusionmodules/openaimodel.py
CHANGED
|
@@ -2021,7 +2021,7 @@ class UNetAddModel(nn.Module):
|
|
| 2021 |
sns.heatmap(attn_map_i[j], square=True, xticklabels=False, yticklabels=False)
|
| 2022 |
if j < len(tokens):
|
| 2023 |
ax.set_title(tokens[j])
|
| 2024 |
-
fig.savefig(f"temp/attn_map/attn_map_{save_name}.png")
|
| 2025 |
plt.close()
|
| 2026 |
|
| 2027 |
return attn_map_i
|
|
|
|
| 2021 |
sns.heatmap(attn_map_i[j], square=True, xticklabels=False, yticklabels=False)
|
| 2022 |
if j < len(tokens):
|
| 2023 |
ax.set_title(tokens[j])
|
| 2024 |
+
fig.savefig(f"./temp/attn_map/attn_map_{save_name}.png")
|
| 2025 |
plt.close()
|
| 2026 |
|
| 2027 |
return attn_map_i
|
sgm/modules/diffusionmodules/sampling.py
CHANGED
|
@@ -289,9 +289,9 @@ class EulerEDMSampler(EDMSampler):
|
|
| 289 |
sections.append(attn_map)
|
| 290 |
|
| 291 |
section = np.stack(sections)
|
| 292 |
-
np.save(f"temp/seg_map/seg_{save_name}.npy", section)
|
| 293 |
|
| 294 |
-
save_image(image_, f"temp/seg_map/seg_{save_name}.png", normalize=True)
|
| 295 |
|
| 296 |
def get_init_noise(self, cfgs, model, cond, batch, uc=None):
|
| 297 |
|
|
|
|
| 289 |
sections.append(attn_map)
|
| 290 |
|
| 291 |
section = np.stack(sections)
|
| 292 |
+
np.save(f"./temp/seg_map/seg_{save_name}.npy", section)
|
| 293 |
|
| 294 |
+
save_image(image_, f"./temp/seg_map/seg_{save_name}.png", normalize=True)
|
| 295 |
|
| 296 |
def get_init_noise(self, cfgs, model, cond, batch, uc=None):
|
| 297 |
|