Commit ·
0efd930
1
Parent(s): 868b6a5
Update app.py
Browse files49 unmodified lines505152535455565758596026 unmodified lines878889909192939495969789 unmodified lines18718818919019119219319419519619749 unmodified lineselif(option == "person"):instance_prompt_example = "julcto"freeze_for = 70show_prior_preservation = True if base != "v2-768" else Falseif(show_prior_preservation):prior_preservation_box_update = gr.update(visible=show_prior_preservation)else:prior_preservation_box_update = gr.update(visible=show_prior_preservation, value=False)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]elif(option == "style"):instance_prompt_example = "trsldamrl"26 unmodified linesif(uses_custom):Training_Steps = int(inputs[-3])else:Training_Steps = file_counter*200if(Training_Steps > 2400):Training_Steps=2400elif(Training_Steps < 1400):Training_Steps=1400if(is_spaces):if(selected_model == "v1-5"):its = 1.189 unmodified lineselif(type_of_thing == "person"):Train_text_encoder_for=75Training_Steps = file_counter*200if(Training_Steps > 2400):Training_Steps=2400elif(Training_Steps < 1400):Training_Steps=1400stptxt = int((Training_Steps*Train_text_encoder_for)/100)gradient_checkpointing = False if which_model == "v1-5" else True49 unmodified lines505152535455565726 unmodified lines8485868788899089 unmodified lines18018118218318418518649 unmodified lineselif(option == "person"):instance_prompt_example = "julcto"freeze_for = 70show_prior_preservation = Falseprior_preservation_box_update = gr.update(visible=show_prior_preservation)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]elif(option == "style"):instance_prompt_example = "trsldamrl"26 unmodified linesif(uses_custom):Training_Steps = int(inputs[-3])else:Training_Steps = file_counter*150if(is_spaces):if(selected_model == "v1-5"):its = 1.189 unmodified lineselif(type_of_thing == "person"):Train_text_encoder_for=75Training_Steps = file_counter*150stptxt = int((Training_Steps*Train_text_encoder_for)/100)gradient_checkpointing = False if which_model == "v1-5" else True
app.py+4-15