INNER CODE UNIT · Python

ax

F-R-L/forge-film · forge/webui/app.py:31

    fig, ax = plt.subplots(figsize=(max(6, len(plan.scenes) * 1.2), 4))
    ax.set_xlim(0, len(plan.scenes) + 1)
    ax.set_ylim(-1, 2)
    ax.axis("off")
    ax.set_title(f"{plan.title} — DAG", fontsize=13, fontweight="bold")

    scene_ids = [s.id for s in plan.scenes]
    x_pos = {sid: i + 1 for i, sid in enumerate(scene_ids)}
    y_pos = 0.5

    # Draw edges
    for src, dsts in plan.dag.items():
        for dst in dsts:
            if src in x_pos and dst in x_pos:
                ax.annotate(
                    "",
                    xy=(x_pos[dst], y_pos),
                    xytext=(x_pos[src], y_pos),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…