Эх сурвалжийг харах

为 creatV2 增加新的提示词

100Years 3 өдөр өмнө
parent
commit
30eb26479f

+ 3 - 0
AIEmoji/Business/TSPTPGeneratorVC/TSPhotoToPhotoVC/M/TSPTPStyleModel.swift

@@ -19,6 +19,8 @@ class TSGenerateModel: TSBaseModel {
     var model:String = ""       //走新的通道,根据内容确定
     var unionType:Int = 0 //聚合类型,相同的为一类
     var hintType:Int = 1 // 提示上传图片类型
+    var template:String = "" //创建视频 V2的 模板
+    
     override func mapping(map: ObjectMapper.Map) {
         imageName               <- map["imageName"]
         imageText               <- map["imageText"]
@@ -29,6 +31,7 @@ class TSGenerateModel: TSBaseModel {
         model                   <- map["model"]
         unionType               <- map["unionType"]
         hintType                <- map["hintType"]
+        template                <- map["template"]
     }
     
 }

+ 1 - 1
AIEmoji/Business2/DisCover/Data/TSAIGeneratorModel.swift

@@ -38,7 +38,7 @@ class TSAIGeneratorModel {
     var upLoadImageUrl:String?
     var upLoadImageUrls:[String] = []
     var model:String = ""   //决定生图的模型
-    
+    var template:String = ""
     var advance:Bool{
         return model == kie
     }

+ 41 - 20
AIEmoji/Business2/DisCover/Data/TSDiscoverViewModel+Dic.swift

@@ -11,6 +11,7 @@ private let prompt = "prompt"
 private let isVip = "isVip"
 private let specialStyle = "specialStyle"
 private let unionType = "unionType"
+private let template = "template"
 
 private let model = "model"             //走新的通道,根据内容确定
 let kie = "kie"                 //走kie--chatgpt
@@ -219,7 +220,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_Mermaid",
             imageText: "Mermaid",
-            prompt:"fishermen",
+            prompt:"In the [scene/background], there appear [description of the number and type of subjects] — [description of subject 1], [description of subject 2], etc. Their initial state is: [action state, e.g., standing, sitting, looking up], with expressions that convey [emotion keywords].\n\nHowever, at this moment, a transformation into mermaids is taking place:\nEach subject is undergoing the following changes — the scene shifts to an underwater world, and the subjects have fully transformed into mermaid forms. They are now wearing silver-scaled chest armor and fish tails, with clearly defined muscles and determined gazes. Surrounding them are drifting water plants and soft light spots. Coral and seaweed sway gracefully in the current, creating an ethereal and beautiful atmosphere.\n\nNote: The subjects can be people, actions, objects, etc.\n\nRequirements:\n\nReplace the content inside the brackets [] with specific details from the image. The initial state should describe the subject’s actual state in the image.\n\nIf the image is a close-up or medium shot, set Camera Movement to Zoom out.\n\nIf there are two or more subjects in the image, all of them should undergo “the above transformation”.\n\nDescribe the transformation process of each subject in detail, especially the movement and transformation steps.\n\n(To distinguish between subjects, use clear and recognizable identifiers. For example: “the man on the left,” “the woman on the right,” “the man in the black hoodie,” “the little girl in the white dress,” etc.)",
+            template:"fishermen",
             specialStyle:0,
             isVip: false,
             unionType: videoUnionType,
@@ -232,7 +234,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_Fairy",
             imageText: "Fairy",
-            prompt:"fairy_me",
+            prompt:"The character gently opens her arms, as if sensing the magical energy flowing around her. At the same time, she spins swiftly in a full circle — her dress lifts with the motion, and her hair whirls through the air, marking the beginning of her transformation.\nAs she rotates 360 degrees, a glowing green magical ring rises from beneath her feet, like a forest spirit being summoned. Behind her, a luminous magic circle formed by glowing vines gradually appears, radiating a vibrant green light.\nAs the spinning intensifies, her entire body becomes enveloped in shimmering particles of light. A deep emerald satin bustier materializes from the air, forming tightly around her torso from top to bottom, with delicate leaf-vein embroidery stitched into the fabric.\nNext, a flowing skirt made of leaf-cut tulle swiftly takes shape below, fluttering lightly as if dancing with the surrounding magical air. Strands of golden vine weave into her hair, and soon, a vine-crafted crown embedded with a jade gemstone forms on her forehead.\nGolden magical bracelets entwine around her wrists, while nature-textured high boots rise around her legs. Finally, a pair of translucent butterfly wings with golden edges unfold behind her — as delicate as morning mist.",
+            template:"fairy_me",
             specialStyle:0,
             isVip: false,
             unionType: videoUnionType,
@@ -245,7 +248,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_HappyBirthday",
             imageText: "Happy Birthday",
-            prompt:"happy_birthday",
+            prompt:"Do not include any elements that are not present in the original image.\nAll characters in the image sway left and right with energy, creating a lively atmosphere. The characters wear natural smiles.\nEach character holds a cake plate with one hand, while the other arm swings side to side.\nCamera angle: Must remain strictly fixed.\nElement restrictions: It is forbidden to add any characters, facial details, position changes, or decorative elements that did not appear in the original image.",
+            template:"happy_birthday",
             specialStyle:0,
             isVip: true,
             unionType: videoUnionType,
@@ -258,7 +262,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_SurpriseFlower",
             imageText: "Surprise Flower",
-            prompt:"flower_receive",
+            prompt:"A large bouquet of flowers enters the frame from off-screen and is handed to the character in the image. The character reaches out with both hands to receive the bouquet, eyes wide open in surprise, followed by a joyful smile.\n**# Requirements:**\n1. Only the hand of the person giving the flowers should appear in the frame.\n2. The bouquet should consist of roses in random colors.\n3. The bouquet must have delicate and refined packaging.\n4. If the image contains multiple characters, the flowers should be handed to one of them only.",
+            template:"flower_receive",
             specialStyle:0,
             isVip: false,
             unionType: videoUnionType,
@@ -271,7 +276,7 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_Lafufu",
             imageText: "Lafufu",
-            prompt:"ladudu_me_random",
+            prompt:"",
             specialStyle:0,
             isVip: false,
             unionType: videoUnionType,
@@ -284,7 +289,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_AnimeMe",
             imageText: "Anime Me",
-            prompt:"ghibli",
+            prompt:"If the subject is a person or an animal:\\nSubject:'The subject waves their right hand toward the camera. The entire scene gradually and smoothly transforms into the style of a Studio Ghibli animation. Please ensure that the subject’s facial features and clothing details remain clearly visible, and that the transformation appears natural and fluid.'\\nIf the subject is a landscape:\\nSubject:'The entire scene smoothly transitions into the visual style of a Studio Ghibli animation' ",
+            template:"ghibli",
             specialStyle:0,
             isVip: true,
             unionType: videoUnionType,
@@ -297,7 +303,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_PettoHuman",
             imageText: "Pet to Human",
-            prompt:"pet2human",
+            prompt:"The subject in the picture went through a seamless transition",
+            template:"pet2human",
             specialStyle:0,
             isVip: true,
             unionType: videoUnionType,
@@ -310,7 +317,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_MakingFace",
             imageText: "Making Face",
-            prompt:"make_face",
+            prompt:"The camera remains stationary. The subject stands still with hands on hips, head slightly tilted to the left, and a smiling expression. Then, the subject begins walking forward—directly toward the camera. Upon reaching the front of the lens, they simultaneously strike a playful pose and expression: mouth wide open, tongue sticking out, and eyes rolled upward. All movements are synchronized and well-coordinated.\nRequirements: If there are multiple subjects in the image, all of them should perform the above actions in unison.",
+            template:"make_face",
             specialStyle:0,
             isVip: false,
             unionType: videoUnionType,
@@ -323,7 +331,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_Robot",
             imageText: "Robot",
-            prompt:"mecha_x",
+            prompt:"Video content\\n The subject in the image gradually transforms into a futuristic robot. During this metamorphosis, the various parts of the original object are dynamically reassembled, disassembled, and recombined, ultimately forming an entirely new robotic figure that seamlessly blends mechanical details, illuminated elements, and fluid lines.",
+            template:"mecha_x",
             specialStyle:0,
             isVip: false,
             unionType: videoUnionType,
@@ -336,7 +345,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "ptp_style_WalkingwithBeasts",
             imageText: "Walking with Beasts",
-            prompt:"beast_companion",
+            prompt:"Video content\\n The characters in Image 1 and Image 2 walk confidently side by side, slowly approaching the camera.\\n# Requirements\\n The setting is a modern fashion runway with a glossy white surface, surrounded by an audience seated in a dimly lit room. The atmosphere is sophisticated and focused, with the spotlight on the two characters as they make their way down the runway.\\n# Requirements\\n1.Please strictly follow my instructions; the image only supplements the character's appearance details.\\n2.Camera Movement: Zoom out.\\n3.Emphasize standing confidently,arrogant and look straight ahead.\\n4.Do not include descriptions like holding hands.\\n5.shot_size:Wide Shot.\\n6.Emphasize that male roles are slightly higher than female roles.\\n7.Emphasize starting with two characters side by side.\\n8.Emphasize the character facing the camera.",
+            template:"beast_companion",
             specialStyle:0,
             isVip: true,
             unionType: videoUnionType,
@@ -349,7 +359,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_FunnyPet",
             imageText: "Funny Pet",
-            prompt:"split_stance_pet",
+            prompt:"In the [scene/background], the image features [number and types of subjects] — [description of subject 1], [description of subject 2] (if applicable). They are [current pose — e.g., standing, sitting, gazing upward, etc.].Next, the subject begins to perform a full split kick (Y-scale) movement, described as follows:\\nThe subject stands steadily on one leg, which remains straight and firm, demonstrating excellent balance. The other leg is extended and lifted high, with toes pointed straight toward the sky, closely aligned with the torso. Simultaneously, both arms stretch out widely to the sides, forming a perpendicular angle (90 degrees) with the raised leg. The entire pose is elegant and expansive, showcasing a perfect blend of flexibility and control, radiating both strength and grace.\\nRequirements:\\n1.Replace all bracketed [ ] content based on the specific details of the image.\\n2.If the image is a close-up or medium shot, set Camera Movement to Zoom out.\\n3.If there are two subjects in the image, both should be performing the full split kick (Y-scale).\\n4.Describe the transition into the pose in detail, including how the subject shifts their weight, lifts their leg, and spreads their arms",
+            template:"split_stance_pet",
             specialStyle:0,
             isVip: false,
             unionType: videoUnionType,
@@ -362,7 +373,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_Fly",
             imageText: "Fly",
-            prompt:"flying",
+            prompt:"Video content\\n The character in the image floats and flies like a superhero.\\n# Requirements\\n1.Camera Movement:track-up shot.\\n2.Motion Level:Large.",
+            template:"flying",
             specialStyle:0,
             isVip: false,
             unionType: videoUnionType,
@@ -376,7 +388,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_Pinch",
             imageText: "Pinch",
-            prompt:"pinch",
+            prompt:"Video content\\n The scene begins, with the subject remaining still. Then, a pair of large hands appear, grabbing the subject and squeezing it flat like clay.As the subject gradually shrinks, it becomes soft and deformed, pinched between the fingers.\\n# Requirements\\n1.Determine the number of subjects based on the user's uploaded image, and each subject must be pinched flat.\\n2. Motion Level set to: Middle\\n3. Take my video content as the primary element, and ensure that the background description is consistent and reasonable, without repeating the description.",
+            template:"pinch",
             specialStyle:0,
             isVip: false,
             unionType: videoUnionType,
@@ -389,7 +402,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_Grabdoll",
             imageText: "Grab doll",
-            prompt:"claw_me",
+            prompt:"Video content\\n The claw descends towards the doll, and the doll remains completely still throughout the process, undisturbed by anything. When the claw makes contact with the doll, it grabs it firmly. Subsequently, the claw lifts the doll entirely off the platform, suspending it in mid - air, and successfully capturing it. The doll doesn't move at all before the contact, and after being grabbed, it remains inside the display window of the claw machine.\\nProhibited actions:\\nThe doll is prohibited from moving towards the claw on its own.\\nThe metal claw is prohibited from appearing outside the claw maachine\\nThe doll is prohibited from appearing outside the claw machine",
+            template:"claw_me",
             specialStyle:0,
             isVip: true,
             unionType: videoUnionType,
@@ -402,7 +416,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_ToyMe",
             imageText: "Toy Me",
-            prompt:"toy_me",
+            prompt:"At the beginning of the video, the subject in the image stands naturally, facing the camera. Then, it slowly turns around. At the exact moment when its back is to the camera, the transformation begins — the surface becomes smooth and glossy, gradually taking on a plastic-like texture. By the end of the turn, the subject has fully transformed into a finely crafted figurine standing firmly on a smooth, circular base. Its pose and silhouette remain unchanged, with details such as surface textures, contours, and structural features clearly preserved, as if the figure has just been placed on display. The entire transformation is smooth and elegant, capturing the magical transition from a living or real-world entity to a collectible model.\n### Requirements:\n1. Determine the number of characters based on the input image — **all subject must undergo the transformation**.\n2. Strictly describe the subject's visual characteristics based on the image — do not add or assume features not shown.\n3. The final figurine(s) must be firmly and naturally placed on a round, smooth, circular base. The base should be clearly visible and consistent with collectible display models",
+            template:"toy_me",
             specialStyle:0,
             isVip: false,
             unionType: videoUnionType,
@@ -415,7 +430,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_Hulk",
             imageText: "Hulk",
-            prompt:"hulk",
+            prompt:"Video content\\nThe character experiences a radical transformation where their body shatters into numerous fragments. From the dispersing pieces, a strong force emerges, remolding them into a much larger and more powerful form. The muscles enlarge and reshape, creating a huge, towering Red Giant. The remnants of the shredded body vanish into chaos, leaving only this powerful being with bulging muscles and a fierce look, wearing only tattered shorts. Its thunderous roar shakes the ground and debris swirls around, signifying the intense and violent appearance of this new, unstoppable form.",
+            template:"hulk",
             specialStyle:0,
             isVip: true,
             unionType: videoUnionType,
@@ -428,7 +444,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_MuscleUp",
             imageText: "MuscleUp",
-            prompt:"muscling",
+            prompt:"Video content\\n The video shows a man taking off his shirt, revealing his muscular chest.\\n# Requirements\\n1. If the garment is a shirt, he would first unbutton it before removing it, revealing his toned muscles underneath.\\n2. Make sure that after the clothes are removed, they are thrown to one side of the frame.\\n3. Motion Level:Large.\\n4. The description of the 'Subject' should focus on the action of the person taking off the clothes, and then throwing the clothes aside while showing off their muscles.",
+            template:"muscling",
             specialStyle:0,
             isVip: false,
             unionType: videoUnionType,
@@ -441,7 +458,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_FrenchKiss",
             imageText: "French Kiss",
-            prompt:"french_kiss",
+            prompt:"The two figures in the painting move closer and then passionately kiss, alternating with deep and firm intensity.",
+            template:"french_kiss",
             specialStyle:0,
             isVip: false,
             unionType: videoUnionType,
@@ -456,6 +474,7 @@ extension TSDiscoverViewModel {
             imageName: "video_style_PhotoAnimater",
             imageText: "Photo Animater",
             prompt:"Create a smooth and realistic animation based on the uploaded photo. Keep the original identity, style, and appearance while adding natural, subtle, and lively movements. The animation should feel real and immersive, with elegant head tilts, breathing, blinking, and slight body or fur motions to enhance realism. Avoid exaggerated or artificial movements.",
+            template:"",
             specialStyle:0,
             isVip: false,
             unionType: videoUnionType,
@@ -468,7 +487,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_AnimalDivingShow",
             imageText: "Animal Diving Show",
-            prompt:"fluffy_plunge",
+            prompt:"The pet walks along the diving board, pauses briefly at the edge, then leaps into the air. Its body flips and curls into a ball, spinning rapidly before landing in the water with a relatively smooth posture, creating a small splash.",
+            template:"fluffy_plunge",
             specialStyle:0,
             isVip: true,
             unionType: videoUnionType,
@@ -481,7 +501,8 @@ extension TSDiscoverViewModel {
         [
             imageName: "video_style_OscarGala",
             imageText: "Oscar Gala",
-            prompt:"oscar_gala",
+            prompt:"Video content\\n The person in Figure One is dressed in the outfit from Figure Two, holding an Oscar statuette, standing at the center of the Oscar awards stage, smiling at the camera while delivering an acceptance speech.\\n# Requirements\\n1. A precise description of the person in Figure One, including their facial features, expression, hairstyle, and gender.\\n2. Determine the type of attire based on the gender of the character in Image 1. If the character is female, she wears the gown from Image 2. If the character is male, he wears a stylish suit.\\n3. Set Additional Information as 'None'.",
+            template:"oscar_gala",
             specialStyle:0,
             isVip: true,
             unionType: videoUnionType,

+ 1 - 0
AIEmoji/Business2/DisCover/TSPTPUploadImageVC/VM/TSPTPUploadImageVM.swift

@@ -77,6 +77,7 @@ class TSPTPUploadImageVM {
         let generatorModel = TSAIGeneratorModel(upLoadImage: upLoadImage!, generatorStyle:self.style)
         generatorModel.prompt = selectedPTPStyleModel.prompt
         generatorModel.model = selectedPTPStyleModel.model
+        generatorModel.template = selectedPTPStyleModel.template
         return generatorModel
     }
     

+ 1 - 1
AIEmoji/Common/Purchase/TSPurchaseManager.swift

@@ -281,7 +281,7 @@ public class PurchaseManager: NSObject {
 
     public var vipType: PremiumPeriod {
 #if DEBUG
-        return PremiumPeriod.none
+        return PremiumPeriod.year
 #endif
         guard isVip, let type = vipInformation["type"] as? String else {
             return .none

+ 3 - 8
AIEmoji/Common/Tool/OperationQueue/V2/TSGenerateBasePhotoOperation.swift

@@ -132,7 +132,7 @@ class TSGenerateBasePhotoOperation: TSGenerateBaseOperation , @unchecked Sendabl
         infoModel.request.inputText = generateStyleModel.inputText
         infoModel.request.generatorStyle = generateStyleModel.generatorStyle
         infoModel.request.model = generateStyleModel.model
-        infoModel.request.template = generateStyleModel.prompt
+        infoModel.request.template = generateStyleModel.template
         return infoModel
     }
     
@@ -352,13 +352,8 @@ extension TSGenerateBasePhotoOperation {
         case .videoV2:
             guard request.imageUrls.count > 0 else { return nil}
             urlType = .videoV2
-            
-            var template = request.template
-            if template.isEmpty {
-                template = request.prompt
-            }
-            
-            postDict = ["template":template,
+            postDict = ["prompt":request.prompt,
+                        "template":request.template,
                         "bgm": true,
                         "imageUrls":request.imageUrls
                         ]