Import os import random import json import tkinter as tk from tkinter import fil

Prompt
import os import random import json import tkinter as tk from tkinter import filedialog, ttk from PIL import Image, ImageEnhance, ImageTk, ImageSequence # Пути к ресурсам BASE_BEAVER_PATH = "base_beaver.png" BACKGROUNDS_DIR = "backgrounds/" FLAGS_DIR = "flags/" ACCESSORIES_DIR = "accessories/" LEGENDARY_ACCESSORIES_DIR = "legendary_accessories/" OUTPUT_DIR = "output_images/" # Цветовые фильтры меха FUR_COLORS = { "Brown": 1.0, "Dark Brown": 0.8, "Gray": 0.5, "Black": 0.3, "Red": 1.2, "Golden": 1.5 } # Уровни редкости RARITY_TIERS = { "Common": 0.7, "Rare": 0.2, "Legendary": 0.1 } # Создаем папку для результата os.makedirs(OUTPUT_DIR, exist_ok=True) # Загружаем базового бобра base_beaver = Image.open(BASE_BEAVER_PATH).convert("RGBA") # Фильтры: Glow и VHS-эффект def apply_glow(image): return image.filter(ImageEnhance.Brightness(image).enhance(1.3)) def apply_vhs_effect(image): r, g, b, a = image.split() r = r.offset(-3, 0) # Смещение красного канала return Image.merge("RGBA", (r, g, b, a)) # Функция генерации случайного бобра с анимацией def generate_random_variant(selected_fur_color, apply_effects=False, generate_gif=False): bg_path = random.choice(os.listdir(BACKGROUNDS_DIR)) flag_path = random.choice(os.listdir(FLAGS_DIR)) # Выбираем аксессуар с учетом редкости acc_choice = random.choices( ["common", "rare", "legendary"], weights=[RARITY_TIERS["Common"], RARITY_TIERS["Rare"], RARITY_TIERS["Legendary"]] )[0] if acc_choice == "legendary": acc_path = random.choice(os.listdir(LEGENDARY_ACCESSORIES_DIR)) acc_full_path = os.path.join(LEGENDARY_ACCESSORIES_DIR, acc_path) else: acc_path = random.choice(os.listdir(ACCESSORIES_DIR)) acc_full_path = os.path.join(ACCESSORIES_DIR, acc_path) # Загружаем изображения background = Image.open(os.path.join(BACKGROUNDS_DIR, bg_path)).convert("RGBA") flag = Image.open(os.path.join
Tags
Explore More AI Tools
Discover our full suite of free AI-powered creative tools. From image generation to editing, transform your ideas into stunning visuals.
AI Image Generator
Create stunning AI art from text descriptions with multiple style presets and advanced controls.
AI Photo Editor
Transform existing images with natural language instructions. Edit, enhance, and style your photos with AI.
Background Remover
Remove backgrounds from images instantly with AI precision. Perfect for product photos, portraits, and more.
SD 3.5 Large Turbo
Ultra-fast image generation in just 4 steps with professional quality. Perfect for quick iterations.
SD 3.5 Large
8B parameter model for high-quality images with excellent prompt adherence and detail.
Studio Ghibli AI
Transform your images into Studio Ghibli artwork style. Magical, whimsical, and beautifully animated.
Stable Diffusion XL
1024×1024 high-resolution generation with 3x larger UNet for exceptional detail and quality.