---
config:
  layout: elk
  theme: base
---
flowchart TB
 subgraph Algo["Algorithm"]
        Flow["Flow matching"]
        Diff["Diffusion"]
        T["Training"]
  end
 subgraph SBI["SBI pipeline"]
        M["Model (Flux1, Simformer, etc)"]
        Sampler["Sampler p(θ|x)"]
        Algo
  end
    D["Data (θ, x)"] ==> SBI
    M --> Algo
    Flow -.- T
    Diff -.- T
    Algo --> Sampler
    SBI ==> S["Samples: θ ~ p(θ|x)"]

    T@{ shape: subproc}
    D@{ shape: cyl}
     T:::Peach
     D:::Ash
     S:::Aqua
    classDef Aqua stroke-width:1px, stroke-dasharray:none, stroke:#46EDC8, fill:#DEFFF8, color:#378E7A
    classDef Sky stroke-width:1px, stroke-dasharray:none, stroke:#374D7C, fill:#E2EBFF, color:#374D7C
    classDef Peach stroke-width:1px, stroke-dasharray:none, stroke:#FBB35A, fill:#FFEFDB, color:#8F632D
    classDef Ash stroke-width:1px, stroke-dasharray:none, stroke:#999999, fill:#EEEEEE, color:#000000
    style SBI fill:#BBDEFB