Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion node-graph/graph-craft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0"
authors.workspace = true

[features]
default = ["dealloc_nodes", "wgpu"]
default = ["dealloc_nodes", "wgpu", "loading"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: loading is already enabled by graphene-cli, so adding it to graph-craft's default features won't change the CLI build and instead enables that feature for every default consumer.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At node-graph/graph-craft/Cargo.toml, line 9:

<comment>`loading` is already enabled by `graphene-cli`, so adding it to `graph-craft`'s default features won't change the CLI build and instead enables that feature for every default consumer.</comment>

<file context>
@@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0"
 
 [features]
-default = ["dealloc_nodes", "wgpu"]
+default = ["dealloc_nodes", "wgpu", "loading"]
 dealloc_nodes = ["core-types/dealloc_nodes"]
 wgpu = ["wgpu-executor"]
</file context>
Suggested change
default = ["dealloc_nodes", "wgpu", "loading"]
default = ["dealloc_nodes", "wgpu"]

dealloc_nodes = ["core-types/dealloc_nodes"]
wgpu = ["wgpu-executor"]
tokio = ["dep:tokio"]
Expand Down
2 changes: 1 addition & 1 deletion node-graph/graphene-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ futures = { workspace = true }
fern = { workspace = true }
chrono = { workspace = true }
wgpu = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread"] }
tokio = { workspace = true }
clap = { workspace = true, features = ["cargo", "derive"] }
image = { workspace = true }
wgpu-executor = { workspace = true, optional = true }
Expand Down
6 changes: 5 additions & 1 deletion node-graph/graphene-cli/src/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ pub async fn export_document(
let gpu_raster = Raster::<GPU>::new_gpu(image_texture.texture.as_ref().clone());
let cpu_raster: Raster<CPU> = gpu_raster.convert(Footprint::BOUNDLESS, wgpu_executor).await;
let (data, width, height) = cpu_raster.to_flat_u8();
// Explicitly drop texture to make sure it lives long enough
std::mem::drop(image_texture);

// Encode and write raster image
write_raster_image(output_path, file_type, data, width, height, transparent)?;
Expand Down Expand Up @@ -200,8 +202,10 @@ pub async fn export_gif(
let (data, img_width, img_height) = match result {
TaggedValue::RenderOutput(output) => match output.data {
RenderOutputType::Texture(image_texture) => {
let gpu_raster = Raster::<GPU>::new_gpu(image_texture.texture);
let gpu_raster = Raster::<GPU>::new_gpu(image_texture.texture.as_ref().clone());
let cpu_raster: Raster<CPU> = gpu_raster.convert(Footprint::BOUNDLESS, wgpu_executor).await;
// Explicitly drop texture to make sure it lives long enough
std::mem::drop(image_texture);
cpu_raster.to_flat_u8()
}
RenderOutputType::Buffer { data, width, height } => (data, width, height),
Expand Down
Loading