-
-
Notifications
You must be signed in to change notification settings - Fork 457
Adds YuE2 support #1539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds YuE2 support #1539
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1014,6 +1014,11 @@ public string CreateKSampler(JArray model, JArray pos, JArray neg, JArray latent | |
| defsampler ??= "res_multistep"; | ||
| defscheduler ??= "simple"; | ||
| } | ||
| else if (IsYue2()) | ||
| { | ||
| defsampler ??= "dpm_2"; | ||
| defscheduler ??= "sgm_uniform"; | ||
| } | ||
| else if (IsAnima()) | ||
| { | ||
| defsampler ??= "er_sde"; | ||
|
|
@@ -2560,6 +2565,36 @@ public JArray CreateConditioningDirect(string prompt, JArray clip, T2IModel mode | |
| ["min_p"] = 0 | ||
| }, id); | ||
| } | ||
| else if (IsYue2()) | ||
| { | ||
| if (!isPositive) | ||
| { | ||
| return FinalPrompt; | ||
| } | ||
|
Comment on lines
+2570
to
+2573
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I noticed if you create duplicate YuE2GenerateABC/YuE2GenerateMusic and pipe to ConditioningZeroOut for the negative prompt, comfy helpfully duplicates the work it does, even when all params are identical. Could have sworn identical nodes would be no-ops as their output would have been cached, but that wasn't the case here.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's swarm side actually - Swarm's addnode will check for duplicates and just not add duplicate nodes - if you're getting actual multiple nodes in the final workflow, then they're not identical |
||
| string abc = CreateNode("YuE2GenerateABC", new JObject() | ||
| { | ||
| ["clip"] = clip, | ||
| ["style"] = UserInput.Get(T2IParamTypes.Text2AudioStyle, ""), | ||
| ["lyrics"] = prompt, | ||
| ["seed"] = UserInput.Get(T2IParamTypes.Seed, 0) + 10, | ||
| ["mode"] = "full", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. full or melody |
||
| ["max_abc_tokens"] = 1024 | ||
| }); | ||
| node = CreateNode("YuE2GenerateMusic", new JObject() | ||
| { | ||
| ["clip"] = clip, | ||
| ["style"] = UserInput.Get(T2IParamTypes.Text2AudioStyle, ""), | ||
| ["lyrics"] = prompt, | ||
| ["abc"] = NodePath(abc, 0), | ||
| ["seed"] = UserInput.Get(T2IParamTypes.Seed, 0) + 20, | ||
| ["mode"] = "full", | ||
| ["max_duration"] = Math.Clamp(UserInput.Get(T2IParamTypes.Text2AudioDuration, 120), 0.04, 900), | ||
| ["temperature"] = 1, | ||
| ["top_p"] = 0.95, | ||
| ["top_k"] = 100, | ||
| ["repetition_penalty"] = 1.2 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where did these values come from? They don't match comfy's reference or the node defaults |
||
| }, id); | ||
| } | ||
| else if (IsMiniMaxMusic3()) | ||
| { | ||
| node = CreateNode("MiniMaxMusic3TextEncode", new JObject() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
honestly euler/normal is perfectly cromulent