Save Drama 3 Codes:
Save Drama 3 Codes preserves a generated Drama 3 take so you can return to it later without running the generation process again. Rather than exporting playable sound, it saves the compact sound representation used by Drama 3, together with its line and take information, in a .safetensors file under output/drama3_codes. The node description characterizes these files as a few hundred kilobytes, although actual size depends on the saved content. This makes the node useful for keeping alternate performances, organizing takes for a project, and separating generation from later decoding or editing. You can reopen a saved take with Load Drama 3 Codes and use Drama 3 Decode or the Drama 3 Editor to continue working with it. The saved codes are stored as 16-bit integers, while the accompanying line and take information is recorded as file metadata.
Save Drama 3 Codes Input Parameters:
codes
This required DRAMA3_CODES connection supplies the Drama 3 take you want to preserve. It contains the sound codes and the accompanying lines and takes information needed to describe the generated material. The node converts the sound codes to a contiguous 16-bit integer tensor for storage and writes the line and take information as JSON text in the file metadata. In practical terms, this connection determines which performance you save; the node does not generate a replacement performance or decode it into audio. Connect compatible Drama 3 codes rather than an audio waveform, an encoded reference voice, or a file path. There is no default value, numeric minimum, numeric maximum, or selectable option list for this parameter.
name
This required STRING parameter sets the file-name prefix and can include subfolders, helping you organize saved takes by project, scene, or version. Its default is drama3/take. The node resolves this prefix relative to output/drama3_codes and appends a counter formatted with at least five digits, followed by an underscore and the .safetensors extension. For example, with the default prefix and an assigned counter of 1, the resulting relative path is output/drama3_codes/drama3/take_00001_.safetensors. You provide the prefix, not the complete final filename; the node adds the counter and extension. Changing this parameter changes the storage location or naming, not the saved performance. No minimum length, maximum length, or fixed set of choices is specified in the node schema, but the name must still be compatible with ComfyUI’s path handling and your operating system’s filename rules.
Save Drama 3 Codes Output Parameters:
This node has no output parameters or connection sockets. It is an output node whose result is a file written to disk, rather than a value passed to another node. To use the saved take in a later workflow, select its file in Load Drama 3 Codes. If you also want to decode the current take immediately, connect the same upstream codes to Drama 3 Decode separately.
Save Drama 3 Codes Usage Tips:
- Save takes you want to keep before experimenting further. Reloading their codes lets you revisit the saved performance without generating it again.
- Use meaningful prefixes such as
project_a/scene_02/take. Subfolders are supported, and the automatically added counter distinguishes saves that share a prefix. - Remember the default subfolder:
drama3/takeplaces files insideoutput/drama3_codes/drama3, not directly insideoutput/drama3_codes. - Enter a prefix without
.safetensorsor a manually added counter. The node adds both automatically. - Connect the same codes to this node and Drama 3 Decode when you want both a reusable take file and playable audio. Saving codes alone does not create an audio export.
- Treat saved codes as the reusable source take, not a record of every later audio adjustment. Decode settings such as
shorten_long_pausesare not saved by this node, and the node does not capture the Editor’s rendered audio. - Keep the complete
.safetensorsfile when moving or archiving takes. Its embedded line and take metadata is required by Load Drama 3 Codes; retaining only the sound-code tensor is insufficient.
Save Drama 3 Codes Common Errors and Solutions:
Missing required input: codes
- Explanation: The node requires a compatible
DRAMA3_CODESconnection before it can save anything. This is a validation issue; the exact wording displayed by ComfyUI may vary. - Solution: Connect a compatible Drama 3 codes output, such as the output of Drama 3 generation or Load Drama 3 Codes. Do not connect ordinary audio or Drama 3 voice-reference data.
KeyError: 'codes', 'lines', or 'takes'
- Explanation: The supplied data is missing one of the entries accessed by the save operation. This can happen when incompatible or incomplete data reaches the node, especially through a custom integration.
- Solution: Use codes produced by compatible Drama 3 nodes. If you are working with custom code, make sure it supplies the sound-code tensor and both metadata entries in the expected structure.
AttributeError: '…' object has no attribute 'to'
- Explanation: This representative Python error can occur if the sound-code entry is not a tensor. The node calls
.to(torch.int16)to prepare that entry for saving, so a plain list, string, or other incompatible object cannot be used in its place. - Solution: Reconnect a valid Drama 3 codes source. If a custom node creates the data, correct it to provide a compatible tensor rather than manually assembled text or lists.
TypeError: Object of type … is not JSON serializable
- Explanation: The node stores line and take information as JSON text. This error indicates that the metadata contains an object that cannot be converted to that format. Normally produced Drama 3 data should already have suitable metadata.
- Solution: Try codes directly from a compatible Drama 3 source. If you modified the metadata through custom code, remove unsupported objects and preserve the structure expected by the Drama 3 nodes.
Permission denied / Access is denied
- Explanation: The system cannot create the destination folder or write the saved file. Depending on where the failure occurs, this may appear as a Python permission error or a file-writing error from the serialization library.
- Solution: Make sure the account running ComfyUI can write to
output/drama3_codesand its subfolders. Check for read-only folders or storage mounts, and try a simple prefix such astaketo rule out a problematic subfolder.
No space left on device
- Explanation: The storage device containing the output folder has insufficient free space. The exact error wording depends on the operating system and file-writing library.
- Solution: Free space on that device and run the save again. If a failed attempt left an incomplete file, remove it before relying on that take as an archive.
Invalid argument / Invalid filename / Path-related save error
- Explanation: These are representative messages rather than errors explicitly defined by this node. They can occur when the name contains characters your operating system does not allow, an excessively long path, or a location rejected by ComfyUI’s path handling.
- Solution: Try a short prefix such as
takefirst. For organized saves, use simple relative names such asproject_a/scene_02/takeand avoid drive letters, parent-directory traversal, and operating-system-reserved filename characters.
