prithivMLmods commited on
Commit
ed7e269
1 Parent(s): e699a30

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -11,8 +11,13 @@ from typing import Tuple
11
  dtype = torch.bfloat16
12
  device = "cuda" if torch.cuda.is_available() else "cpu"
13
 
 
14
  pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=dtype).to(device)
15
 
 
 
 
 
16
  MAX_SEED = np.iinfo(np.int32).max
17
  MAX_IMAGE_SIZE = 2048
18
 
@@ -71,7 +76,7 @@ style_list = [
71
  },
72
  ]
73
 
74
- css="""
75
  #col-container {
76
  margin: 0 auto;
77
  max-width: 530px;
 
11
  dtype = torch.bfloat16
12
  device = "cuda" if torch.cuda.is_available() else "cpu"
13
 
14
+ # Load the base model pipeline
15
  pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=dtype).to(device)
16
 
17
+ # Load the Flux Realism LoRA model
18
+ lora_repo = "XLabs-AI/flux-RealismLora"
19
+ pipe.load_lora_weights(lora_repo)
20
+
21
  MAX_SEED = np.iinfo(np.int32).max
22
  MAX_IMAGE_SIZE = 2048
23
 
 
76
  },
77
  ]
78
 
79
+ css = """
80
  #col-container {
81
  margin: 0 auto;
82
  max-width: 530px;