Skip to content

armgit / kokon

Public Imported from GitHub
0

Edit photos by describing the change, on your own GPU. A free, open-source alternative to Nano Banana and ChatGPT image editing: photos stay on your computer, no daily limit. One installer for Windows, Mac and Linux sets up the best open model (Qwen-Image 2.1). MCP server for AI agents.

gen_music: say to start the ACE-Step API when it isn't running

Gabriele Lozupone6c406f76de3f
diff --git a/marketing/audio/gen_music.py b/marketing/audio/gen_music.py
index 786e018..8b31766 100644
--- a/marketing/audio/gen_music.py
+++ b/marketing/audio/gen_music.py
@@ -100,5 +100,11 @@ if __name__ == "__main__":
# A style must be named: running every style would write over the launch takes.
if not sys.argv[1:]:
raise SystemExit(f"usage: python gen_music.py STYLE [...] ({', '.join(STYLES)})")
+ try:
+ urllib.request.urlopen(API, timeout=5).close()
+ except urllib.error.HTTPError:
+ pass # the server answered
+ except OSError:
+ raise SystemExit(f"ACE-Step API not reachable at {API}: start it first (cd D:/AI/ACE-Step-1.5; uv run acestep-api) and wait until it listens")
for s in sys.argv[1:]:
generate(s)