Files
Ely-GPUI-Components/examples/gallery/pages/generative/mod.rs
T
ZacharyZhang-NY ff4e828795 T25e Generative: models
ModelCard sets a model's maker, what it does, its facts and tags, and
Use unless it is in use. ModelDownloadManager lists downloads with how
much of how much, speed and time left, and Pause, Resume, Cancel,
Retry and Delete by state. ModelStatus marks a model idle, loading,
loaded with its GPU memory, or failed. HardwareMonitor sets a meter per
part beside its history. FineTuneJobCard shows a job's phase, its
epochs and its loss on training and held-out data.

AGENTS.md: after each item, cargo clean -p ely-gpui-component too;
old builds of the crate had filled the disk. The reveal rule names
layout::bring_into_view.
2026-09-26 13:45:17 -04:00

57 lines
1.7 KiB
Rust

mod canvas;
mod models;
mod panel;
mod results;
mod sound;
use gpui::{AnyElement, App, IntoElement, ParentElement, Window, div};
use super::Page;
use crate::script::Step;
pub const PAGE: Page = Page {
number: 25,
slug: "generative",
title: "Generative",
summary: "Making pictures, sound and video with a model: the prompt and its settings, the queue and what comes back, the canvas, and the models behind them.",
render,
script: SCRIPT,
};
const SCRIPT: &[Step] = &[
Step::DownAt("gen-enhancer", 356.0, 124.0),
Step::UpAt("gen-enhancer", 356.0, 124.0),
Step::Wait(1400),
Step::Shot("suggested"),
Step::DownAt("gen-queue", 426.0, 280.0),
Step::UpAt("gen-queue", 426.0, 280.0),
Step::Wait(400),
Step::Shot("retried"),
Step::DownAt("gen-ab", 181.0, 147.0),
Step::UpAt("gen-ab", 181.0, 147.0),
Step::Wait(300),
Step::Shot("verdict"),
Step::DownAt("gen-canvas", 300.0, 70.0),
Step::DragTo("gen-canvas", 390.0, 220.0),
Step::UpAt("gen-canvas", 390.0, 220.0),
Step::Wait(300),
Step::Shot("masked"),
];
fn render(window: &mut Window, cx: &mut App) -> AnyElement {
div()
.child(panel::panel(window, cx))
.child(results::queue(window, cx))
.child(results::results(window, cx))
.child(results::variations(window, cx))
.child(canvas::canvas(window, cx))
.child(sound::audio(window, cx))
.child(sound::voice(window, cx))
.child(sound::video(window, cx))
.child(models::cards(window, cx))
.child(models::downloads_section(window, cx))
.child(models::machine(window, cx))
.child(models::tuning(window, cx))
.into_any_element()
}