SillyTavern / SillyTavern-Extras

Extensions API for SillyTavern.
GNU Affero General Public License v3.0
563 stars 133 forks source link

Talkinghead next4: configurability! #216

Closed Technologicat closed 10 months ago

Technologicat commented 10 months ago

~THIS PR IS NOT YET FINAL:~ EDIT: Now it is. :)

~I will add one more feature - namely, the manual poser doesn't yet automatically generate a suitably formatted _emotions.json. This will only take a few lines of code, but I'm out of time right now - I'll finish this either tonight or over the weekend. I'll update the PR once done.~

~Meanwhile, the rest can be reviewed.~

Tested with the following SillyTavern/public/characters/characternamehere/_animator.json (note: per-character config, at the client end!): EDIT: This configuration is now provided as an example in the talkinghead README.

{"target_fps": 25,
 "pose_interpolator_step": 0.1,
 "blink_interval_min": 2.0,
 "blink_interval_max": 5.0,
 "blink_probability": 0.03,
 "blink_confusion_duration": 10.0,
 "talking_fps": 12,
 "talking_morph": "mouth_aaa_index",
 "sway_morphs": ["head_x_index", "head_y_index", "neck_z_index", "body_y_index", "body_z_index"],
 "sway_interval_min": 5.0,
 "sway_interval_max": 10.0,
 "sway_macro_strength": 0.6,
 "sway_micro_strength": 0.02,
 "breathing_cycle_duration": 4.0,
 "postprocessor_chain": [["bloom", {}],
                         ["translucency", {"alpha": 0.9}],
                         ["alphanoise", {"magnitude": 0.1, "sigma": 0.0}],
                         ["banding", {}],
                         ["scanlines", {"dynamic": true}]
                        ]
}

The rest are defaults, but the "postprocessor_chain" makes the character into a scifi hologram.

Technologicat commented 10 months ago

Now, when doing a batch export, the manual poser generates _emotions.json (in the same output folder). This file can be used as SillyTavern/public/characters/characternamehere/_emotions.json (per-character emotion templates).

Technologicat commented 10 months ago

Made some doc updates. That part is still WIP, but documentation could be a separate PR.