RohitGandikota commited on
Commit
bc347f5
β€’
1 Parent(s): 67acccc

enabling training for xattn

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -184,10 +184,11 @@ class Demo:
184
  choices=choices,
185
  value='xattn',
186
  label='Train Method',
187
- info='Method of training. If xattn - loras will be on cross attns only. noxattn - all layers except cross attn (official implementation). full - all layers'
 
188
  )
189
  self.iterations_input = gr.Number(
190
- value=1000,
191
  precision=0,
192
  label="Iterations",
193
  info='iterations used to train - maximum of 1000'
@@ -262,7 +263,7 @@ class Demo:
262
  torch.cuda.empty_cache()
263
  model_map['Custom Slider'] = f'models/{save_name}'
264
 
265
- return [gr.update(interactive=True, value='Train'), gr.update(value='Done Training! \n Try your custom slider in the "Test" tab'), save_path, gr.Dropdown.update(choices=list(model_map.keys()), value='Custom Slider')]
266
 
267
 
268
  def inference(self, prompt, seed, start_noise, scale, model_name, pbar = gr.Progress(track_tqdm=True)):
 
184
  choices=choices,
185
  value='xattn',
186
  label='Train Method',
187
+ info='Method of training. If xattn - loras will be on cross attns only. noxattn - all layers except cross attn (official implementation). full - all layers',
188
+ interactive=True
189
  )
190
  self.iterations_input = gr.Number(
191
+ value=500,
192
  precision=0,
193
  label="Iterations",
194
  info='iterations used to train - maximum of 1000'
 
263
  torch.cuda.empty_cache()
264
  model_map['Custom Slider'] = f'models/{save_name}'
265
 
266
+ return [gr.update(interactive=True, value='Train'), gr.update(value='Done Training! \n Try your custom slider in the "Test" tab'), f'models/{save_name}', gr.Dropdown.update(choices=list(model_map.keys()), value='Custom Slider')]
267
 
268
 
269
  def inference(self, prompt, seed, start_noise, scale, model_name, pbar = gr.Progress(track_tqdm=True)):