RohitGandikota commited on
Commit
ec9ed03
β€’
1 Parent(s): a9bcbb2

pushing training code

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -236,12 +236,13 @@ class Demo:
236
 
237
  if self.training:
238
  return [gr.update(interactive=True, value='Train'), gr.update(value='Someone else is training... Try again soon'), None, gr.update()]
 
239
  attributes = attributes_input
240
  if is_person:
241
  attributes = 'white, black, asian, hispanic, indian, male, female'
 
242
  self.training = True
243
  train_xl(target=target_concept, postive=positive_prompt, negative=negative_prompt, lr=lr_input, iterations=iterations_input, config_file='trainscripts/textsliders/data/config-xl.yaml', rank=rank, device=self.device, attributes=attributes, save_name=save_name)
244
-
245
  self.training = False
246
 
247
  torch.cuda.empty_cache()
 
236
 
237
  if self.training:
238
  return [gr.update(interactive=True, value='Train'), gr.update(value='Someone else is training... Try again soon'), None, gr.update()]
239
+
240
  attributes = attributes_input
241
  if is_person:
242
  attributes = 'white, black, asian, hispanic, indian, male, female'
243
+
244
  self.training = True
245
  train_xl(target=target_concept, postive=positive_prompt, negative=negative_prompt, lr=lr_input, iterations=iterations_input, config_file='trainscripts/textsliders/data/config-xl.yaml', rank=rank, device=self.device, attributes=attributes, save_name=save_name)
 
246
  self.training = False
247
 
248
  torch.cuda.empty_cache()