"""Default prompting for the user-selected ghibli-warm-painted direction.""" CHARACTER_STYLE = ( 'Studio Ghibli-inspired grounded coming-of-age animation, delicate expressive ' 'hand-drawn lines, rich warm watercolor-like painted shading, gentle luminous ' 'colors, restrained almond-shaped eyes and proportionate faces.' ) BACKGROUND_STYLE = ( 'Studio Ghibli-inspired hand-painted background art, rich warm watercolor-like ' 'shading, gentle luminous colors, atmospheric depth, delicate expressive ' 'architectural detail, a welcoming lived-in storybook atmosphere.' ) CHARACTER_PROMPT_TEMPLATE = ( 'vvar_char, one fictional character, {description}. ' 'Calm friendly expression, facing the viewer. Standing three-quarter portrait, ' 'head to thighs, hands and shoulders inside the frame, margin around the silhouette. ' '{style} Perfectly uniform solid bright chroma green background, no scenery, ' 'no props, no shadow or gradient. Clothing contains no green or teal. ' 'No text, no logo, no watermark.' ) BACKGROUND_PROMPT_TEMPLATE = ( 'vvar_bg, {description}. {style} Wide establishing view of an empty location. ' 'No people, no humans, no characters, no text, no watermark.' ) DEFAULT_DESCRIPTIONS = { 'characters': ( 'a mature-looking 17-year-old young Indian man, a late adolescent high-school ' 'senior with short dark hair, wearing a red hoodie and loose navy jeans, fully ' 'clothed and age-appropriate. The face reads as nearly adult: an elongated oval ' 'face, modest almond-shaped eyes, a subtly defined jaw, a proportionate head ' 'and long adolescent limbs' ), 'backgrounds': ( "A sunlit pottery workshop, clay bowls drying on wooden shelves, a potter's " 'wheel, workbenches and a large window overlooking a garden' ), } def build_prompt(kind, description=None): """Use the recommended style unless the caller supplies a complete prompt. Descriptions must include the intended age and outfit for characters. Natural child anatomy should remain in school-child descriptions. No negative prompt is applied by default; the selected warm-painted examples use positive text. """ if kind not in DEFAULT_DESCRIPTIONS: raise ValueError('kind must be characters or backgrounds') description = DEFAULT_DESCRIPTIONS[kind] if description is None else description.strip() if not description: raise ValueError('description must not be empty') template = CHARACTER_PROMPT_TEMPLATE if kind=='characters' else BACKGROUND_PROMPT_TEMPLATE style = CHARACTER_STYLE if kind=='characters' else BACKGROUND_STYLE return template.format(description=description.rstrip('. '), style=style)