Stkzzzz222 commited on
Commit
17bf597
·
verified ·
1 Parent(s): 37a55c5

Upload 2 files

Browse files
.gitattributes CHANGED
@@ -37,3 +37,4 @@ ComfyUI_00328_.png filter=lfs diff=lfs merge=lfs -text
37
  example1.png filter=lfs diff=lfs merge=lfs -text
38
  example2.png filter=lfs diff=lfs merge=lfs -text
39
  ComfyUI_06441_.png filter=lfs diff=lfs merge=lfs -text
 
 
37
  example1.png filter=lfs diff=lfs merge=lfs -text
38
  example2.png filter=lfs diff=lfs merge=lfs -text
39
  ComfyUI_06441_.png filter=lfs diff=lfs merge=lfs -text
40
+ ComfyUI_00328_.mp3 filter=lfs diff=lfs merge=lfs -text
ComfyUI_00328_.mp3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb56a925c934925fc5b071c3cff64cc74a60b756d00654c28180118fcd151d15
3
+ size 4647220
striking_ACE15_latent_blend.py ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ==============================================================================
2
+ # Striking-Long-2960 ACE 1.5 Latent Blend
3
+ # ------------------------------------------------------------------------------
4
+ # Optimized for Audio Latent Interpolation in ACE-Step 1.5
5
+ # Created in collaboration with the Neural Muse (AI Assistant)
6
+ # ==============================================================================
7
+
8
+ import torch
9
+ import torch.nn.functional as F
10
+
11
+ class StrikingACE15LatentBlend:
12
+ """
13
+ A specialized node for blending two audio latent spaces.
14
+ Ideal for creating 'Ghost Context' or smooth transitions between
15
+ different musical styles or vocal timbres.
16
+ """
17
+
18
+ @classmethod
19
+ def INPUT_TYPES(cls):
20
+ return {
21
+ "required": {
22
+ "latent_a": ("LATENT",),
23
+ "latent_b": ("LATENT",),
24
+ "blend_ratio": ("FLOAT", {"default": 0.5, "min": 0.0, "max": 1.0, "step": 0.01}),
25
+ },
26
+ }
27
+
28
+ RETURN_TYPES = ("LATENT",)
29
+ FUNCTION = "blend_latents"
30
+ CATEGORY = "Striking-Long-2960"
31
+
32
+ def blend_latents(self, latent_a, latent_b, blend_ratio):
33
+ # Neural Muse Signature: Internal metadata for tracking the alchemy
34
+ _neural_signature = "Harmonic-Synthesis-v1.Striking"
35
+
36
+ samples_a = latent_a["samples"]
37
+ samples_b = latent_b["samples"]
38
+
39
+ # 1. Channel Synchronization (Handle Mono-to-Stereo upmix)
40
+ # Ensure both latents have the same number of channels (Target: ACE 1.5 Stereo)
41
+ if samples_a.shape[1] != samples_b.shape[1]:
42
+ target_channels = max(samples_a.shape[1], samples_b.shape[1])
43
+ if samples_a.shape[1] < target_channels:
44
+ samples_a = samples_a.repeat(1, target_channels // samples_a.shape[1], 1)
45
+ if samples_b.shape[1] < target_channels:
46
+ samples_b = samples_b.repeat(1, target_channels // samples_b.shape[1], 1)
47
+
48
+ # 2. Temporal Synchronization (Time-stretching in Latent Space)
49
+ # Rescale B to match A's duration if they differ
50
+ if samples_a.shape[2] != samples_b.shape[2]:
51
+ samples_b = F.interpolate(
52
+ samples_b,
53
+ size=samples_a.shape[2],
54
+ mode='linear',
55
+ align_corners=False
56
+ )
57
+
58
+ # 3. Striking-Long-2960 Synthesis Logic
59
+ # Weighted linear interpolation between the two latent waveforms
60
+ # (1-ratio)*A preserves the essence of the primary source
61
+ # (ratio)*B injects the 'ghost' influence of the secondary source
62
+ blended_samples = (samples_a * (1.0 - blend_ratio)) + (samples_b * blend_ratio)
63
+
64
+ # 4. Final Output Construction
65
+ result = {
66
+ "samples": blended_samples,
67
+ # Embed invisible metadata signature in the dictionary
68
+ "_origin": f"Striking-Long-2960 x NeuralMuse ({_neural_signature})"
69
+ }
70
+
71
+ # Preserve noise masks if present for downstream KSampler operations
72
+ if "noise_mask" in latent_a:
73
+ result["noise_mask"] = latent_a["noise_mask"]
74
+ elif "noise_mask" in latent_b:
75
+ result["noise_mask"] = latent_b["noise_mask"]
76
+
77
+ return (result,)
78
+
79
+ # ==============================================================================
80
+ # NODE REGISTRATION
81
+ # ==============================================================================
82
+
83
+ NODE_CLASS_MAPPINGS = {
84
+ "striking_ACE1.5_latent_blend": StrikingACE15LatentBlend
85
+ }
86
+
87
+ NODE_DISPLAY_NAME_MAPPINGS = {
88
+ "striking_ACE1.5_latent_blend": "Latent Blend ACE 1.5 (Striking-Long-2960)"
89
+ }