Lasya18 commited on
Commit
e955404
·
verified ·
1 Parent(s): e357681

Create config.py

Browse files
Files changed (1) hide show
  1. config.py +42 -0
config.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Configuration file for Interior Style Transfer Pipeline
3
+ """
4
+ import os
5
+ from pathlib import Path
6
+
7
+ class Config:
8
+ # Model paths and settings
9
+ SDXL_MODEL_ID = "stabilityai/stable-diffusion-xl-base-1.0"
10
+ SDXL_REFINER_ID = "stabilityai/stable-diffusion-xl-refiner-1.0"
11
+ CONTROLNET_MODEL_ID = "lllyasviel/control_v11p_sd15_seg"
12
+
13
+ # Generation parameters
14
+ NUM_INFERENCE_STEPS = 50
15
+ GUIDANCE_SCALE = 7.5
16
+ STRENGTH = 0.8 # How much to preserve original structure
17
+
18
+ # Image processing
19
+ IMAGE_SIZE = 1024
20
+ BATCH_SIZE = 1
21
+
22
+ # Segmentation settings
23
+ SEGMENTATION_CONFIDENCE = 0.5
24
+ PRESERVE_CLASSES = ['wall', 'window', 'door', 'ceiling', 'floor']
25
+
26
+ # Style transfer parameters
27
+ STYLE_STRENGTH = 0.7
28
+ CONTENT_STRENGTH = 0.3
29
+ BLEND_ALPHA = 0.8
30
+
31
+ # Output settings
32
+ OUTPUT_DIR = "outputs"
33
+ TEMP_DIR = "temp"
34
+
35
+ # Device
36
+ DEVICE = "cuda" if os.environ.get("CUDA_VISIBLE_DEVICES") else "cpu"
37
+
38
+ @classmethod
39
+ def create_directories(cls):
40
+ """Create necessary directories"""
41
+ Path(cls.OUTPUT_DIR).mkdir(exist_ok=True)
42
+ Path(cls.TEMP_DIR).mkdir(exist_ok=True)