@@ -1466,7 +1466,6 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
14661466 // description: Cow::Borrowed("TODO"),
14671467 // properties: None,
14681468 // },
1469- // (*IMAGINATE_NODE).clone(),
14701469 DocumentNodeDefinition {
14711470 identifier: "Path" ,
14721471 category: "Vector" ,
@@ -2119,128 +2118,6 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
21192118 document_node_derive:: post_process_nodes ( custom)
21202119}
21212120
2122- // pub static IMAGINATE_NODE: Lazy<DocumentNodeDefinition> = Lazy::new(|| DocumentNodeDefinition {
2123- // identifier: "Imaginate",
2124- // category: "Raster",
2125- // node_template: NodeTemplate {
2126- // document_node: DocumentNode {
2127- // implementation: DocumentNodeImplementation::Network(NodeNetwork {
2128- // exports: vec![NodeInput::node(NodeId(1), 0)],
2129- // nodes: [
2130- // DocumentNode {
2131- // inputs: vec![NodeInput::network(concrete!(RasterDataTable<CPU>), 0)],
2132- // implementation: DocumentNodeImplementation::proto("graphene_core::memo::MonitorNode"),
2133- // manual_composition: Some(concrete!(Context)),
2134- // skip_deduplication: true,
2135- // ..Default::default()
2136- // },
2137- // DocumentNode {
2138- // inputs: vec![
2139- // NodeInput::node(NodeId(0), 0),
2140- // NodeInput::network(concrete!(&WasmEditorApi), 1),
2141- // NodeInput::network(concrete!(ImaginateController), 2),
2142- // NodeInput::network(concrete!(f64), 3),
2143- // NodeInput::network(concrete!(Option<DVec2>), 4),
2144- // NodeInput::network(concrete!(u32), 5),
2145- // NodeInput::network(concrete!(ImaginateSamplingMethod), 6),
2146- // NodeInput::network(concrete!(f64), 7),
2147- // NodeInput::network(concrete!(String), 8),
2148- // NodeInput::network(concrete!(String), 9),
2149- // NodeInput::network(concrete!(bool), 10),
2150- // NodeInput::network(concrete!(f64), 11),
2151- // NodeInput::network(concrete!(bool), 12),
2152- // NodeInput::network(concrete!(f64), 13),
2153- // NodeInput::network(concrete!(ImaginateMaskStartingFill), 14),
2154- // NodeInput::network(concrete!(bool), 15),
2155- // NodeInput::network(concrete!(bool), 16),
2156- // NodeInput::network(concrete!(u64), 17),
2157- // ],
2158- // implementation: DocumentNodeImplementation::proto("graphene_std::raster::ImaginateNode"),
2159- // ..Default::default()
2160- // },
2161- // ]
2162- // .into_iter()
2163- // .enumerate()
2164- // .map(|(id, node)| (NodeId(id as u64), node))
2165- // .collect(),
2166- // ..Default::default()
2167- // }),
2168- // inputs: vec![
2169- // NodeInput::value(TaggedValue::RasterData(RasterDataTable::default()), true),
2170- // NodeInput::scope("editor-api"),
2171- // NodeInput::value(TaggedValue::ImaginateController(Default::default()), false),
2172- // NodeInput::value(TaggedValue::F64(0.), false), // Remember to keep index used in `ImaginateRandom` updated with this entry's index
2173- // NodeInput::value(TaggedValue::OptionalDVec2(None), false),
2174- // NodeInput::value(TaggedValue::U32(30), false),
2175- // NodeInput::value(TaggedValue::ImaginateSamplingMethod(ImaginateSamplingMethod::EulerA), false),
2176- // NodeInput::value(TaggedValue::F64(7.5), false),
2177- // NodeInput::value(TaggedValue::String(String::new()), false),
2178- // NodeInput::value(TaggedValue::String(String::new()), false),
2179- // NodeInput::value(TaggedValue::Bool(false), false),
2180- // NodeInput::value(TaggedValue::F64(66.), false),
2181- // NodeInput::value(TaggedValue::Bool(true), false),
2182- // NodeInput::value(TaggedValue::F64(4.), false),
2183- // NodeInput::value(TaggedValue::ImaginateMaskStartingFill(ImaginateMaskStartingFill::Fill), false),
2184- // NodeInput::value(TaggedValue::Bool(false), false),
2185- // NodeInput::value(TaggedValue::Bool(false), false),
2186- // NodeInput::value(TaggedValue::U64(0), false),
2187- // ],
2188- // ..Default::default()
2189- // },
2190- // persistent_node_metadata: DocumentNodePersistentMetadata {
2191- // network_metadata: Some(NodeNetworkMetadata {
2192- // persistent_metadata: NodeNetworkPersistentMetadata {
2193- // node_metadata: [
2194- // DocumentNodeMetadata {
2195- // persistent_metadata: DocumentNodePersistentMetadata {
2196- // display_name: "Monitor".to_string(),
2197- // ..Default::default()
2198- // },
2199- // ..Default::default()
2200- // },
2201- // DocumentNodeMetadata {
2202- // persistent_metadata: DocumentNodePersistentMetadata {
2203- // display_name: "Imaginate".to_string(),
2204- // ..Default::default()
2205- // },
2206- // ..Default::default()
2207- // },
2208- // ]
2209- // .into_iter()
2210- // .enumerate()
2211- // .map(|(id, node)| (NodeId(id as u64), node))
2212- // .collect(),
2213- // ..Default::default()
2214- // },
2215- // ..Default::default()
2216- // }),
2217- // input_properties: vec![
2218- // "Input Image".into(),
2219- // "Editor Api".into(),
2220- // "Controller".into(),
2221- // "Seed".into(),
2222- // "Resolution".into(),
2223- // "Samples".into(),
2224- // "Sampling Method".into(),
2225- // "Prompt Guidance".into(),
2226- // "Prompt".into(),
2227- // "Negative Prompt".into(),
2228- // "Adapt Input Image".into(),
2229- // "Image Creativity".into(),
2230- // "Inpaint".into(),
2231- // "Mask Blur".into(),
2232- // "Mask Starting Fill".into(),
2233- // "Improve Faces".into(),
2234- // "Tiling".into(),
2235- // ],
2236- // output_names: vec!["Image".to_string()],
2237- // ..Default::default()
2238- // },
2239- // },
2240- // description: Cow::Borrowed("TODO"),
2241- // properties: None, // Some(&node_properties::imaginate_properties),
2242- // });
2243-
22442121type NodeProperties = HashMap < String , Box < dyn Fn ( NodeId , & mut NodePropertiesContext ) -> Vec < LayoutGroup > + Send + Sync > > ;
22452122
22462123pub static NODE_OVERRIDES : once_cell:: sync:: Lazy < NodeProperties > = once_cell:: sync:: Lazy :: new ( static_node_properties) ;
@@ -2975,19 +2852,3 @@ impl DocumentNodeDefinition {
29752852 self . node_template_input_override ( self . node_template . document_node . inputs . clone ( ) . into_iter ( ) . map ( Some ) )
29762853 }
29772854}
2978-
2979- // Previously used by the Imaginate node, but usage was commented out since it did nothing.
2980- // pub fn new_image_network(output_offset: i32, output_node_id: NodeId) -> NodeNetwork {
2981- // let mut network = NodeNetwork { ..Default::default() };
2982- // network.push_node_to_document_network(
2983- // resolve_document_node_type("Input Frame")
2984- // .expect("Input Frame node does not exist")
2985- // .to_document_node_default_inputs([], DocumentNodeMetadata::position((8, 4))),
2986- // );
2987- // network.push_node_to_document_network(
2988- // resolve_document_node_type("Output")
2989- // .expect("Output node does not exist")
2990- // .to_document_node([NodeInput::node(output_node_id, 0)], DocumentNodeMetadata::position((output_offset + 8, 4))),
2991- // );
2992- // network
2993- // }
0 commit comments