File size: 1,079 Bytes
6026000
 
 
 
 
 
 
006a6f3
 
94ab943
6026000
481b845
6026000
 
bf9d1cc
6026000
006a6f3
bf9d1cc
6026000
 
006a6f3
0f0e9c7
 
 
 
 
 
 
 
 
 
 
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
31
32
33
import torch

class Config:
    # Hardware
    DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
    DTYPE = torch.float16 if DEVICE == "cuda" else torch.float32

    # Base Model & LoRA (from primerz/pixagram)
    REPO_ID = "primerz/pixagram"
    CHECKPOINT_FILENAME = "horizon.safetensors"
    LORA_FILENAME = "retroart.safetensors"
    LORA_STRENGTH = 1.0
    
    # Trigger Words for the LoRA
    STYLE_TRIGGER = "(artwork:0.5), (illustration:0.5), p1x3l4rt, pixel art"
    
    # Default Negative Prompt
    DEFAULT_NEGATIVE_PROMPT = "Ugly, artifacts, blurry, disformed, photo-realistic, photo, photography, realistic, low-quality, pixel art, text."

    # Gradio Parameters
    CGF_SCALE = 1.2           
    STEPS_NUMBER = 8          # Reduced slightly for optimal LCM T2I performance
    
    # Aspect Ratios (width, height) - all fitting within ~1MP resolution
    ASPECT_RATIOS = {
        "16:9": (1344, 768),
        "4:3": (1152, 896),
        "1:1": (1024, 1024),
        "3:4": (896, 1152),
        "9:16": (768, 1344)
    }
    DEFAULT_ASPECT_RATIO = "1:1"