Refresh card: polished CAASteeringController quickstart
Browse files
README.md
CHANGED
|
@@ -12,21 +12,24 @@ tags:
|
|
| 12 |
- steering
|
| 13 |
---
|
| 14 |
|
| 15 |
-
#
|
| 16 |
|
| 17 |
Steering vectors for the **mood** concept on ACE-Step, computed via contrastive activation addition (CAA).
|
| 18 |
|
| 19 |
## Quickstart
|
| 20 |
|
| 21 |
```python
|
| 22 |
-
from src.steering import SteerableACEModel
|
| 23 |
-
from steering.caa import CAAController
|
| 24 |
|
| 25 |
model = SteerableACEModel(device="cuda")
|
| 26 |
-
|
|
|
|
| 27 |
|
| 28 |
with model.steer(ctrl):
|
| 29 |
-
audio = model.generate(
|
|
|
|
|
|
|
|
|
|
| 30 |
```
|
| 31 |
|
| 32 |
## Generation config
|
|
|
|
| 12 |
- steering
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# CAA — `mood` (ACE-Step)
|
| 16 |
|
| 17 |
Steering vectors for the **mood** concept on ACE-Step, computed via contrastive activation addition (CAA).
|
| 18 |
|
| 19 |
## Quickstart
|
| 20 |
|
| 21 |
```python
|
| 22 |
+
from src.steering import SteerableACEModel, CAASteeringController
|
|
|
|
| 23 |
|
| 24 |
model = SteerableACEModel(device="cuda")
|
| 25 |
+
model.pipeline.load()
|
| 26 |
+
ctrl = CAASteeringController.from_pretrained("lukasz-staniszewski/ace-step-caa-mood", alpha=20.0)
|
| 27 |
|
| 28 |
with model.steer(ctrl):
|
| 29 |
+
audio = model.generate(
|
| 30 |
+
prompt="instrumental music", lyrics="[inst]",
|
| 31 |
+
audio_duration=10.0, infer_step=30, manual_seed=0,
|
| 32 |
+
)
|
| 33 |
```
|
| 34 |
|
| 35 |
## Generation config
|