Update the Imaginate image generation API (#836)

* Update the Imaginate feature server API

* Change connection status strategy to prevent console errors

* Possible CORS fix? Maybe revert.

* Update to the final API and fix bugs
This commit is contained in:
Keavon Chambers
2022-11-02 17:20:29 -07:00
parent 9d56e86203
commit 5be59f7fce
3 changed files with 121 additions and 227 deletions

View File

@@ -615,7 +615,7 @@ fn node_section_imaginate(imaginate_layer: &ImaginateLayer, layer: &Layer, persi
}))],
ImaginateStatus::Generating => vec![WidgetHolder::new(Widget::TextButton(TextButton {
label: "Terminate".into(),
tooltip: "Cancel in-progress image generation and keep the latest progress".into(),
tooltip: "Cancel the in-progress image generation and keep the latest progress".into(),
on_update: WidgetCallback::new(|_| DocumentMessage::ImaginateTerminate.into()),
..Default::default()
}))],
@@ -745,7 +745,7 @@ fn node_section_imaginate(imaginate_layer: &ImaginateLayer, layer: &Layer, persi
},
LayoutGroup::Row {
widgets: {
let tooltip = "Number of iterations to improve the image generation quality, with diminishing returns around 40".to_string();
let tooltip = "Number of iterations to improve the image generation quality, with diminishing returns around 40 when using the Euler A sampling method".to_string();
vec![
WidgetHolder::new(Widget::TextLabel(TextLabel {
value: "Sampling Steps".into(),
@@ -774,13 +774,7 @@ fn node_section_imaginate(imaginate_layer: &ImaginateLayer, layer: &Layer, persi
},
LayoutGroup::Row {
widgets: {
let tooltip = "
Algorithm used to generate the image during each sampling step.\n\
\n\
'DPM Fast' and 'DPM Adaptive' do not support live refreshing updates.
"
.trim()
.to_string();
let tooltip = "Algorithm used to generate the image during each sampling step".to_string();
let sampling_methods = ImaginateSamplingMethod::list();
let mut entries = Vec::with_capacity(sampling_methods.len());