{
  "workflow_info": {
    "name": "SFX Sound Designer",
    "description": "Sound-effect design on Stable Audio 3 Small SFX (May 2026 open weights, native ComfyUI): distilled 8-step generation with loudness normalization.",
    "version": "1.0.0",
    "author": "Lilith Platform",
    "category": "audio",
    "tags": [
      "2026-sota",
      "audio",
      "cue",
      "foley",
      "sfx",
      "sound-design",
      "stable-audio-3"
    ],
    "estimated_time_seconds": 75,
    "gpu_requirement": "A5000",
    "output_type": "audio"
  },
  "inputs": {
    "prompt": {
      "type": "string",
      "description": "Describe the target sound effect",
      "required": true,
      "min_length": 1,
      "max_length": 600
    },
    "sfx_type": {
      "type": "enum",
      "options": [
        "foley",
        "impact",
        "whoosh",
        "ambience",
        "interface",
        "creature"
      ],
      "default": "foley",
      "description": "Primary SFX family"
    },
    "duration_seconds": {
      "type": "integer",
      "default": 6,
      "min": 1,
      "max": 20,
      "description": "Target duration in seconds"
    },
    "intensity": {
      "type": "enum",
      "options": [
        "subtle",
        "moderate",
        "strong",
        "extreme"
      ],
      "default": "moderate",
      "description": "SFX intensity envelope"
    },
    "spatial_profile": {
      "type": "enum",
      "options": [
        "dry",
        "room",
        "hall",
        "cinematic"
      ],
      "default": "room",
      "description": "Target space and reverb feel"
    },
    "audio_prompt_hint": {
      "type": "string",
      "default": "",
      "description": "Optional prompt-side conditioning hint for texture/transient shaping",
      "max_length": 240
    },
    "reference_audio_url": {
      "type": "string",
      "default": "",
      "description": "Reference audio URL for style/texture conditioning where backend supports it",
      "max_length": 1200
    },
    "reference_audio_urls": {
      "type": "array",
      "description": "Optional additional reference audio URLs for multi-reference conditioning",
      "item_type": "string",
      "default": []
    },
    "conditioning_strength": {
      "type": "float",
      "default": 0.55,
      "min": 0,
      "max": 2,
      "description": "Strength of reference-audio conditioning"
    },
    "conditioning_mode": {
      "type": "enum",
      "options": [
        "auto",
        "reference-audio",
        "melody",
        "style-transfer",
        "voice-clone"
      ],
      "default": "auto",
      "description": "Conditioning mode preference for backend-specific audio guidance"
    },
    "provider_capability_mode": {
      "type": "enum",
      "options": [
        "auto",
        "required",
        "disabled"
      ],
      "default": "auto",
      "description": "How strictly provider support for reference-audio conditioning is enforced"
    },
    "seed": {
      "type": "integer",
      "default": -1,
      "description": "Random seed"
    }
  },
  "nodes": {
    "1": {
      "class_type": "CheckpointLoaderSimple",
      "inputs": {
        "ckpt_name": "stable_audio_3_small_sfx.safetensors"
      },
      "outputs": [
        "MODEL",
        "CLIP",
        "VAE"
      ]
    },
    "2": {
      "class_type": "CLIPLoader",
      "inputs": {
        "clip_name": "t5gemma_b_b_ul2.safetensors",
        "type": "stable_audio"
      },
      "outputs": [
        "CLIP"
      ],
      "_comment": "Stable Audio 3 text encoder loads separately (T5Gemma UL2)."
    },
    "3": {
      "class_type": "CLIPTextEncode",
      "inputs": {
        "text": "{{constructed_prompt}}",
        "clip": [
          "2",
          0
        ]
      },
      "outputs": [
        "CONDITIONING"
      ]
    },
    "4": {
      "class_type": "CLIPTextEncode",
      "inputs": {
        "text": "",
        "clip": [
          "2",
          0
        ]
      },
      "outputs": [
        "CONDITIONING"
      ]
    },
    "5": {
      "class_type": "EmptyLatentAudio",
      "inputs": {
        "seconds": "{{duration_seconds}}",
        "batch_size": 1
      },
      "outputs": [
        "LATENT"
      ]
    },
    "6": {
      "class_type": "KSampler",
      "inputs": {
        "model": [
          "1",
          0
        ],
        "positive": [
          "3",
          0
        ],
        "negative": [
          "4",
          0
        ],
        "latent_image": [
          "5",
          0
        ],
        "seed": "{{seed}}",
        "steps": 8,
        "cfg": 1.0,
        "sampler_name": "lcm",
        "scheduler": "simple",
        "denoise": 1.0
      },
      "outputs": [
        "LATENT"
      ],
      "_comment": "Distilled SA3 reference (medium template): 8 steps, cfg 1, lcm/simple; applied to the small_sfx distilled variant."
    },
    "7": {
      "class_type": "VAEDecodeAudio",
      "inputs": {
        "samples": [
          "6",
          0
        ],
        "vae": [
          "1",
          2
        ]
      },
      "outputs": [
        "AUDIO"
      ]
    },
    "8": {
      "class_type": "AudioLoudnessNormalize",
      "inputs": {
        "audio": [
          "7",
          0
        ],
        "target_lufs": -16.0
      },
      "outputs": [
        "AUDIO"
      ]
    },
    "9": {
      "class_type": "SaveAudioMP3",
      "inputs": {
        "audio": [
          "8",
          0
        ],
        "filename_prefix": "sfx_sound_designer",
        "quality": "V0"
      },
      "outputs": []
    }
  },
  "prompt_construction": {
    "template": "{prompt}, {sfx_type} sound effect, {intensity} intensity, {spatial_profile} space, production quality, clean transients",
    "variables": {
      "prompt": "{{prompt}}",
      "sfx_type": "{{sfx_type}}",
      "intensity": "{{intensity}}",
      "spatial_profile": "{{spatial_profile}}"
    }
  },
  "output_spec": {
    "type": "audio",
    "format": "mp3",
    "codec": "pcm_s16le",
    "channels": 2,
    "description": "Mastered SFX waveform",
    "audio_package": {
      "mixdown": {
        "artifact_id": "audio_mixdown",
        "path_template": "audio/{{job_id}}/mixdown/sfx-master.wav",
        "format": "wav",
        "sample_rate_hz": 48000,
        "bit_depth": 24,
        "channels": 2,
        "codec": "pcm_s24le"
      },
      "stems": {
        "format": "wav",
        "sample_rate_hz": 48000,
        "bit_depth": 24,
        "channels": 2,
        "artifacts": [
          {
            "stem": "fx",
            "artifact_id": "stem_fx",
            "path_template": "audio/{{job_id}}/stems/fx.wav",
            "required": true
          },
          {
            "stem": "ambience",
            "artifact_id": "stem_ambience",
            "path_template": "audio/{{job_id}}/stems/ambience.wav",
            "required": false
          }
        ],
        "archive": {
          "artifact_id": "stems_archive",
          "path_template": "audio/{{job_id}}/stems/stems.zip",
          "format": "zip"
        }
      },
      "multi_track": {
        "format": "wav",
        "sample_rate_hz": 48000,
        "bit_depth": 24,
        "channels": 2,
        "artifacts": [
          {
            "track": "dialogue",
            "artifact_id": "multitrack_dialogue",
            "path_template": "audio/{{job_id}}/multitrack/dialogue.wav",
            "required": false
          },
          {
            "track": "sfx",
            "artifact_id": "multitrack_sfx",
            "path_template": "audio/{{job_id}}/multitrack/sfx.wav",
            "required": true
          },
          {
            "track": "music",
            "artifact_id": "multitrack_music",
            "path_template": "audio/{{job_id}}/multitrack/music.wav",
            "required": false
          }
        ],
        "archive": {
          "artifact_id": "multitrack_archive",
          "path_template": "audio/{{job_id}}/multitrack/multitrack.zip",
          "format": "zip"
        }
      },
      "loudness": {
        "artifact_id": "loudness_report",
        "path_template": "audio/{{job_id}}/analysis/loudness-report.json",
        "format": "json",
        "standard": "ebu-r128",
        "target_integrated_lufs": -16,
        "max_true_peak_dbtp": -1
      },
      "compliance": {
        "artifact_id": "audio_compliance_report",
        "path_template": "audio/{{job_id}}/analysis/audio-compliance-report.json",
        "format": "json",
        "loudness_tolerance_lufs": 1.0,
        "true_peak_tolerance_dbtp": 0.3,
        "max_clipping_percent": 0.1,
        "enforce_format_normalization": true
      },
      "cue_sheet": {
        "artifact_id": "cue_sheet",
        "path_template": "audio/{{job_id}}/metadata/cue-sheet.csv",
        "format": "csv",
        "include_timecode": true,
        "include_beat_markers": false,
        "include_sections": true
      }
    }
  },
  "custom_nodes_required": [
    "AudioLoudnessNormalize"
  ],
  "models_required": [
    "stable_audio_3_small_sfx.safetensors",
    "t5gemma_b_b_ul2.safetensors"
  ]
}
