Meeex2 commited on
Commit
49f7e34
·
verified ·
1 Parent(s): 01d1e46

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -56,8 +56,6 @@ def load_lora_pipeline(revision: str):
56
 
57
  # Extract step number from revision name (e.g., "step_1500" -> "1500")
58
  step_num = revision.split('_')[-1]
59
- if len(step_num) < 4:
60
- step_num = '0' + step_num
61
  filename = f"moroccan_ghibli_flux_lora_00000{step_num}.safetensors"
62
 
63
  logger.info(f"Downloading LoRA weights: {filename}")
@@ -72,10 +70,10 @@ def load_lora_pipeline(revision: str):
72
  pipe.load_lora_weights(lora_path)
73
  return pipe
74
 
75
- def init_pipelines(style_intensity: str = "low"):
76
  global pipeline_base, pipeline_lora
77
  revision_map = {
78
- "low": "step_750",
79
  "medium": "step_1500",
80
  "high": "step_2500"
81
  }
@@ -90,7 +88,7 @@ def init_pipelines(style_intensity: str = "low"):
90
  logger.info("LoRA pipeline loaded")
91
 
92
  # Initial pipelines
93
- init_pipelines("low")
94
 
95
  def update_lora_pipeline(style_intensity):
96
  logger.info(f"Updating LoRA pipeline to style: {style_intensity}")
@@ -140,7 +138,7 @@ with gr.Blocks() as demo:
140
  style_intensity = gr.Dropdown(
141
  label="LoRA Style Intensity",
142
  choices=["low", "medium", "high"],
143
- value="low",
144
  interactive=True
145
  )
146
 
 
56
 
57
  # Extract step number from revision name (e.g., "step_1500" -> "1500")
58
  step_num = revision.split('_')[-1]
 
 
59
  filename = f"moroccan_ghibli_flux_lora_00000{step_num}.safetensors"
60
 
61
  logger.info(f"Downloading LoRA weights: {filename}")
 
70
  pipe.load_lora_weights(lora_path)
71
  return pipe
72
 
73
+ def init_pipelines(style_intensity: str = "medium"):
74
  global pipeline_base, pipeline_lora
75
  revision_map = {
76
+ "low": "step_0750",
77
  "medium": "step_1500",
78
  "high": "step_2500"
79
  }
 
88
  logger.info("LoRA pipeline loaded")
89
 
90
  # Initial pipelines
91
+ init_pipelines("medium")
92
 
93
  def update_lora_pipeline(style_intensity):
94
  logger.info(f"Updating LoRA pipeline to style: {style_intensity}")
 
138
  style_intensity = gr.Dropdown(
139
  label="LoRA Style Intensity",
140
  choices=["low", "medium", "high"],
141
+ value="medium",
142
  interactive=True
143
  )
144