|
|
|
@ -42,13 +42,15 @@ public class JmText2Image extends JmCommon {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
|
//更多例子参考:https://www.volcengine.com/docs/85621/1537648
|
|
|
|
|
//String prompt = "制作一张vlog视频封面。马卡龙配色,美女旅游照片+色块的拼贴画风格,主文案是“威海旅游vlog”,副文案是“特种兵一日游 被低估的旅游城市”,海报主体是一个穿着短裙、梳双马尾的少女,人物白色描边";
|
|
|
|
|
String prompt = "过曝,强对比,夜晚,雪地里,巨大的黄色浴缸,小狗泡澡带墨镜,在喝红酒,胶片摄影,毛刺质感,复古滤镜,夜晚,过度曝光,古早,70年代摄影,复古老照片,闪光灯拍摄,闪光灯效果,过曝,过度曝光,闪光灯过曝,极简,高饱和复古色,70s vintage photography, vintage, retro style";
|
|
|
|
|
//String prompt = "过曝,强对比,夜晚,雪地里,巨大的黄色浴缸,小狗泡澡带墨镜,在喝红酒,胶片摄影,毛刺质感,复古滤镜,夜晚,过度曝光,古早,70年代摄影,复古老照片,闪光灯拍摄,闪光灯效果,过曝,过度曝光,闪光灯过曝,极简,高饱和复古色,70s vintage photography, vintage, retro style";
|
|
|
|
|
String prompt="南瓜羹->画面展现一碗百合南瓜羹的一半,米黄色的糯米粉勾芡,块块橙色南瓜在橙色粥中,南瓜丝丝沙沙质感,紫白色百合点缀";
|
|
|
|
|
// 获取项目根目录路径
|
|
|
|
|
String projectRoot = System.getProperty("user.dir").replace("\\","/")+"/dsAiSupport";
|
|
|
|
|
// 拼接相对路径
|
|
|
|
|
String basePath = projectRoot + "/src/main/java/com/dsideal/aiSupport/Util/JiMeng/Example/";
|
|
|
|
|
String saveImagePath = basePath + "2.jpg";
|
|
|
|
|
String saveImagePath = basePath + "3.jpg";
|
|
|
|
|
log.info("保存图片路径:" + saveImagePath);
|
|
|
|
|
JmText2Image.generateImage(prompt, saveImagePath);
|
|
|
|
|
}
|
|
|
|
|