multimodalart HF staff commited on
Commit
0efd930
1 Parent(s): 868b6a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -15
app.py CHANGED
@@ -50,11 +50,8 @@ def swap_text(option, base):
50
  elif(option == "person"):
51
  instance_prompt_example = "julcto"
52
  freeze_for = 70
53
- show_prior_preservation = True if base != "v2-768" else False
54
- if(show_prior_preservation):
55
- prior_preservation_box_update = gr.update(visible=show_prior_preservation)
56
- else:
57
- prior_preservation_box_update = gr.update(visible=show_prior_preservation, value=False)
58
  return [f"You are going to train a `person`(s), upload 10-20 images of each person you are planning on training on from different angles/perspectives. You can use services like <a style='text-decoration: underline' target='_blank' href='https://www.birme.net/?target_width={resize_width}&target_height={resize_width}'>birme</a> for smart cropping. {mandatory_liability}:", '''<img src="file/person.png" />''', f"You should name your concept with a unique made up word that has low chance of the model already knowing it (e.g.: `{instance_prompt_example}` here). Images will be automatically cropped to {resize_width}x{resize_width}.", freeze_for, prior_preservation_box_update]
59
  elif(option == "style"):
60
  instance_prompt_example = "trsldamrl"
@@ -87,11 +84,7 @@ def count_files(*inputs):
87
  if(uses_custom):
88
  Training_Steps = int(inputs[-3])
89
  else:
90
- Training_Steps = file_counter*200
91
- if(Training_Steps > 2400):
92
- Training_Steps=2400
93
- elif(Training_Steps < 1400):
94
- Training_Steps=1400
95
  if(is_spaces):
96
  if(selected_model == "v1-5"):
97
  its = 1.1
@@ -187,11 +180,7 @@ def train(*inputs):
187
  elif(type_of_thing == "person"):
188
  Train_text_encoder_for=75
189
 
190
- Training_Steps = file_counter*200
191
- if(Training_Steps > 2400):
192
- Training_Steps=2400
193
- elif(Training_Steps < 1400):
194
- Training_Steps=1400
195
 
196
  stptxt = int((Training_Steps*Train_text_encoder_for)/100)
197
  gradient_checkpointing = False if which_model == "v1-5" else True
 
50
  elif(option == "person"):
51
  instance_prompt_example = "julcto"
52
  freeze_for = 70
53
+ show_prior_preservation = False
54
+ prior_preservation_box_update = gr.update(visible=show_prior_preservation)
 
 
 
55
  return [f"You are going to train a `person`(s), upload 10-20 images of each person you are planning on training on from different angles/perspectives. You can use services like <a style='text-decoration: underline' target='_blank' href='https://www.birme.net/?target_width={resize_width}&target_height={resize_width}'>birme</a> for smart cropping. {mandatory_liability}:", '''<img src="file/person.png" />''', f"You should name your concept with a unique made up word that has low chance of the model already knowing it (e.g.: `{instance_prompt_example}` here). Images will be automatically cropped to {resize_width}x{resize_width}.", freeze_for, prior_preservation_box_update]
56
  elif(option == "style"):
57
  instance_prompt_example = "trsldamrl"
 
84
  if(uses_custom):
85
  Training_Steps = int(inputs[-3])
86
  else:
87
+ Training_Steps = file_counter*150
 
 
 
 
88
  if(is_spaces):
89
  if(selected_model == "v1-5"):
90
  its = 1.1
 
180
  elif(type_of_thing == "person"):
181
  Train_text_encoder_for=75
182
 
183
+ Training_Steps = file_counter*150
 
 
 
 
184
 
185
  stptxt = int((Training_Steps*Train_text_encoder_for)/100)
186
  gradient_checkpointing = False if which_model == "v1-5" else True