File size: 1,739 Bytes
8247a04
 
 
 
 
 
 
 
 
 
fc21604
8247a04
 
fc21604
 
 
 
 
 
 
 
8247a04
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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"))