Compare commits
12 Commits
main
...
feature/ma
| Author | SHA1 | Date | |
|---|---|---|---|
| cd1f0daf60 | |||
| 62d8b32833 | |||
| 75d9380d18 | |||
| a45435ee2d | |||
| 8e46c3527d | |||
| 421ec9b4b5 | |||
| 7b0d1fab82 | |||
|
|
f20eb0ca11 | ||
|
|
eef7427ab3 | ||
| 9abfda07f0 | |||
| 915a9b0ba7 | |||
|
|
74164f23bf |
7
.env-example
Normal file
7
.env-example
Normal file
@ -0,0 +1,7 @@
|
||||
# 文生图 API 配置(三选一)
|
||||
STABILITY_API_KEY=your_stability_ai_key_here
|
||||
REPLICATE_API_TOKEN=your_replicate_token_here
|
||||
OPENAI_API_KEY=your_openai_key_here
|
||||
|
||||
# 默认使用的 API 提供商
|
||||
DEFAULT_PROVIDER=stability
|
||||
7
.streamlit/config.toml
Normal file
7
.streamlit/config.toml
Normal file
@ -0,0 +1,7 @@
|
||||
[theme]
|
||||
base = "dark"
|
||||
primaryColor = "#00d4ff"
|
||||
backgroundColor = "#0e1117"
|
||||
secondaryBackgroundColor = "#262730"
|
||||
textColor = "#e0e0e0"
|
||||
font = "sans serif"
|
||||
88
README.md
88
README.md
@ -2,16 +2,16 @@
|
||||
|
||||
| 姓名 | 学号 | 主要贡献 |
|
||||
|------|------|----------|
|
||||
| 王斌 | 2411020213 | (组长) Prompt 工程优化 |
|
||||
| 王斌 | 2411020213 | (组长) Prompt 工程优化及最终项目汇报 |
|
||||
| 翟宇轩 | 2411020215 | 后端架构设计 |
|
||||
| 吴磊 | 2411020211 | 项目的汇报和整理 |
|
||||
| 吴磊 | 2411020211 | 项目的整理,检查和编写 |
|
||||
|
||||
---
|
||||
|
||||
## 项目简介
|
||||
|
||||
|
||||
本项目旨在打造一个**零门槛、开箱即用**的 AI 文生图创作平台,让每个人都能轻松创作专业级 AI 画作。
|
||||
本项目旨在打造一个**零门槛、开箱即用**的 AI 文生图创作平台,让每个人都能轻松实现纯文本创作专业级 AI 画作。
|
||||
简单的一段文本就能轻松生成一幅画,让那些曾只存于想象或他人笔下的画面以图像的形式浮现眼前,或许会别有一番风味?
|
||||
|
||||
### 核心功能
|
||||
- 🎨 **智能 Prompt 生成**:基于中文描述自动优化为专业英文提示词(PydanticAI 驱动结构化生成)
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#### 1. 克隆仓库
|
||||
```bash
|
||||
git clone http://hblu.top:3000/Python2025-CourseDesign/manga_generate.git
|
||||
git clone http://hblu.top:3000/Python2025-CourseDesign/Group-manga_generate.git
|
||||
cd manga_generate
|
||||
```
|
||||
|
||||
@ -43,28 +43,12 @@ uv sync
|
||||
```
|
||||
|
||||
#### 3. 配置 API Key
|
||||
```bash
|
||||
# 复制环境变量模板
|
||||
cp .env.example .env
|
||||
在程序主页配置
|
||||
|
||||
# 编辑 .env 文件,填入你的 API Key
|
||||
# 支持:OpenAI DALL-E、Stability AI、Replicate 等
|
||||
```
|
||||
|
||||
`.env` 文件示例:
|
||||
```env
|
||||
# 文生图 API 配置(三选一)
|
||||
STABILITY_API_KEY=your_stability_ai_key_here
|
||||
REPLICATE_API_TOKEN=your_replicate_token_here
|
||||
OPENAI_API_KEY=your_openai_key_here
|
||||
|
||||
# 默认使用的 API 提供商
|
||||
DEFAULT_PROVIDER=stability
|
||||
```
|
||||
|
||||
#### 4. 启动应用
|
||||
```bash
|
||||
python3 backend/app.py
|
||||
uv run python3 backend/app.py
|
||||
```
|
||||
打开另一个终端
|
||||
```bash
|
||||
@ -73,34 +57,50 @@ uv run streamlit run frontend/main.py
|
||||
|
||||
浏览器自动打开 `http://localhost:8501`
|
||||
|
||||
#### 5. 开始体验
|
||||
万事俱备后,便可输入相应的信息与需要生成图像的文本,最后点击生成后便可获取相应的图像了。
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 开发心得
|
||||
在生活中,我们常常遇到这样一个问题:有些想法的实现需要大量的技术,可大多数人往往不具备这个技术要求。所以这些想法的结果往往都是被人淡忘,直到AI的出现,这些
|
||||
想法的实现开始有了转机,这也是我们做这个项目的契机之一。<br>
|
||||
文本往往不是易于理解和感受的,即使是大作家的文章也需要读者逐字逐句地细细品鉴,相比较而言,图片总是更加直观且便于理解的。若是能将枯燥的文本以另外一种方式展示
|
||||
给用户,岂不是大大增加了文本的可读性?可我们并未掌握实现这一目标的全部技术,但是AI具有这个能力啊,因此,为了实现这一目标,我们小组开始行动起来。<br>
|
||||
我们首先和AI表达了我们的基本需求,而AI确实生成了一个相对应的界面,可是无法生成想要的图片、各式各样的报错以及界面杂乱不具备观赏性等等问题层出不穷。于是我们
|
||||
将报错的信息告诉AI,这个问题可能确实修复了,又出现了另外一个问题,甚至这种情况多发生在AI表示已经理解了我们的需求之后,如此循环往复的过程耗费了大量的时间和
|
||||
精力,也大大打击了我们的信心,甚至做到后面有一个不错的结果都没有太强的成就感。<br>
|
||||
在不断报错然后debug的过程中,我们也明白了一个道理:做出来只是第一步,而优化成预想的模样总是任重而道远。同时,我们也不得不感叹AI的强大之处:让“普通人”借助它
|
||||
的能力跨越技术的阻隔来实现所设想的目标。此外,在不断协作开发的过程中,也感叹,多角度思考对解决问题确实大有裨益。<br>
|
||||
|
||||
---
|
||||
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
Group-TextToImage/
|
||||
├── app.py # Streamlit 主应用
|
||||
├── backend/
|
||||
│ ├── api_client.py # API 调用封装
|
||||
│ ├── prompt_engineer.py # Prompt 优化引擎
|
||||
│ ├── image_processor.py # 图像后处理
|
||||
│ └── agent.py # PydanticAI 智能体定义
|
||||
├── frontend/
|
||||
│ ├── styles.css # 自定义样式
|
||||
│ └── components.py # UI 组件库
|
||||
├── .env.example # 环境变量模板
|
||||
├── .gitignore # Git 忽略配置
|
||||
├── requirements.txt # 依赖清单
|
||||
└── README.md # 项目文档
|
||||
manga_generate/
|
||||
├── backend/ # 后端代码目录
|
||||
│ ├── agent.py # 代理/AI逻辑实现
|
||||
│ ├── app.py # 后端 API 服务入口
|
||||
│ └── utils.py # 通用工具函数
|
||||
├── frontend/ # 前端代码目录
|
||||
│ └── main.py # Streamlit 前端主程序入口
|
||||
├── data/ # 数据存储
|
||||
│ └── history.json # 历史记录数据
|
||||
├── images/ # 图片资源目录
|
||||
│ ├── background.png # 背景图片
|
||||
│ └── ... # 其他图片资源
|
||||
├── .venv/ # Python 虚拟环境
|
||||
├── backend.log # 后端运行日志
|
||||
├── main.py # 根目录入口脚本
|
||||
├── pyproject.toml # 项目配置与依赖管理
|
||||
├── uv.lock # 依赖锁定文件
|
||||
├── LICENSE # 开源许可证
|
||||
└── README.md # 项目说明文档
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 开发心得
|
||||
1. 单纯急躁的使用AI进行开发,没有带来什么成就感,反而是不断Debug的挫败感(国产AI真没用)
|
||||
2. 协作开发的感觉很好
|
||||
3. AI对小白很友好
|
||||
4. 做出来只是第一步,优化任重而道远
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -2,6 +2,8 @@ from pydantic import BaseModel, Field
|
||||
from typing import List, Optional
|
||||
from pydantic_ai import Agent, RunContext
|
||||
import os
|
||||
from openai import AsyncOpenAI
|
||||
from pydantic_ai.providers import Provider
|
||||
|
||||
# --- Data Models ---
|
||||
|
||||
@ -15,28 +17,58 @@ class CharacterAnalysisResult(BaseModel):
|
||||
class MangaSimplePrompt(BaseModel):
|
||||
prompt: str = Field(description="The generated English manga image prompt.")
|
||||
|
||||
# --- Custom Provider ---
|
||||
|
||||
class OpenAIAuthProvider(Provider[AsyncOpenAI]):
|
||||
"""
|
||||
Custom provider to handle dynamic API Key and Base URL.
|
||||
"""
|
||||
def __init__(self, api_key: str, base_url: Optional[str] = None):
|
||||
self._client = AsyncOpenAI(api_key=api_key, base_url=base_url)
|
||||
|
||||
@property
|
||||
def client(self) -> AsyncOpenAI:
|
||||
return self._client
|
||||
|
||||
@property
|
||||
def base_url(self) -> str:
|
||||
return str(self._client.base_url)
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
return "openai"
|
||||
|
||||
# --- Wrapper Functions ---
|
||||
|
||||
async def analyze_characters_with_agent(text: str, api_key: str, base_url: Optional[str] = None, model: str = "gpt-4o") -> str:
|
||||
"""
|
||||
Uses PydanticAI Agent to analyze characters and returns a formatted string context.
|
||||
"""
|
||||
from pydantic_ai.models.openai import OpenAIModel
|
||||
# Use OpenAIChatModel as OpenAIModel is deprecated
|
||||
try:
|
||||
from pydantic_ai.models.openai import OpenAIChatModel as OpenAIModel
|
||||
except ImportError:
|
||||
from pydantic_ai.models.openai import OpenAIModel
|
||||
|
||||
# Allow model override
|
||||
model_name = model if model else "gpt-4o"
|
||||
|
||||
# Create the model instance with the specific API Key and Base URL
|
||||
# Create the custom provider
|
||||
provider = OpenAIAuthProvider(
|
||||
api_key=api_key if api_key else "dummy",
|
||||
base_url=base_url
|
||||
)
|
||||
|
||||
# Create the model instance using the custom provider
|
||||
openai_model = OpenAIModel(
|
||||
model_name,
|
||||
api_key=api_key,
|
||||
base_url=base_url
|
||||
provider=provider
|
||||
)
|
||||
|
||||
# Create a temporary agent for this run
|
||||
agent = Agent(
|
||||
openai_model,
|
||||
result_type=CharacterAnalysisResult,
|
||||
output_type=CharacterAnalysisResult,
|
||||
system_prompt="You are a professional manga editor. Analyze the provided novel text and extract the visual descriptions of the main characters to ensure consistency in manga adaptation."
|
||||
)
|
||||
|
||||
@ -45,7 +77,7 @@ async def analyze_characters_with_agent(text: str, api_key: str, base_url: Optio
|
||||
|
||||
# Format the result into a string context
|
||||
context_str = ""
|
||||
for char in result.data.characters:
|
||||
for char in result.output.characters:
|
||||
context_str += f"- {char.name}: {char.description}\n"
|
||||
return context_str
|
||||
except Exception as e:
|
||||
@ -53,18 +85,26 @@ async def analyze_characters_with_agent(text: str, api_key: str, base_url: Optio
|
||||
return ""
|
||||
|
||||
async def generate_single_prompt_with_agent(paragraph: str, character_context: str, api_key: str, base_url: Optional[str] = None, model: str = "gpt-4o") -> str:
|
||||
from pydantic_ai.models.openai import OpenAIModel
|
||||
try:
|
||||
from pydantic_ai.models.openai import OpenAIChatModel as OpenAIModel
|
||||
except ImportError:
|
||||
from pydantic_ai.models.openai import OpenAIModel
|
||||
|
||||
model_name = model if model else "gpt-4o"
|
||||
|
||||
provider = OpenAIAuthProvider(
|
||||
api_key=api_key if api_key else "dummy",
|
||||
base_url=base_url
|
||||
)
|
||||
|
||||
openai_model = OpenAIModel(
|
||||
model_name,
|
||||
api_key=api_key,
|
||||
base_url=base_url
|
||||
provider=provider
|
||||
)
|
||||
|
||||
agent = Agent(
|
||||
openai_model,
|
||||
result_type=MangaSimplePrompt,
|
||||
output_type=MangaSimplePrompt,
|
||||
deps_type=str,
|
||||
system_prompt=(
|
||||
"You are a professional manga artist assistant. Convert the novel text into a detailed manga image prompt. "
|
||||
@ -75,7 +115,7 @@ async def generate_single_prompt_with_agent(paragraph: str, character_context: s
|
||||
|
||||
try:
|
||||
result = await agent.run(paragraph, deps=character_context)
|
||||
return result.data.prompt
|
||||
return result.output.prompt
|
||||
except Exception as e:
|
||||
print(f"Agent Error (Prompt): {e}")
|
||||
return f"Error generation prompt: {e}"
|
||||
|
||||
@ -10,5 +10,65 @@
|
||||
"image_url": "https://s3.siliconflow.cn/default/outputs/22aedcfb-5b15-43f6-9e4b-1615f33d0b86_8ff8defcdfa7a4c4278e6116bf410c03_ComfyUI_b9cbc20a_00001_.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAXXXXFILESEXAMPLE%2F20260108%2Fcn-shanghai-1%2Fs3%2Faws4_request&X-Amz-Date=20260108T065148Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImdyYXkiLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiJmYWFzOmRlcDpvcHI6ZDI5Y3UzZ2gzdnZjNzNjNWJpNWc6NjVhMzEiLCJpc3MiOiJodHRwczovL2lhbS5zaWxpY29uZmxvdy5jbiIsImlhdCI6MTc2Nzg0MzIwOSwiZXhwIjoxNzY4MDE2MDA5LCJ0eXAiOiJzZXJ2aWNlIiwiYXBsdCI6InNmOmZhYXM6ZmFicmljIiwidG50IjoiZDI5Y3UzZ2gzdnZjNzNjNWJpNWciLCJpZCI6ImQ1ZmliMmM1MG1pczczYWpubzFnIiwiYWNjZXNzIjpbeyJ0eXBlIjoiZmFhcyIsInN1YmplY3RJZCI6ImQyOWN1M2doM3Z2YzczYzViaTVnIiwiYWN0aW9ucyI6WyJmYWFzOmludm9jYXRpb246cHVsbGluZyJdfV19.pKxO5YLlQ2J_fm5RTSRyj6zYAwUeP1isOQcAtzsjtndudeKY0YpdgDPyyDG9y2MK2HaUKidY7lHpDH5i9_DvRRUxB5IMTyocTGX-TJJI1ZLFJCvjvaPklLByCWYlQD66tbVkGPoTvPUzWVyTIryj8v5qbQWZgTGlUryoqas52DtslFi9AqQ0SPKysuhppC-RY_vVZrYVYw7u4FL0qRddH56jflC7mAqj47dxAK92xpWkZGFh2ha7gUvUaISgbXfZV99R_tI6iJoHFhdm2v5dODapDVz1uvZLR7TOslSJB5Ad7kVOtdaxqBJNjFmuYiuKkrxDIGSuWZynlteIAbR1EXet8T2MOWzYEDoh59fCDAcx9FNZhU-rEwmRIjt4W0NO4fiDHqmHRK8H3x1SmnDbbG8V4Cy4t5PuDSAwnn9b7r14uUI-RKGYMMrLw1mypJHoNEEumI663ENCA-6b9y4cJ15hGeSxqR3qEqbWU7XZ5NnmOpExtyPntePLOPBLk56CG_mL8ON1OITPZrgkMFdmR0dkdQfFCoiBVfK_0GThb9trpn91oybDZ189hFrIfWQ35AGlGmk45J8pzXSJCdrdKpgSMathpnPbg5sicBTU3CbMtcNruc7oDQfk9WU8FjY4mhCn-DpIJOC2FWkK1TulN3JliFjzNxvWLlu62XThWSI&X-Amz-Signature=c3cf0da228e27e055efd520637f72be11aa85e102a3436a6cc500700c7ceb28d",
|
||||
"novel_text": "虞寻歌尽可能让自己的语气不要带上任何攻击性,因为她是真的好奇而不是为了挑衅,她站直身体,认真的问道:“那你头发变成浅金色后…岂不是很不适应?”",
|
||||
"timestamp": 1767855109.414846
|
||||
},
|
||||
{
|
||||
"prompt": "Error generation prompt: 'AgentRunResult' object has no attribute 'data'",
|
||||
"image_url": "https://s3.siliconflow.cn/default/outputs/83861c7f-2d3e-474f-a346-a331ca6e65b9_218cfc09613c7b01fb497255ce1f95a8_ComfyUI_d8edbb21_00001_.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAXXXXFILESEXAMPLE%2F20260108%2Fcn-shanghai-1%2Fs3%2Faws4_request&X-Amz-Date=20260108T134756Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImdyYXkiLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiJmYWFzOmRlcDpvcHI6ZDI5Y3UzZ2gzdnZjNzNjNWJpNWc6YWVmNGIiLCJpc3MiOiJodHRwczovL2lhbS5zaWxpY29uZmxvdy5jbiIsImlhdCI6MTc2Nzg3NTYwOSwiZXhwIjoxNzY4MDQ4NDA5LCJ0eXAiOiJzZXJ2aWNlIiwiYXBsdCI6InNmOmZhYXM6ZmFicmljIiwidG50IjoiZDI5Y3UzZ2gzdnZjNzNjNWJpNWciLCJpZCI6ImQ1ZnE4NmM1MG1pczczYmIzbm8wIiwiYWNjZXNzIjpbeyJ0eXBlIjoiZmFhcyIsInN1YmplY3RJZCI6ImQyOWN1M2doM3Z2YzczYzViaTVnIiwiYWN0aW9ucyI6WyJmYWFzOmludm9jYXRpb246cHVsbGluZyJdfV19.cO-aXvKYQfYY7TBx1Y_dq9uCot1uFTyM29D7mSul-aiEvCPM1DR32nrWUBYc879VJieR6pyM_OBgBii9AGvUADVowFDB6nmCOp2jJEwxxqZy5l_FlwmKlsxzAsV4rupgFHOi1vH2CQtRgb0gxD23xkbOsfck45R7LCR2esAc8ktkoWjqvZhR7Lytob7XqQCV0VvuQqio7SaYa9sRuB0REBbU_Hfam2uFw9pRCrxyxvDAsMGJpzhp_LgVCkhti6jqdY75qD2h4xnuFLjEcyStVQZLU_Wq8XbYse5MWe2MkD58_I2bNNsTlvxO3rS-dtDYNkenWG9J2ytrDG42cFa3oZ1eX2cn4ReNDvqJyrj3cHwpDsnPciYGITVXZruq9q9QddYfua6hZsE4HyRJV8Aa-uXRSwnFUkhJwrNPQljWhX2RqkU65cJT53l3fy7LfsjWJxC5jG_TwzxMDNS_KsY2LODS_SlLEyoP3DT_kdG_eXLYLDB3Ist2rPLy8xCbsRCIM5dPABOZ-YcBYp6eZjeesHagw_m5oVBIirgs8CGJrEp_95ZA1MS1PnYBQZry9GXZtIi1hIowPufdkRbcU55ha7oktvZzqe-siXexhH4ilbsm6oNv2uCqP8fllflwrQ8emY7X31rcCeHxvWqM7NggnPyeb02KdUktzfZkQqPPMyI&X-Amz-Signature=f2b608f9c2c05b2e44e699cdaf5c40a93a077e59082c2dff29fbeadf3d2d4977",
|
||||
"novel_text": "肥美又迷你的黑月狐一脸杀意的从自己手里接过血雾水果刀,雾刃脑海里闪过一个念头,载酒寻歌刚才没大笑出声已经很给面子了……\n时钟的滴答声迅速靠近,是逐日在靠近,一起靠近的还有那在顺时针转动的时间指针。",
|
||||
"timestamp": 1767880076.4791903
|
||||
},
|
||||
{
|
||||
"prompt": "**Manga Image Prompt:**\n\n**Scene:** A tense, high-stakes confrontation in a surreal, shadowy environment. The atmosphere is thick with magical energy and impending danger.\n\n**Characters:**\n1. **黑月狐 (Black Moon Fox):** A plump, miniature black fox standing on a character's hand. Despite its small size, it radiates intense murderous intent - eyes narrowed to dangerous slits, ears flattened back, fur bristling with aggression. Its tiny body is taut with tension.\n\n2. **雾刃 (Mist Blade):** A young man with sharp features, holding a blood-mist fruit knife. The knife emits a faint crimson mist that swirls around the blade. His expression shows sudden realization - eyes widening slightly as a thought flashes through his mind. He can sense 载酒寻歌's suppressed emotions.\n\n3. **载酒寻歌 (Wine-Seeking Song):** A composed figure maintaining perfect calm despite the tension. Facial expression is neutral but eyes show subtle amusement barely contained. Body language is relaxed in contrast to the others' tension.\n\n4. **逐日 (Sun Chaser):** Approaching rapidly from the background - a figure whose movement is synchronized with loud, accelerating clock tick-tock sounds. Surrounding them are visible, glowing time pointers rotating clockwise, creating temporal distortion effects.\n\n**Action:** 黑月狐 has just taken the blood-mist fruit knife from 雾刃's hand with deadly seriousness. 雾刃 experiences a sudden realization about 载酒寻歌's barely-contained amusement. Simultaneously, 逐日 approaches with increasing speed, the sound of ticking clocks growing louder.\n\n**Setting:** A dimly lit, abstract space with floating geometric shapes and shadowy textures. The ground appears unstable, like shifting sand or mist. Magical energy particles float in the air.\n\n**Composition:** Dynamic diagonal composition showing the handoff of the knife in foreground, with 雾刃's reaction in mid-ground, and 逐日 approaching from background. Multiple time pointers create circular motion patterns around the scene.\n\n**Style:** Monochrome manga style with high contrast ink work. Heavy use of speed lines and motion effects. Detailed cross-hatching for shadows. Dramatic lighting with strong highlights on the knife and characters' eyes. Panel should feel cinematic with tension building through visual elements.\n\n**Key Details:**\n- The blood-mist knife's crimson aura contrasting with monochrome palette\n- 黑月狐's murderous expression despite cute appearance\n- Visible sound effect \"TICK TOCK\" radiating from 逐日's approach\n- Time pointers glowing with ethereal light as they rotate\n- 雾刃's thought bubble showing his realization about 载酒寻歌\n- 载酒寻歌's subtle smirk barely visible\n\n**Mood:** Tense, surreal, with underlying dark humor. The contrast between the deadly serious situation and the suppressed amusement creates dramatic irony.",
|
||||
"image_url": "https://s3.siliconflow.cn/default/outputs/27c660fe-ee60-4d2d-9c22-cbb02c4f35ae_398444f01fa4cb0a196fbe6340ab1fc9_ComfyUI_9049ae3d_00001_.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAXXXXFILESEXAMPLE%2F20260108%2Fcn-shanghai-1%2Fs3%2Faws4_request&X-Amz-Date=20260108T135308Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImdyYXkiLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiJmYWFzOmRlcDpvcHI6ZDI5Y3UzZ2gzdnZjNzNjNWJpNWc6YWVmNGIiLCJpc3MiOiJodHRwczovL2lhbS5zaWxpY29uZmxvdy5jbiIsImlhdCI6MTc2Nzg3NTYwOSwiZXhwIjoxNzY4MDQ4NDA5LCJ0eXAiOiJzZXJ2aWNlIiwiYXBsdCI6InNmOmZhYXM6ZmFicmljIiwidG50IjoiZDI5Y3UzZ2gzdnZjNzNjNWJpNWciLCJpZCI6ImQ1ZnE4NmM1MG1pczczYmIzbm8wIiwiYWNjZXNzIjpbeyJ0eXBlIjoiZmFhcyIsInN1YmplY3RJZCI6ImQyOWN1M2doM3Z2YzczYzViaTVnIiwiYWN0aW9ucyI6WyJmYWFzOmludm9jYXRpb246cHVsbGluZyJdfV19.cO-aXvKYQfYY7TBx1Y_dq9uCot1uFTyM29D7mSul-aiEvCPM1DR32nrWUBYc879VJieR6pyM_OBgBii9AGvUADVowFDB6nmCOp2jJEwxxqZy5l_FlwmKlsxzAsV4rupgFHOi1vH2CQtRgb0gxD23xkbOsfck45R7LCR2esAc8ktkoWjqvZhR7Lytob7XqQCV0VvuQqio7SaYa9sRuB0REBbU_Hfam2uFw9pRCrxyxvDAsMGJpzhp_LgVCkhti6jqdY75qD2h4xnuFLjEcyStVQZLU_Wq8XbYse5MWe2MkD58_I2bNNsTlvxO3rS-dtDYNkenWG9J2ytrDG42cFa3oZ1eX2cn4ReNDvqJyrj3cHwpDsnPciYGITVXZruq9q9QddYfua6hZsE4HyRJV8Aa-uXRSwnFUkhJwrNPQljWhX2RqkU65cJT53l3fy7LfsjWJxC5jG_TwzxMDNS_KsY2LODS_SlLEyoP3DT_kdG_eXLYLDB3Ist2rPLy8xCbsRCIM5dPABOZ-YcBYp6eZjeesHagw_m5oVBIirgs8CGJrEp_95ZA1MS1PnYBQZry9GXZtIi1hIowPufdkRbcU55ha7oktvZzqe-siXexhH4ilbsm6oNv2uCqP8fllflwrQ8emY7X31rcCeHxvWqM7NggnPyeb02KdUktzfZkQqPPMyI&X-Amz-Signature=5e87625897df1ed03e439f04c671edc420e9c84c2493a3cf7744c5923a6c2623",
|
||||
"novel_text": "肥美又迷你的黑月狐一脸杀意的从自己手里接过血雾水果刀,雾刃脑海里闪过一个念头,载酒寻歌刚才没大笑出声已经很给面子了……\n时钟的滴答声迅速靠近,是逐日在靠近,一起靠近的还有那在顺时针转动的时间指针。",
|
||||
"timestamp": 1767880389.6722548
|
||||
},
|
||||
{
|
||||
"prompt": "**Manga Image Prompt:**\n\n**Scene:** A tense confrontation in a flower field at dusk. The setting sun casts long shadows through the blossoms.\n\n**Character 1 - 拂晓衔蝉 (Fuxiao Xianchan):**\n- **Appearance:** Young woman with striking silver-white hair that glows in the fading light, piercing crimson-red eyes narrowed in suspicion\n- **Pose:** Standing upright like a meerkat - back straight, shoulders tense, feet planted firmly apart in defensive stance\n- **Body Language:** Hands clenched at sides, body angled defensively, head tilted slightly forward with intense focus\n- **Expression:** Full defensive mode - brows furrowed, lips pressed into a thin line, eyes sharp and wary\n- **Clothing:** Casual but practical outfit suitable for flower field exploration\n\n**Character 2 - 虞寻歌 (Yu Xunge):**\n- **Appearance:** Standing opposite 拂晓衔蝉, maintaining a respectful distance\n- **Pose:** Upright posture, facing 拂晓衔蝉 directly but not aggressively\n- **Expression:** Serious and earnest, showing genuine curiosity rather than confrontation\n- **Focus:** About to ask a question about hair color changes, tone is respectful but direct\n\n**Setting:**\n- Lush flower field with various colorful blossoms\n- Golden hour lighting - warm sunset tones with long shadows\n- Slight breeze causing flowers to sway gently\n- Peaceful natural environment contrasting with tense interpersonal moment\n\n**Style:**\n- **Art Style:** Professional manga style - clean linework, dynamic panel composition\n- **Color:** Monochrome with high contrast shading (black and white manga style)\n- **Quality:** High quality, detailed artwork with expressive character emotions\n- **Focus:** Close-up shot capturing the defensive tension in 拂晓衔蝉's posture and expression\n- **Atmosphere:** Suspenseful, with unspoken tension between the two characters\n\n**Key Visual Elements:**\n1. 拂晓衔蝉's silver hair catching the sunset light\n2. Her crimson eyes glowing with defensive intensity\n3. The contrast between her defensive \"meerkat\" stance and 虞寻歌's calm upright posture\n4. Flower petals drifting in the breeze between them\n5. Dramatic shadows emphasizing the emotional tension\n\n**Emotional Tone:** Defensive suspicion meets earnest curiosity - a moment of interpersonal tension in a beautiful natural setting.",
|
||||
"image_url": "https://s3.siliconflow.cn/default/outputs/94ada96f-b65d-49fd-9ab3-ebfe0bc101d1_4b2805c89e548ee897bdf32d5ed6d6a8_ComfyUI_aef4788d_00001_.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAXXXXFILESEXAMPLE%2F20260108%2Fcn-shanghai-1%2Fs3%2Faws4_request&X-Amz-Date=20260108T140544Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImdyYXkiLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiJmYWFzOmRlcDpvcHI6ZDI5Y3UzZ2gzdnZjNzNjNWJpNWc6YWVmNGIiLCJpc3MiOiJodHRwczovL2lhbS5zaWxpY29uZmxvdy5jbiIsImlhdCI6MTc2Nzg3NTYwOSwiZXhwIjoxNzY4MDQ4NDA5LCJ0eXAiOiJzZXJ2aWNlIiwiYXBsdCI6InNmOmZhYXM6ZmFicmljIiwidG50IjoiZDI5Y3UzZ2gzdnZjNzNjNWJpNWciLCJpZCI6ImQ1ZnE4NmM1MG1pczczYmIzbm8wIiwiYWNjZXNzIjpbeyJ0eXBlIjoiZmFhcyIsInN1YmplY3RJZCI6ImQyOWN1M2doM3Z2YzczYzViaTVnIiwiYWN0aW9ucyI6WyJmYWFzOmludm9jYXRpb246cHVsbGluZyJdfV19.cO-aXvKYQfYY7TBx1Y_dq9uCot1uFTyM29D7mSul-aiEvCPM1DR32nrWUBYc879VJieR6pyM_OBgBii9AGvUADVowFDB6nmCOp2jJEwxxqZy5l_FlwmKlsxzAsV4rupgFHOi1vH2CQtRgb0gxD23xkbOsfck45R7LCR2esAc8ktkoWjqvZhR7Lytob7XqQCV0VvuQqio7SaYa9sRuB0REBbU_Hfam2uFw9pRCrxyxvDAsMGJpzhp_LgVCkhti6jqdY75qD2h4xnuFLjEcyStVQZLU_Wq8XbYse5MWe2MkD58_I2bNNsTlvxO3rS-dtDYNkenWG9J2ytrDG42cFa3oZ1eX2cn4ReNDvqJyrj3cHwpDsnPciYGITVXZruq9q9QddYfua6hZsE4HyRJV8Aa-uXRSwnFUkhJwrNPQljWhX2RqkU65cJT53l3fy7LfsjWJxC5jG_TwzxMDNS_KsY2LODS_SlLEyoP3DT_kdG_eXLYLDB3Ist2rPLy8xCbsRCIM5dPABOZ-YcBYp6eZjeesHagw_m5oVBIirgs8CGJrEp_95ZA1MS1PnYBQZry9GXZtIi1hIowPufdkRbcU55ha7oktvZzqe-siXexhH4ilbsm6oNv2uCqP8fllflwrQ8emY7X31rcCeHxvWqM7NggnPyeb02KdUktzfZkQqPPMyI&X-Amz-Signature=7838e026154374670455996f74126f26262e3c6ff297e9288e4a986d43937fb2",
|
||||
"novel_text": "正弯腰在花丛中扒拉的拂晓衔蝉像狐獴一样站直身体,全身防御拉满,警惕的望着载酒寻歌:“你又想说什么让人不高兴的话,银发红瞳不美丽吗?”",
|
||||
"timestamp": 1767881144.9809773
|
||||
},
|
||||
{
|
||||
"prompt": "**Manga Scene Description:**\n**Style:** Monochrome manga style, high quality, detailed line art with screentone shading\n**Panel Composition:** Two-shot panel showing both characters in conversation\n\n**Character 1 - 拂晓衔蝉 (Fuxiao Xianchan):**\n- **Appearance:** Silver hair with red eyes, currently in a defensive posture\n- **Pose:** Standing upright like a meerkat, having just straightened from bending over in the flower bed\n- **Expression:** Alert, slightly defensive, with eyes narrowed in suspicion\n- **Clothing:** Casual modern clothing appropriate for gardening/outdoor activity\n- **Body Language:** Tense shoulders, hands slightly raised in a defensive position, weight shifted back\n\n**Character 2 - 虞寻歌 (Yu Xunge):**\n- **Appearance:** Standing upright with a serious but non-confrontational expression\n- **Pose:** Straight posture, facing 拂晓衔蝉 directly but maintaining respectful distance\n- **Expression:** Earnest curiosity, eyebrows slightly raised in genuine inquiry\n- **Clothing:** Modern casual wear, neat and tidy\n- **Body Language:** Open posture, hands at sides or slightly gesturing to emphasize her question\n\n**Setting:**\n- Flower garden or flower bed with various blooming flowers\n- Soft natural lighting, possibly early morning or late afternoon\n- Background shows lush greenery and colorful flowers (rendered in manga screentone patterns)\n\n**Key Visual Elements:**\n1. 拂晓衔蝉's silver hair catching the light, contrasting with the red flowers\n2. Both characters maintaining eye contact in the conversation\n3. Subtle tension in 拂晓衔蝉's posture versus 虞寻歌's open, curious stance\n4. Flower petals scattered around from 拂晓衔蝉's previous activity\n5. Depth of field focusing on the characters with background slightly blurred\n\n**Emotional Tone:** Tense but curious, with 虞寻歌 trying to ask a sensitive question without offending, and 拂晓衔蝉 reacting defensively to the personal inquiry about her hair color change.",
|
||||
"image_url": "https://s3.siliconflow.cn/default/outputs/cc9d75c0-e00d-4a5f-9e0e-9c7297d550c1_b0000dc5de22a0ece56a241f4f7de0fe_ComfyUI_f225afc0_00001_.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAXXXXFILESEXAMPLE%2F20260108%2Fcn-shanghai-1%2Fs3%2Faws4_request&X-Amz-Date=20260108T140552Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImdyYXkiLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiJmYWFzOmRlcDpvcHI6ZDI5Y3UzZ2gzdnZjNzNjNWJpNWc6Y2IwY2EiLCJpc3MiOiJodHRwczovL2lhbS5zaWxpY29uZmxvdy5jbiIsImlhdCI6MTc2Nzg2NDgwOSwiZXhwIjoxNzY4MDM3NjA5LCJ0eXAiOiJzZXJ2aWNlIiwiYXBsdCI6InNmOmZhYXM6ZmFicmljIiwidG50IjoiZDI5Y3UzZ2gzdnZjNzNjNWJpNWciLCJpZCI6ImQ1Zm5qcWRzc3N2YzczZGNhYmJnIiwiYWNjZXNzIjpbeyJ0eXBlIjoiZmFhcyIsInN1YmplY3RJZCI6ImQyOWN1M2doM3Z2YzczYzViaTVnIiwiYWN0aW9ucyI6WyJmYWFzOmludm9jYXRpb246cHVsbGluZyJdfV19.BWLSNHjkePPh7hxDO1q8A2-b8Qp9jVB0ngqSe5CSSipIX8fa0WgZRpY3I6aUC4GjntlVq9Mz-36y7sutwg9nQwqAP33gwUpyFhwmFsc2HJdT0O96fdcTswu11hY1d9ZWUlPhkw4dfuDMUSrkEDPYJEIODTE-Q8pyvwZu1WaD6Ra2vtfJTbAJWiYmU2K2aBAzniPYKofHNJdsUfeZX_ItWubg_M1kGuqm6uNUvhFaOiWqDmPImKjFz1isZBzFevM-i2ruLiFzUt868QTDkOX64lP7iQJEMdVQl4vXfKijiFeEC-ZYpn0G3_-FX-xlFQkiKRuu4Kg3bm_2xyP2Pp3t74ywXrrKBgAJglsx0MST04yWXcSlZMXHO4GK6j2esVM25BXc7YHedtk62ZrPbQ91pNYJJuYHD2nykSdXzwXdm2atJ-ALUBtsJAtwutfb1NnFjTh2gB8lJ1MjYqmD988jfMJnCe1LZdLpH6T2uwIvRRGZ1NAHsvpeMxXJ-95ckqeityjE3XwmBKOgknRALLbK6dot47lLqZEEljv780PKApf2D93iBIDZh-Pq8AgK637fE-sufRWAh6VXaZur0qVK7aSyQKRfqWurU43ZAx1Gf-n2gI2YpYXx_3wLKdXymHgxQdbJ9Rr9Eli2lVcHxZ_lYCzrWO77kALPVH8ZNoaFtmw&X-Amz-Signature=929668001facc9224ba488e3fb3a20c41b2e409710906ff2a5643401a98e7612",
|
||||
"novel_text": "虞寻歌尽可能让自己的语气不要带上任何攻击性,因为她是真的好奇而不是为了挑衅,她站直身体,认真的问道:“那你头发变成浅金色后…岂不是很不适应?”",
|
||||
"timestamp": 1767881152.9700255
|
||||
},
|
||||
{
|
||||
"prompt": "**Manga Image Prompt:**\n\n**Scene:** A tense confrontation in a vibrant flower field at dusk. The setting sun casts long shadows and creates a warm, dramatic lighting.\n\n**Character 1 - 拂晓衔蝉 (Fuxiao Xianchan):**\n- **Appearance:** Silver-white hair with a slight natural wave, bright crimson-red eyes that glow with intensity\n- **Pose:** Standing upright like a meerkat, having just risen from bending over in the flowers. Body is tense and defensive - shoulders squared, hands slightly raised in a protective stance, feet planted firmly\n- **Expression:** Highly alert and defensive - eyes narrowed, brows furrowed, lips pressed into a thin line. A mix of suspicion and pride\n- **Clothing:** Wearing practical but elegant clothing suitable for flower fields - perhaps a light tunic and pants with floral patterns\n- **Context:** Surrounded by colorful flowers she was just examining, some petals still clinging to her clothes\n\n**Character 2 - 虞寻歌 (Yu Xunge):**\n- **Appearance:** Standing a short distance away, observing 拂晓衔蝉 with a serious, questioning expression\n- **Pose:** Leaning slightly forward, hands at sides but posture indicating he's about to speak or has just spoken\n- **Expression:** Serious and focused, with an analytical look - as if studying her appearance and preparing to ask an important question\n- **Clothing:** Distinctive but complementary to the setting\n\n**Interaction:** The scene captures the moment of confrontation. 拂晓衔蝉's defensive posture is a direct response to 虞寻歌's presence and implied question about her appearance. Her words hang in the air - challenging him to respond to her question about whether silver hair and red eyes aren't beautiful.\n\n**Visual Style:**\n- **Art Style:** Professional manga style, monochrome with high-contrast ink work\n- **Panel Composition:** Dynamic angle showing both characters, emphasizing 拂晓衔蝉's defensive stance and the tension between them\n- **Lighting:** Dramatic sunset lighting creating strong shadows and highlights\n- **Details:** Detailed rendering of the flower field, individual petals, and character expressions\n- **Quality:** High-quality line art with professional manga shading techniques\n- **Mood:** Tense, defensive, with underlying emotional vulnerability\n\n**Key Elements:**\n1. 拂晓衔蝉's silver hair catching the sunset light\n2. Her crimson eyes glowing with defensive intensity\n3. The contrast between her defensive posture and the peaceful flower field\n4. The unspoken tension between the two characters\n5. The implied question hanging in the air about beauty and identity",
|
||||
"image_url": "https://s3.siliconflow.cn/default/outputs/4fd6c706-be07-4351-b846-845cdd8e4abb_f0261b18eb80f8b42df41948f849b6ef_ComfyUI_5f6c804a_00001_.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAXXXXFILESEXAMPLE%2F20260108%2Fcn-shanghai-1%2Fs3%2Faws4_request&X-Amz-Date=20260108T141825Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImdyYXkiLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiJmYWFzOmRlcDpvcHI6ZDI5Y3UzZ2gzdnZjNzNjNWJpNWc6Y2IwY2EiLCJpc3MiOiJodHRwczovL2lhbS5zaWxpY29uZmxvdy5jbiIsImlhdCI6MTc2Nzg2NDgwOSwiZXhwIjoxNzY4MDM3NjA5LCJ0eXAiOiJzZXJ2aWNlIiwiYXBsdCI6InNmOmZhYXM6ZmFicmljIiwidG50IjoiZDI5Y3UzZ2gzdnZjNzNjNWJpNWciLCJpZCI6ImQ1Zm5qcWRzc3N2YzczZGNhYmJnIiwiYWNjZXNzIjpbeyJ0eXBlIjoiZmFhcyIsInN1YmplY3RJZCI6ImQyOWN1M2doM3Z2YzczYzViaTVnIiwiYWN0aW9ucyI6WyJmYWFzOmludm9jYXRpb246cHVsbGluZyJdfV19.BWLSNHjkePPh7hxDO1q8A2-b8Qp9jVB0ngqSe5CSSipIX8fa0WgZRpY3I6aUC4GjntlVq9Mz-36y7sutwg9nQwqAP33gwUpyFhwmFsc2HJdT0O96fdcTswu11hY1d9ZWUlPhkw4dfuDMUSrkEDPYJEIODTE-Q8pyvwZu1WaD6Ra2vtfJTbAJWiYmU2K2aBAzniPYKofHNJdsUfeZX_ItWubg_M1kGuqm6uNUvhFaOiWqDmPImKjFz1isZBzFevM-i2ruLiFzUt868QTDkOX64lP7iQJEMdVQl4vXfKijiFeEC-ZYpn0G3_-FX-xlFQkiKRuu4Kg3bm_2xyP2Pp3t74ywXrrKBgAJglsx0MST04yWXcSlZMXHO4GK6j2esVM25BXc7YHedtk62ZrPbQ91pNYJJuYHD2nykSdXzwXdm2atJ-ALUBtsJAtwutfb1NnFjTh2gB8lJ1MjYqmD988jfMJnCe1LZdLpH6T2uwIvRRGZ1NAHsvpeMxXJ-95ckqeityjE3XwmBKOgknRALLbK6dot47lLqZEEljv780PKApf2D93iBIDZh-Pq8AgK637fE-sufRWAh6VXaZur0qVK7aSyQKRfqWurU43ZAx1Gf-n2gI2YpYXx_3wLKdXymHgxQdbJ9Rr9Eli2lVcHxZ_lYCzrWO77kALPVH8ZNoaFtmw&X-Amz-Signature=8d30705b3a753648cf083e279fef2504434327f06776cdf9198e6d2c9e537f3f",
|
||||
"novel_text": "正弯腰在花丛中扒拉的拂晓衔蝉像狐獴一样站直身体,全身防御拉满,警惕的望着载酒寻歌:“你又想说什么让人不高兴的话,银发红瞳不美丽吗?”",
|
||||
"timestamp": 1767881905.8684108
|
||||
},
|
||||
{
|
||||
"prompt": "**Manga Panel Description:**\n\n**Scene:** A tranquil garden setting with scattered flowers and soft morning light filtering through. The atmosphere is calm but slightly tense with emotional undertones.\n\n**Characters:**\n1. **拂晓衔蝉 (Fuxiao Xianchan):** Silver-haired with striking crimson eyes. She's in a defensive posture - standing upright like a meerkat, body tense and alert. Her silver hair catches the morning light, creating subtle highlights. She's positioned slightly hunched forward, hands at her sides in a guarded stance. Her expression shows a mix of surprise and vulnerability at the personal question.\n\n2. **虞寻歌 (Yu Xunge):** Standing upright with a sincere, non-confrontational posture. Her body language is open and earnest as she asks the question. She maintains respectful eye contact, her expression showing genuine curiosity without aggression. Her hair flows naturally in the gentle breeze.\n\n**Composition:** Two-shot panel focusing on the emotional exchange. 拂晓衔蝉 is positioned slightly to the right, her defensive posture contrasting with 虞寻歌's open stance on the left. The background features soft-focus flowers and foliage to create depth.\n\n**Lighting:** Soft morning light with dappled shadows from overhead foliage. Highlights on 拂晓衔蝉's silver hair to emphasize its color change significance.\n\n**Style:** Monochrome manga style with high-quality linework and detailed screentone shading. Emotional focus with subtle facial expressions conveying the delicate nature of the conversation. Panel borders slightly irregular to suggest an intimate, personal moment.\n\n**Key Details:** \n- 拂晓衔蝉's crimson eyes wide with slight apprehension\n- Her silver hair strands catching light, showing texture and volume\n- 虞寻歌's sincere expression with gentle, questioning eyes\n- Subtle wind effects moving hair and flower petals\n- Emotional tension conveyed through body language contrast\n\n**Mood:** Intimate, vulnerable, sincere inquiry with underlying emotional weight.",
|
||||
"image_url": "https://s3.siliconflow.cn/default/outputs/b08427c9-7ea5-4c9e-9fdc-f1e93287771d_d189e8ced99696eda42f83c51b9b8606_ComfyUI_56432b78_00001_.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAXXXXFILESEXAMPLE%2F20260108%2Fcn-shanghai-1%2Fs3%2Faws4_request&X-Amz-Date=20260108T141832Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImdyYXkiLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiJmYWFzOmRlcDpvcHI6ZDI5Y3UzZ2gzdnZjNzNjNWJpNWc6YWVmNGIiLCJpc3MiOiJodHRwczovL2lhbS5zaWxpY29uZmxvdy5jbiIsImlhdCI6MTc2Nzg3NTYwOSwiZXhwIjoxNzY4MDQ4NDA5LCJ0eXAiOiJzZXJ2aWNlIiwiYXBsdCI6InNmOmZhYXM6ZmFicmljIiwidG50IjoiZDI5Y3UzZ2gzdnZjNzNjNWJpNWciLCJpZCI6ImQ1ZnE4NmM1MG1pczczYmIzbm8wIiwiYWNjZXNzIjpbeyJ0eXBlIjoiZmFhcyIsInN1YmplY3RJZCI6ImQyOWN1M2doM3Z2YzczYzViaTVnIiwiYWN0aW9ucyI6WyJmYWFzOmludm9jYXRpb246cHVsbGluZyJdfV19.cO-aXvKYQfYY7TBx1Y_dq9uCot1uFTyM29D7mSul-aiEvCPM1DR32nrWUBYc879VJieR6pyM_OBgBii9AGvUADVowFDB6nmCOp2jJEwxxqZy5l_FlwmKlsxzAsV4rupgFHOi1vH2CQtRgb0gxD23xkbOsfck45R7LCR2esAc8ktkoWjqvZhR7Lytob7XqQCV0VvuQqio7SaYa9sRuB0REBbU_Hfam2uFw9pRCrxyxvDAsMGJpzhp_LgVCkhti6jqdY75qD2h4xnuFLjEcyStVQZLU_Wq8XbYse5MWe2MkD58_I2bNNsTlvxO3rS-dtDYNkenWG9J2ytrDG42cFa3oZ1eX2cn4ReNDvqJyrj3cHwpDsnPciYGITVXZruq9q9QddYfua6hZsE4HyRJV8Aa-uXRSwnFUkhJwrNPQljWhX2RqkU65cJT53l3fy7LfsjWJxC5jG_TwzxMDNS_KsY2LODS_SlLEyoP3DT_kdG_eXLYLDB3Ist2rPLy8xCbsRCIM5dPABOZ-YcBYp6eZjeesHagw_m5oVBIirgs8CGJrEp_95ZA1MS1PnYBQZry9GXZtIi1hIowPufdkRbcU55ha7oktvZzqe-siXexhH4ilbsm6oNv2uCqP8fllflwrQ8emY7X31rcCeHxvWqM7NggnPyeb02KdUktzfZkQqPPMyI&X-Amz-Signature=15a32d706aad40104109a9302b7bd4027d4cea6cf847f32a59c3f250cd9f326b",
|
||||
"novel_text": "虞寻歌尽可能让自己的语气不要带上任何攻击性,因为她是真的好奇而不是为了挑衅,她站直身体,认真的问道:“那你头发变成浅金色后…岂不是很不适应?”",
|
||||
"timestamp": 1767881913.7345977
|
||||
},
|
||||
{
|
||||
"prompt": "**Manga Image Prompt:**\n\n**Style:** Monochrome manga style, high quality, detailed line art with dynamic action lines and speed effects. Game UI overlay with health bars and status indicators visible.\n\n**Scene:** A ruined manor estate at night, with broken stone walls, collapsed towers, and overgrown vegetation. Moonlight casts dramatic shadows across the ruins. The scene is set high above the manor ruins, with crumbling architecture visible below.\n\n**Center Character (虞寻歌):** A game character sprite/small figure positioned at the center of the frame. He has a bleeding dagger icon floating above his head as an emoji/status indicator. He's in mid-air combat stance, launching an attack. His expression is fierce and determined.\n\n**Opponent (苏一瞳):** A black-haired game character sprite/small figure with glowing red wings that emit a soft crimson light. Above his head floats the ID tag 【苏一瞳】in clear game font, along with handshake and heart pattern icons as status indicators. He's positioned opposite 虞寻歌, defending or counter-attacking.\n\n**Action:** Intense aerial combat between the two characters. Energy trails and impact effects surround them. 虞寻歌 is attacking with a weapon or energy blast, while 苏一瞳 uses his glowing red wings to maneuver and defend.\n\n**Composition:** Dynamic diagonal composition with 虞寻歌 at the center, 苏一瞳 positioned at an angle to create tension. Speed lines and motion blur emphasize the high-speed aerial combat. The ruined manor serves as the dramatic backdrop below.\n\n**Lighting:** Dramatic moonlight from above creates strong highlights and deep shadows. The glowing red wings of 苏一瞳 provide a contrasting light source, casting red hues on nearby surfaces.\n\n**Details:** Game UI elements like health bars, skill cooldowns, and damage numbers float near the characters. Debris and dust particles float in the air from the ruined manor below.",
|
||||
"image_url": "https://s3.siliconflow.cn/default/outputs/a9f400e0-a3cb-452d-a834-8c7b0ea3d36d_b6cbbedf74b234493c377734127172d3_ComfyUI_d9f38225_00001_.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAXXXXFILESEXAMPLE%2F20260108%2Fcn-shanghai-1%2Fs3%2Faws4_request&X-Amz-Date=20260108T154440Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImdyYXkiLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiJmYWFzOmRlcDpvcHI6ZDI5Y3UzZ2gzdnZjNzNjNWJpNWc6YWVmNGIiLCJpc3MiOiJodHRwczovL2lhbS5zaWxpY29uZmxvdy5jbiIsImlhdCI6MTc2Nzg3NTYwOSwiZXhwIjoxNzY4MDQ4NDA5LCJ0eXAiOiJzZXJ2aWNlIiwiYXBsdCI6InNmOmZhYXM6ZmFicmljIiwidG50IjoiZDI5Y3UzZ2gzdnZjNzNjNWJpNWciLCJpZCI6ImQ1ZnE4NmM1MG1pczczYmIzbm8wIiwiYWNjZXNzIjpbeyJ0eXBlIjoiZmFhcyIsInN1YmplY3RJZCI6ImQyOWN1M2doM3Z2YzczYzViaTVnIiwiYWN0aW9ucyI6WyJmYWFzOmludm9jYXRpb246cHVsbGluZyJdfV19.cO-aXvKYQfYY7TBx1Y_dq9uCot1uFTyM29D7mSul-aiEvCPM1DR32nrWUBYc879VJieR6pyM_OBgBii9AGvUADVowFDB6nmCOp2jJEwxxqZy5l_FlwmKlsxzAsV4rupgFHOi1vH2CQtRgb0gxD23xkbOsfck45R7LCR2esAc8ktkoWjqvZhR7Lytob7XqQCV0VvuQqio7SaYa9sRuB0REBbU_Hfam2uFw9pRCrxyxvDAsMGJpzhp_LgVCkhti6jqdY75qD2h4xnuFLjEcyStVQZLU_Wq8XbYse5MWe2MkD58_I2bNNsTlvxO3rS-dtDYNkenWG9J2ytrDG42cFa3oZ1eX2cn4ReNDvqJyrj3cHwpDsnPciYGITVXZruq9q9QddYfua6hZsE4HyRJV8Aa-uXRSwnFUkhJwrNPQljWhX2RqkU65cJT53l3fy7LfsjWJxC5jG_TwzxMDNS_KsY2LODS_SlLEyoP3DT_kdG_eXLYLDB3Ist2rPLy8xCbsRCIM5dPABOZ-YcBYp6eZjeesHagw_m5oVBIirgs8CGJrEp_95ZA1MS1PnYBQZry9GXZtIi1hIowPufdkRbcU55ha7oktvZzqe-siXexhH4ilbsm6oNv2uCqP8fllflwrQ8emY7X31rcCeHxvWqM7NggnPyeb02KdUktzfZkQqPPMyI&X-Amz-Signature=e34ccc674a053e8663fb1e48643394e867f8d10033a50e82c3fcf41ff4097150",
|
||||
"novel_text": "游戏画面里,占据画面中心位的小人正在一座庄园废墟的上空和一个长着发光红翅膀的黑发小人对打,对方脑袋上顶着【苏一瞳】的ID。",
|
||||
"timestamp": 1767887080.9694343
|
||||
},
|
||||
{
|
||||
"prompt": "Manga style, monochrome, high quality. Central focus on a game character sprite in mid-air combat. The main character is Yu Xunge (虞寻歌) - a game sprite character with a bleeding dagger emoji symbol floating above their head. They are fighting against Su Yitong (苏一瞳) - a black-haired game sprite character with glowing red wings, ID 【苏一瞳】 displayed above their head along with handshake and heart emoji symbols. Setting: Above the ruins of a grand manor estate - crumbling stone walls, broken columns, overgrown gardens, shattered windows. The two characters are engaged in aerial combat, with dynamic action lines and motion effects. Yu Xunge is attacking with a weapon, while Su Yitong defends with their glowing red wings. Game UI elements visible: health bars, skill cooldown indicators, floating damage numbers. Dramatic lighting with contrast between the dark ruins below and the glowing red wings illuminating the scene. Action-packed composition with diagonal lines creating tension. Detailed line art, manga shading with screentones.",
|
||||
"image_url": "https://s3.siliconflow.cn/default/outputs/bbfc7152-24f8-44f8-9dfd-24cd1519692a_6bd785cd2e6b26e48c08c6661dd1c08c_ComfyUI_09abdfaa_00001_.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAXXXXFILESEXAMPLE%2F20260108%2Fcn-shanghai-1%2Fs3%2Faws4_request&X-Amz-Date=20260108T155209Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImdyYXkiLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiJmYWFzOmRlcDpvcHI6ZDI5Y3UzZ2gzdnZjNzNjNWJpNWc6MWUyMjciLCJpc3MiOiJodHRwczovL2lhbS5zaWxpY29uZmxvdy5jbiIsImlhdCI6MTc2Nzg4NjQwOSwiZXhwIjoxNzY4MDU5MjA5LCJ0eXAiOiJzZXJ2aWNlIiwiYXBsdCI6InNmOmZhYXM6ZmFicmljIiwidG50IjoiZDI5Y3UzZ2gzdnZjNzNjNWJpNWciLCJpZCI6ImQ1ZnNzaTk3MTluczczZGZhc2swIiwiYWNjZXNzIjpbeyJ0eXBlIjoiZmFhcyIsInN1YmplY3RJZCI6ImQyOWN1M2doM3Z2YzczYzViaTVnIiwiYWN0aW9ucyI6WyJmYWFzOmludm9jYXRpb246cHVsbGluZyJdfV19.XtxUUMcq-HHTszm_BEdRgYrQuMiMM1KnXjaQPpkHQYwCSXk_LWLgrLZgGJQQUzYuP68Ez6iWzEytSHebwsMWR73NFp0ZcXPYBfkBnSLAIte5oJKl6nF7NZ9On9ghjSaWceueSu9Apm5TaSBtXfWjDMOIbQ0F6_8TliZAa4LZ4Y9xJ88hITOZnL7nKa07NCX40hYdIu4C5NXBr7zfdvICStF3msFNBuRJxadJ2RfoVuPt2AEp3xEpRf3rpsPy9GK60F6qNZPrfnZv5kC4s2hC98Iz8UN9A0BmyaYTMTAqIpcFIE7eaWx9cekSgp0AuWfRG45nG7UnrKMP7TrYN8mL0Yuwn5FPrdGhdNDjbv58PEfLXEkku8Pq2KxGctwXGlwhVsAELad0bVdEMgb_5xv9fb8b4zX4vzwt0fy-Ugv8qV1LINvveW2OlRGZ1Y7DdL6AcJ5H-iGqWFYgYJzkjox4vr_8jtTuHCDXTaPYRd30_PXsCED_gy233UcSKDsMspsCOPmGzO4fNiRpL8kdQjpOl-JhH2djdopv1MyugzARjqSH2f0QgMglKdkQEGd2Ik4gAFuyOKDApNAfmIgltDAsIoKZwhaGohJHiXIw6U14j-dCxEAOe8PArgHVA1EWafjlNvoNCh84_xwvhfAecyI6h7YvZpACom5L_gGMY1yTMTA&X-Amz-Signature=853da71cd62f7652cf4369e31487cb6719e6094b046e3f4f565ec96002d75d8f",
|
||||
"novel_text": "游戏画面里,占据画面中心位的小人正在一座庄园废墟的上空和一个长着发光红翅膀的黑发小人对打,对方脑袋上顶着【苏一瞳】的ID。",
|
||||
"timestamp": 1767887529.50243
|
||||
},
|
||||
{
|
||||
"prompt": "Manga style, monochrome, high quality. A dynamic gaming scene showing two game character avatars in combat. On the left: Yu Xunge's game character avatar - a small chibi-style character with a determined expression, above his head floats a bleeding dagger emoji symbol that appears to be pulsing or \"popping\" out with motion lines. On the right: Su Yitong's game character avatar - a small chibi-style character with black hair, glowing red wings that emit a soft crimson light, above her head floats both a handshake emoji and a heart emoji that appear to be \"popping\" out with motion lines. The ID tag 【苏一瞳】floats near her character. The two characters are positioned in a virtual gaming arena with digital grid patterns on the ground and faint holographic interface elements in the background. The scene captures the contrast between Yu Xunge's aggressive combat stance and Su Yitong's friendly approach, with emoji symbols creating visual tension. Action lines and speed effects emphasize the dynamic nature of the online battle. Detailed line art, manga shading techniques, and dramatic lighting to highlight the glowing red wings and emoji symbols.",
|
||||
"image_url": "https://s3.siliconflow.cn/default/outputs/a10a2c86-0645-4904-bbe6-0c35faacad2e_c7bad42deab9a433b5e8e3fb33d24599_ComfyUI_b51df183_00001_.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAXXXXFILESEXAMPLE%2F20260108%2Fcn-shanghai-1%2Fs3%2Faws4_request&X-Amz-Date=20260108T155215Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImdyYXkiLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiJmYWFzOmRlcDpvcHI6ZDI5Y3UzZ2gzdnZjNzNjNWJpNWc6YWVmNGIiLCJpc3MiOiJodHRwczovL2lhbS5zaWxpY29uZmxvdy5jbiIsImlhdCI6MTc2Nzg3NTYwOSwiZXhwIjoxNzY4MDQ4NDA5LCJ0eXAiOiJzZXJ2aWNlIiwiYXBsdCI6InNmOmZhYXM6ZmFicmljIiwidG50IjoiZDI5Y3UzZ2gzdnZjNzNjNWJpNWciLCJpZCI6ImQ1ZnE4NmM1MG1pczczYmIzbm8wIiwiYWNjZXNzIjpbeyJ0eXBlIjoiZmFhcyIsInN1YmplY3RJZCI6ImQyOWN1M2doM3Z2YzczYzViaTVnIiwiYWN0aW9ucyI6WyJmYWFzOmludm9jYXRpb246cHVsbGluZyJdfV19.cO-aXvKYQfYY7TBx1Y_dq9uCot1uFTyM29D7mSul-aiEvCPM1DR32nrWUBYc879VJieR6pyM_OBgBii9AGvUADVowFDB6nmCOp2jJEwxxqZy5l_FlwmKlsxzAsV4rupgFHOi1vH2CQtRgb0gxD23xkbOsfck45R7LCR2esAc8ktkoWjqvZhR7Lytob7XqQCV0VvuQqio7SaYa9sRuB0REBbU_Hfam2uFw9pRCrxyxvDAsMGJpzhp_LgVCkhti6jqdY75qD2h4xnuFLjEcyStVQZLU_Wq8XbYse5MWe2MkD58_I2bNNsTlvxO3rS-dtDYNkenWG9J2ytrDG42cFa3oZ1eX2cn4ReNDvqJyrj3cHwpDsnPciYGITVXZruq9q9QddYfua6hZsE4HyRJV8Aa-uXRSwnFUkhJwrNPQljWhX2RqkU65cJT53l3fy7LfsjWJxC5jG_TwzxMDNS_KsY2LODS_SlLEyoP3DT_kdG_eXLYLDB3Ist2rPLy8xCbsRCIM5dPABOZ-YcBYp6eZjeesHagw_m5oVBIirgs8CGJrEp_95ZA1MS1PnYBQZry9GXZtIi1hIowPufdkRbcU55ha7oktvZzqe-siXexhH4ilbsm6oNv2uCqP8fllflwrQ8emY7X31rcCeHxvWqM7NggnPyeb02KdUktzfZkQqPPMyI&X-Amz-Signature=ba0f1c87b98be497ba33fbd387c897c697f72c218293fcb4f8b11cbfb3e2e6dd",
|
||||
"novel_text": "【虞寻歌】小人头顶不停蹦出滴血匕首的表情,【苏一瞳】那边却不停冒出握手和爱心的图案。",
|
||||
"timestamp": 1767887535.609587
|
||||
},
|
||||
{
|
||||
"prompt": "**Manga Image Prompt:**\n\n**Scene:** A close-up shot of 虞寻歌 (Yu Xunge) in the game world, showing a genuine, heartfelt smile on his face. The scene captures a moment of unexpected joy during gameplay.\n\n**Character Details:**\n- **虞寻歌:** Game character sprite with a simple but expressive design. He has a genuine, warm smile that reaches his eyes - a rare expression for him. Above his head floats a dripping blood dagger emoji symbol (🔪💧), indicating his in-game status/role. His character design should be consistent with previous appearances.\n\n**Setting:** Digital game environment with subtle pixelated or digital effects in the background. Soft glow of game interface elements around the edges. The focus is entirely on 虞寻歌's emotional expression.\n\n**Action/Expression:** 虞寻歌 is looking at something off-screen (presumably the game interaction with 苏一瞳), with a genuine, unguarded smile that shows he's truly enjoying the moment. His expression should contrast with the violent dagger emoji above him.\n\n**Style:** Monochrome manga style with high-quality linework. Use dramatic lighting to highlight the smile and emotional moment. Strong contrast between the dark game environment and the character's bright expression. Include subtle motion lines or emotional aura to emphasize the spontaneous nature of the smile.\n\n**Composition:** Close-up shot focusing on 虞寻歌's face and upper body. The dagger emoji should be clearly visible but not distracting from the main emotional focus. Use manga-style panel composition with potential for a single impactful frame.\n\n**Mood:** Unexpected warmth, genuine emotion breaking through the game's competitive atmosphere, a moment of human connection in a digital space.",
|
||||
"image_url": "https://s3.siliconflow.cn/default/outputs/b897a760-87ff-4eaa-9fb0-6903a94c66cf_daa10782e437cf404bdaee49f7fadd28_ComfyUI_d734c35e_00001_.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAXXXXFILESEXAMPLE%2F20260108%2Fcn-shanghai-1%2Fs3%2Faws4_request&X-Amz-Date=20260108T155221Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImdyYXkiLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiJmYWFzOmRlcDpvcHI6ZDI5Y3UzZ2gzdnZjNzNjNWJpNWc6MWUyMjciLCJpc3MiOiJodHRwczovL2lhbS5zaWxpY29uZmxvdy5jbiIsImlhdCI6MTc2Nzg4NjQwOSwiZXhwIjoxNzY4MDU5MjA5LCJ0eXAiOiJzZXJ2aWNlIiwiYXBsdCI6InNmOmZhYXM6ZmFicmljIiwidG50IjoiZDI5Y3UzZ2gzdnZjNzNjNWJpNWciLCJpZCI6ImQ1ZnNzaTk3MTluczczZGZhc2swIiwiYWNjZXNzIjpbeyJ0eXBlIjoiZmFhcyIsInN1YmplY3RJZCI6ImQyOWN1M2doM3Z2YzczYzViaTVnIiwiYWN0aW9ucyI6WyJmYWFzOmludm9jYXRpb246cHVsbGluZyJdfV19.XtxUUMcq-HHTszm_BEdRgYrQuMiMM1KnXjaQPpkHQYwCSXk_LWLgrLZgGJQQUzYuP68Ez6iWzEytSHebwsMWR73NFp0ZcXPYBfkBnSLAIte5oJKl6nF7NZ9On9ghjSaWceueSu9Apm5TaSBtXfWjDMOIbQ0F6_8TliZAa4LZ4Y9xJ88hITOZnL7nKa07NCX40hYdIu4C5NXBr7zfdvICStF3msFNBuRJxadJ2RfoVuPt2AEp3xEpRf3rpsPy9GK60F6qNZPrfnZv5kC4s2hC98Iz8UN9A0BmyaYTMTAqIpcFIE7eaWx9cekSgp0AuWfRG45nG7UnrKMP7TrYN8mL0Yuwn5FPrdGhdNDjbv58PEfLXEkku8Pq2KxGctwXGlwhVsAELad0bVdEMgb_5xv9fb8b4zX4vzwt0fy-Ugv8qV1LINvveW2OlRGZ1Y7DdL6AcJ5H-iGqWFYgYJzkjox4vr_8jtTuHCDXTaPYRd30_PXsCED_gy233UcSKDsMspsCOPmGzO4fNiRpL8kdQjpOl-JhH2djdopv1MyugzARjqSH2f0QgMglKdkQEGd2Ik4gAFuyOKDApNAfmIgltDAsIoKZwhaGohJHiXIw6U14j-dCxEAOe8PArgHVA1EWafjlNvoNCh84_xwvhfAecyI6h7YvZpACom5L_gGMY1yTMTA&X-Amz-Signature=c607e18a92a81762527b8c75e7aff714161f60fa1c5397c77b67ff5c4246cb24",
|
||||
"novel_text": "看着看着,虞寻歌竟不自觉发自真心的笑了起来。",
|
||||
"timestamp": 1767887542.1732938
|
||||
}
|
||||
]
|
||||
152
frontend/main.py
152
frontend/main.py
@ -4,6 +4,8 @@ import os
|
||||
import datetime
|
||||
import base64
|
||||
from pathlib import Path
|
||||
from PIL import Image
|
||||
from io import BytesIO
|
||||
|
||||
# Configuration
|
||||
ST_BACKEND_URL = os.getenv("BACKEND_URL", "http://localhost:5001")
|
||||
@ -38,7 +40,7 @@ if char_path.exists():
|
||||
char_encoded = base64.b64encode(f.read()).decode()
|
||||
|
||||
# Load decorative image for bottom-left corner
|
||||
bottom_left_path = images_dir / "Pasted image (3).png"
|
||||
bottom_left_path = images_dir / "background.png"
|
||||
bottom_left_encoded = ""
|
||||
if bottom_left_path.exists():
|
||||
with open(bottom_left_path, "rb") as f:
|
||||
@ -54,11 +56,16 @@ if sidebar_accent_path.exists():
|
||||
# Custom CSS with Light Transparent Background
|
||||
st.markdown(f"""
|
||||
<style>
|
||||
/* Global Background - Semi-transparent White to reveal images */
|
||||
/* Global Background - Dark Theme */
|
||||
html, body {{
|
||||
background: linear-gradient(135deg, rgba(245, 247, 250, 0.9) 0%, rgba(228, 233, 242, 0.9) 100%) !important;
|
||||
background-attachment: fixed !important;
|
||||
color: #1a1a2e !important;
|
||||
background: #0e1117 !important;
|
||||
color: #e0e0e0 !important;
|
||||
}}
|
||||
|
||||
/* Top Header Bar */
|
||||
header[data-testid="stHeader"] {{
|
||||
background-color: rgba(0, 0, 0, 0.3) !important;
|
||||
backdrop-filter: blur(10px);
|
||||
}}
|
||||
|
||||
.stApp {{
|
||||
@ -69,104 +76,101 @@ st.markdown(f"""
|
||||
background: transparent !important;
|
||||
}}
|
||||
|
||||
/* Headers - Dark Blue/Black */
|
||||
/* Headers - Light Blue for contrast */
|
||||
h1, h2, h3, .stHeading {{
|
||||
color: #0d47a1 !important;
|
||||
text-shadow: none;
|
||||
color: #81d4fa !important;
|
||||
text-shadow: 0 2px 4px rgba(0,0,0,0.5);
|
||||
font-family: 'Inter', sans-serif;
|
||||
}}
|
||||
|
||||
/* Standard Text - Dark Gray */
|
||||
/* Standard Text - Light Gray */
|
||||
p, div, span, label, li {{
|
||||
color: #424242 !important;
|
||||
color: #e0e0e0 !important;
|
||||
}}
|
||||
|
||||
/* Inputs - White Glassmorphism - Strong Override */
|
||||
/* Inputs - White Glassmorphism - Strong Override */
|
||||
/* Inputs - Dark Glassmorphism */
|
||||
.stTextInput input, .stTextArea textarea, .stSelectbox select, div[data-baseweb="select"] > div {{
|
||||
background-color: rgba(255, 255, 255, 0.7) !important;
|
||||
color: #1a1a2e !important;
|
||||
caret-color: #0d47a1;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15) !important;
|
||||
background-color: rgba(0, 0, 0, 0.4) !important;
|
||||
color: #f5f5f5 !important;
|
||||
caret-color: #81d4fa;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
||||
backdrop-filter: blur(10px);
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.05);
|
||||
box-shadow: 0 4px 6px rgba(0,0,0,0.3);
|
||||
border-radius: 8px !important;
|
||||
}}
|
||||
|
||||
/* Ensure placeholder text is visible */
|
||||
/* Ensure placeholder text is visible but subtle */
|
||||
::placeholder {{
|
||||
color: rgba(0, 0, 0, 0.5) !important;
|
||||
color: rgba(255, 255, 255, 0.4) !important;
|
||||
opacity: 1 !important;
|
||||
}}
|
||||
|
||||
.stTextInput input:focus, .stTextArea textarea:focus, .stSelectbox select:focus, div[data-baseweb="select"] > div:focus-within {{
|
||||
border-color: #00d4ff !important;
|
||||
background-color: rgba(255, 255, 255, 0.95) !important;
|
||||
box-shadow: 0 4px 12px rgba(0, 212, 255, 0.25);
|
||||
border-color: #81d4fa !important;
|
||||
background-color: rgba(0, 0, 0, 0.8) !important;
|
||||
box-shadow: 0 0 15px rgba(129, 212, 250, 0.3);
|
||||
}}
|
||||
|
||||
/* Code blocks */
|
||||
code {{
|
||||
color: #d81b60 !important;
|
||||
background-color: rgba(0, 0, 0, 0.05) !important;
|
||||
color: #ff8a80 !important;
|
||||
background-color: rgba(255, 255, 255, 0.1) !important;
|
||||
}}
|
||||
|
||||
/* Buttons */
|
||||
.stButton button {{
|
||||
background: linear-gradient(135deg, #00d4ff 0%, #00a8cc 100%) !important;
|
||||
background: linear-gradient(135deg, #0288d1 0%, #00acc1 100%) !important;
|
||||
color: white !important;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
}}
|
||||
|
||||
.stButton button:hover {{
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 6px 15px rgba(0, 212, 255, 0.4);
|
||||
box-shadow: 0 6px 15px rgba(2, 136, 209, 0.5);
|
||||
}}
|
||||
|
||||
/* Sidebar - Glassy White */
|
||||
/* Sidebar - Dark Glass */
|
||||
section[data-testid="stSidebar"] {{
|
||||
background-color: rgba(255, 255, 255, 0.7) !important;
|
||||
border-right: 1px solid rgba(0,0,0,0.05);
|
||||
backdrop-filter: blur(15px);
|
||||
background-color: rgba(0, 0, 0, 0.5) !important;
|
||||
border-right: 1px solid rgba(255,255,255,0.05);
|
||||
backdrop-filter: blur(20px);
|
||||
}}
|
||||
|
||||
/* Dropdown menu items */
|
||||
ul[data-testid="stSelectboxVirtualDropdown"] li {{
|
||||
background-color: white !important;
|
||||
color: #333 !important;
|
||||
background-color: #1e1e1e !important;
|
||||
color: #e0e0e0 !important;
|
||||
}}
|
||||
ul[data-testid="stSelectboxVirtualDropdown"] li:hover {{
|
||||
background-color: #e3f2fd !important;
|
||||
background-color: #333 !important;
|
||||
}}
|
||||
|
||||
/* Expanders */
|
||||
.streamlit-expanderHeader {{
|
||||
background-color: rgba(255,255,255,0.6) !important;
|
||||
color: #1a1a2e !important;
|
||||
background-color: rgba(0,0,0,0.6) !important;
|
||||
color: #e0e0e0 !important;
|
||||
border-radius: 8px;
|
||||
}}
|
||||
|
||||
/* Tabs */
|
||||
.stTabs [data-baseweb="tab-list"] {{
|
||||
background-color: rgba(255,255,255,0.5);
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
border-radius: 8px;
|
||||
}}
|
||||
|
||||
.stTabs [data-baseweb="tab"] {{
|
||||
color: #666;
|
||||
color: #aaa;
|
||||
}}
|
||||
|
||||
.stTabs [data-baseweb="tab"][aria-selected="true"] {{
|
||||
background-color: white;
|
||||
color: #00d4ff;
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
|
||||
background-color: rgba(255,255,255,0.1);
|
||||
color: #81d4fa;
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
|
||||
}}
|
||||
|
||||
/* Bottom-left decorative image */
|
||||
/* Bottom decorative image - Moved to RIGHT */
|
||||
/* Background decorative image - Full Screen Cover */
|
||||
/* Background decorative image - Clear & Visible */
|
||||
.stApp::before {{
|
||||
content: '';
|
||||
position: fixed;
|
||||
@ -178,7 +182,7 @@ st.markdown(f"""
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
opacity: 0.85; /* Much more visible */
|
||||
opacity: 0.9; /* clear visibility */
|
||||
z-index: 0;
|
||||
pointer-events: none;
|
||||
}}
|
||||
@ -196,7 +200,7 @@ st.markdown(f"""
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
opacity: 0.15;
|
||||
opacity: 0.1;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
}}
|
||||
@ -384,6 +388,62 @@ with tab1:
|
||||
key=f"dl_{i}"
|
||||
)
|
||||
|
||||
st.divider()
|
||||
st.subheader("3. Stitch & Download Manga")
|
||||
|
||||
# Collect available images
|
||||
available_images = []
|
||||
# Check against the number of prompts we have
|
||||
if 'prompts' in st.session_state:
|
||||
for i in range(len(st.session_state['prompts'])):
|
||||
if f"image_data_{i}" in st.session_state:
|
||||
available_images.append((i, st.session_state[f"image_data_{i}"]))
|
||||
|
||||
if available_images:
|
||||
if st.button("🧩 Stitch All Panels Vertically", type="primary"):
|
||||
try:
|
||||
with st.spinner("Stitching images..."):
|
||||
images = []
|
||||
for idx, img_bytes in available_images:
|
||||
img = Image.open(BytesIO(img_bytes))
|
||||
images.append(img)
|
||||
|
||||
if images:
|
||||
# Calculate total dimensions
|
||||
# Use max width to accommodate all
|
||||
total_width = max(img.width for img in images)
|
||||
total_height = sum(img.height for img in images)
|
||||
|
||||
# Create new image
|
||||
stitched_img = Image.new('RGB', (total_width, total_height), (255, 255, 255))
|
||||
|
||||
# Paste images
|
||||
y_offset = 0
|
||||
for img in images:
|
||||
# Center image if widths differ
|
||||
x_offset = (total_width - img.width) // 2
|
||||
stitched_img.paste(img, (x_offset, y_offset))
|
||||
y_offset += img.height
|
||||
|
||||
# Save to buffer
|
||||
buf = BytesIO()
|
||||
stitched_img.save(buf, format="PNG")
|
||||
st.session_state['stitched_image'] = buf.getvalue()
|
||||
st.success("Stitched successfully!")
|
||||
except Exception as e:
|
||||
st.error(f"Error stitching images: {e}")
|
||||
|
||||
if 'stitched_image' in st.session_state:
|
||||
st.image(st.session_state['stitched_image'], caption="Full Manga Strip", use_container_width=True)
|
||||
st.download_button(
|
||||
label="⬇️ Download Full Manga",
|
||||
data=st.session_state['stitched_image'],
|
||||
file_name="manga_strip.png",
|
||||
mime="image/png"
|
||||
)
|
||||
else:
|
||||
st.info("Generate at least one panel image to unlock stitching.")
|
||||
|
||||
with tab2:
|
||||
st.header("History")
|
||||
if st.button("🔄 Refresh History"):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user