Воркед
This commit is contained in:
1 parent
ac32c55ab9
commit
ee94d8e529
1138 files changed
+55771
-77901
No files matched your search
@@ -0,0 +1,86 @@
|
||||
from enum import Enum, auto
|
||||
from typing import List, Dict
|
||||
|
||||
class PromptCategory(Enum):
|
||||
"""Категории промптов"""
|
||||
STYLE = auto()
|
||||
LIGHTING = auto()
|
||||
COMPOSITION = auto()
|
||||
CAMERA = auto()
|
||||
COLORS = auto()
|
||||
MOOD = auto()
|
||||
QUALITY = auto()
|
||||
|
||||
class PromptData:
|
||||
"""Класс для хранения данных о промпте"""
|
||||
def __init__(self, text: str, description: str = "", weight: float = 1.0):
|
||||
self.text = text
|
||||
self.description = description
|
||||
self.weight = weight
|
||||
|
||||
class PromptCategories:
|
||||
"""Класс для работы с категориями промптов"""
|
||||
|
||||
@staticmethod
|
||||
def get_prompts() -> Dict[PromptCategory, List[PromptData]]:
|
||||
"""Возвращает словарь с промптами по категориям"""
|
||||
return {
|
||||
PromptCategory.STYLE: [
|
||||
PromptData("digital art", "Цифровое искусство"),
|
||||
PromptData("oil painting", "Масляная живопись"),
|
||||
PromptData("watercolor", "Акварель"),
|
||||
PromptData("pencil sketch", "Карандашный набросок"),
|
||||
PromptData("anime style", "Аниме стиль"),
|
||||
PromptData("photorealistic", "Фотореалистичный"),
|
||||
],
|
||||
PromptCategory.LIGHTING: [
|
||||
PromptData("soft lighting", "Мягкое освещение"),
|
||||
PromptData("dramatic lighting", "Драматическое освещение"),
|
||||
PromptData("cinematic lighting", "Кинематографическое освещение"),
|
||||
PromptData("natural light", "Естественное освещение"),
|
||||
PromptData("studio lighting", "Студийное освещение"),
|
||||
],
|
||||
PromptCategory.COMPOSITION: [
|
||||
PromptData("rule of thirds", "Правило третей"),
|
||||
PromptData("symmetrical", "Симметричная композиция"),
|
||||
PromptData("centered composition", "Центральная композиция"),
|
||||
PromptData("dynamic pose", "Динамичная поза"),
|
||||
],
|
||||
PromptCategory.CAMERA: [
|
||||
PromptData("close-up shot", "Крупный план"),
|
||||
PromptData("wide angle", "Широкий угол"),
|
||||
PromptData("bokeh", "Боке"),
|
||||
PromptData("depth of field", "Глубина резкости"),
|
||||
],
|
||||
PromptCategory.COLORS: [
|
||||
PromptData("vibrant colors", "Яркие цвета"),
|
||||
PromptData("pastel colors", "Пастельные цвета"),
|
||||
PromptData("monochrome", "Монохром"),
|
||||
PromptData("high contrast", "Высокий контраст"),
|
||||
],
|
||||
PromptCategory.MOOD: [
|
||||
PromptData("peaceful", "Умиротворенное"),
|
||||
PromptData("mysterious", "Таинственное"),
|
||||
PromptData("energetic", "Энергичное"),
|
||||
PromptData("melancholic", "Меланхоличное"),
|
||||
],
|
||||
PromptCategory.QUALITY: [
|
||||
PromptData("highly detailed", "Высокая детализация"),
|
||||
PromptData("8k uhd", "Высокое разрешение"),
|
||||
PromptData("masterpiece", "Шедевр"),
|
||||
PromptData("best quality", "Лучшее качество"),
|
||||
],
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
def get_category_name(category: PromptCategory) -> str:
|
||||
"""Возвращает название категории на русском"""
|
||||
return {
|
||||
PromptCategory.STYLE: "Стили",
|
||||
PromptCategory.LIGHTING: "Освещение",
|
||||
PromptCategory.COMPOSITION: "Композиция",
|
||||
PromptCategory.CAMERA: "Камера",
|
||||
PromptCategory.COLORS: "Цвета",
|
||||
PromptCategory.MOOD: "Настроение",
|
||||
PromptCategory.QUALITY: "Качество",
|
||||
}[category]
|
||||
Reference in new issue
Block a user