mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-17 00:13:17 +00:00
d51eec52c3
This PR begins scaffolding the Stable Diffusion Turbo application (title
TBD), which is a separate frontend for Storyteller Engine which focuses
on image generation.
### Design Overview
* The application renders a "split-screen" view, with Storyteller Studio
on the left, and the Stable Diffusion Turbo output on the right
* When changes are made in the Studio editor:
- A screenshot is taken from the Bevy application
- Screenshot is piped into Stable Diffusion Turbo model
- Model output is rendered to the screen
* This all happens in as close to real-time as possible
### Work completed in this PR
* The `studio-frontend` project has been (somewhat crudely) refactored
to split most of its components into reusable libraries
- `studio-ui` is a use-case-agnostic design system library for core UI
components. These are "dumb" components which are controlled
via `@property` inputs and send `CustomEvent`s in response to user
input.
- `studio-frontend` is a collection of reusable Storyteller Studio
widgets. These are "smart" components which depend on
`@storyteller/studio` directly, manage their own state, and require very
little configuration or styling. They are designed to be drop-in
building blocks that can be reused between various frontends.
* The new application has been bootstrapped as `image-generator-demo`
- Currently, this simply grabs screenshots from the Bevy application and
renders those screenshots on the right side of the split-screen view. A
future PR will wire up to the Storyteller.ai backend to pipe these
screenshots through Stable Diffusion Turbo, and render that model's
output instead.
### Testing
* Install dependencies as described in the repo's README
* Run `npx nx serve image-generator-demo`
* Open [localhost:4200](http://localhost:4200) in your browser
- Use the camera controller in the left side of the view to manipulate
the Bevy scene
- Verify the right side of the view updates with a fresh screenshot at a
rate of ~5 fps
* Toggle the "Realtime Capture" checkbox
- Verify the right side view no longer updates while the user is
actively manipulating the editor
- This should allow the app to run smoother on lower-spec hardware
---------
Co-authored-by: Danny McGee <dannymcgee@gmail.com>
85 lines
1.7 KiB
TOML
85 lines
1.7 KiB
TOML
[package]
|
|
name = "studio"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[lib]
|
|
name = "studio"
|
|
crate-type = ["cdylib", "rlib"]
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "studio-standalone"
|
|
path = "src/main.rs"
|
|
|
|
[[bin]]
|
|
name = "studio-headless"
|
|
path = "src/main-headless.rs"
|
|
|
|
[dependencies]
|
|
bevy-inspector-egui = "0.22.0"
|
|
bevy_mod_raycast = "0.16.0"
|
|
bevy_rapier3d = "0.23.0"
|
|
bevy_mod_outline = "0.6.0"
|
|
bevy_web_asset = "0.7.0"
|
|
bitflags = "2.4.0"
|
|
console_error_panic_hook = { version = "0.1.7", optional = true }
|
|
itertools = "0.12.1"
|
|
js-sys = { version = "0.3.65", optional = true }
|
|
parking_lot = "0.12.1"
|
|
serde = "1.0.192"
|
|
serde-wasm-bindgen = { version = "0.6.1", optional = true }
|
|
serde_json = "1.0.108"
|
|
studio-bvh = { path = "../studio-bvh" }
|
|
wasm-bindgen = "0.2.84"
|
|
web-sys = { version = "0.3.65", optional = true, features = [
|
|
"CustomEvent",
|
|
"CustomEventInit",
|
|
"Document",
|
|
"HtmlElement",
|
|
"Window",
|
|
] }
|
|
clap = { version = "4.4.18", features = ["derive"] }
|
|
futures-intrusive = "0.5.0"
|
|
wgpu = "0.17.1"
|
|
futures-lite = "2.2.0"
|
|
futures = "0.3.30"
|
|
image = "0.24.8"
|
|
bytemuck = "1.14.1"
|
|
space_editor = {git = "https://github.com/rewin123/space_editor", rev = "ce83f86dc902787ab16213f3209276a784654df6"}
|
|
anyhow.workspace = true
|
|
|
|
[dependencies.reqwest]
|
|
version = "0.11.24"
|
|
features = [
|
|
"default",
|
|
"json",
|
|
"stream",
|
|
]
|
|
|
|
[features]
|
|
wasm = [
|
|
"dep:console_error_panic_hook",
|
|
"dep:js-sys",
|
|
"dep:serde-wasm-bindgen",
|
|
"dep:web-sys",
|
|
"bevy_rapier3d/wasm-bindgen",
|
|
]
|
|
desktop = []
|
|
wasm_screenshot = []
|
|
|
|
[dependencies.bevy]
|
|
workspace = true
|
|
|
|
[dependencies.bevy_mod_picking]
|
|
version = "0.17.0"
|
|
default-features = false
|
|
features = [
|
|
"backend_bevy_ui",
|
|
"backend_rapier",
|
|
"backend_raycast",
|
|
"backend_sprite",
|
|
"debug",
|
|
"selection",
|
|
]
|