mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-20 16:45:10 +00:00
add gpt-image-1 model
This commit is contained in:
1 parent
1613386012
commit
66340bd990
2 files changed
+21
No files matched your search
@@ -13,6 +13,8 @@ pub enum CommonImageModel {
|
||||
FluxPro11,
|
||||
#[serde(rename = "flux_pro_1p1_ultra")]
|
||||
FluxPro11Ultra,
|
||||
#[serde(rename = "gpt_image_1")]
|
||||
GptImage1,
|
||||
#[serde(rename = "gpt_image_1p5")]
|
||||
GptImage1p5,
|
||||
#[serde(rename = "nano_banana")]
|
||||
@@ -37,6 +39,7 @@ impl CommonImageModel {
|
||||
Self::Flux1Schnell => CommonModelType::Flux1Schnell,
|
||||
Self::FluxPro11 => CommonModelType::FluxPro11,
|
||||
Self::FluxPro11Ultra => CommonModelType::FluxPro11Ultra,
|
||||
Self::GptImage1 => CommonModelType::GptImage1,
|
||||
Self::GptImage1p5 => CommonModelType::GptImage1p5,
|
||||
Self::NanoBanana => CommonModelType::NanoBanana,
|
||||
Self::NanoBanana2 => CommonModelType::NanoBanana2,
|
||||
@@ -60,6 +63,7 @@ mod tests {
|
||||
(CommonImageModel::Flux1Schnell, CommonModelType::Flux1Schnell),
|
||||
(CommonImageModel::FluxPro11, CommonModelType::FluxPro11),
|
||||
(CommonImageModel::FluxPro11Ultra, CommonModelType::FluxPro11Ultra),
|
||||
(CommonImageModel::GptImage1, CommonModelType::GptImage1),
|
||||
(CommonImageModel::GptImage1p5, CommonModelType::GptImage1p5),
|
||||
(CommonImageModel::NanoBanana, CommonModelType::NanoBanana),
|
||||
(CommonImageModel::NanoBanana2, CommonModelType::NanoBanana2),
|
||||
|
||||
@@ -188,6 +188,23 @@ fn build_omni_gen_image_models() -> Vec<OmniGenImageModelDetails> {
|
||||
..Default::default()
|
||||
});
|
||||
|
||||
models.push(OmniGenImageModelDetails {
|
||||
model: CommonImageModel::GptImage1,
|
||||
full_name: Some("GPT Image 1".to_string()),
|
||||
text_prompt_supported: Some(true),
|
||||
image_refs_supported: Some(true),
|
||||
aspect_ratio_options: Some(vec![
|
||||
CommonAspectRatio::Square,
|
||||
CommonAspectRatio::WideThreeByTwo,
|
||||
CommonAspectRatio::TallTwoByThree,
|
||||
]),
|
||||
aspect_ratio_default: Some(CommonAspectRatio::Square),
|
||||
batch_size_min: Some(1),
|
||||
batch_size_max: Some(4),
|
||||
batch_size_default: Some(1),
|
||||
..Default::default()
|
||||
});
|
||||
|
||||
models.push(OmniGenImageModelDetails {
|
||||
model: CommonImageModel::GptImage1p5,
|
||||
full_name: Some("GPT Image 1.5".to_string()),
|
||||
|
||||
Reference in new issue
Block a user