imagencpu / config.py
ovedrive's picture
working system
fc21604
raw
history blame
1.74 kB
import os
from dotenv import load_dotenv
# Load environment variables from .env file
load_dotenv()
# Hugging Face API token
HF_TOKEN = os.getenv("HF_TOKEN", "")
# Default model for text to image
DEFAULT_TEXT2IMG_MODEL = "stabilityai/stable-diffusion-3-medium-diffusers"
# Default model for image to image
DEFAULT_IMG2IMG_MODEL = "stabilityai/stable-diffusion-xl-refiner-1.0"
# Default prompts - used as placeholders in UI and defaults in API
DEFAULT_TEXT2IMG_PROMPT = "A beautiful landscape with mountains and a lake"
DEFAULT_IMG2IMG_PROMPT = "Transform this image with fantasy elements"
# Default negative prompts - used to improve image quality by avoiding common issues
DEFAULT_NEGATIVE_PROMPT = "blurry, low quality, distorted, deformed, ugly, pixelated, noise, grain, text, watermark, poor composition, bad proportions, disfigured, mutation, mutated, extra limbs, extra fingers, fused fingers, malformed hands, poorly drawn face, bad anatomy, amateur drawing, low resolution, duplicate, cropped, out of frame, worst quality, jpeg artifacts, compression artifacts, glitch, overexposed, underexposed, low contrast, washed out colors, oversaturated, signature, username, artist name, logo, unnatural lighting, uneven lighting, harsh shadows, motion blur, out of focus, chromatic aberration, film grain, scratches, stains, dark spots, light leaks, fuzzy edges, jagged edges, broken lines, stretched image, elongated features, asymmetrical eyes, misaligned features, missing details, incomplete rendering"
# API settings
API_HOST = os.getenv("API_HOST", "0.0.0.0")
API_PORT = int(os.getenv("API_PORT", "8000"))
# Gradio settings
GRADIO_HOST = os.getenv("GRADIO_HOST", "0.0.0.0")
GRADIO_PORT = int(os.getenv("GRADIO_PORT", "7860"))