diff --git a/main.py b/main.py index 69be1ad..690859b 100644 --- a/main.py +++ b/main.py @@ -106,8 +106,12 @@ class SDInterrogator(Interrogator): log.info("got %d", resp.status) assert resp.status == 200 data = await resp.json() - tags_with_scores = data["caption"] - tags = list(tags_with_scores.keys()) + tags_with_weights = data["caption"] + + tags = [] + + for tag, weight in tags_with_weights.items(): + tags.append(tag) upstream_tags = [tag.replace(" ", "_") for tag in tags] return " ".join(upstream_tags)