niulx commited on
Commit
3d07505
1 Parent(s): 53382e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -220,10 +220,10 @@ with gr.Blocks() as demo:
220
  num_tokens = gr.Number(value="5", label="num tokens to represent each object", interactive= True)
221
  num_tokens_global = num_tokens
222
  embedding_learning_rate = gr.Textbox(value="0.00025", label="Embedding optimization: Learning rate", interactive= True )
223
- max_emb_train_steps = gr.Number(value="6", maximum="100", label="embedding optimization: Training steps", interactive= True )
224
 
225
  diffusion_model_learning_rate = gr.Textbox(value="0.0002", label="UNet Optimization: Learning rate", interactive= True )
226
- max_diffusion_train_steps = gr.Number(value="28", maximum="200", label="UNet Optimization: Learning rate: Training steps", interactive= True )
227
 
228
  train_batch_size = gr.Number(value="20", label="Batch size", interactive= True )
229
  gradient_accumulation_steps=gr.Number(value="2", label="Gradient accumulation", interactive= True )
@@ -249,9 +249,9 @@ with gr.Blocks() as demo:
249
  image_gt=np.array(image),
250
  num_tokens=int(num_tokens),
251
  embedding_learning_rate = float(embedding_learning_rate),
252
- max_emb_train_steps = int(max_emb_train_steps),
253
  diffusion_model_learning_rate= float(diffusion_model_learning_rate),
254
- max_diffusion_train_steps = int(max_diffusion_train_steps),
255
  train_batch_size=int(train_batch_size),
256
  gradient_accumulation_steps=int(gradient_accumulation_steps)
257
  )
 
220
  num_tokens = gr.Number(value="5", label="num tokens to represent each object", interactive= True)
221
  num_tokens_global = num_tokens
222
  embedding_learning_rate = gr.Textbox(value="0.00025", label="Embedding optimization: Learning rate", interactive= True )
223
+ max_emb_train_steps = gr.Number(value="6", label="embedding optimization: Training steps", interactive= True )
224
 
225
  diffusion_model_learning_rate = gr.Textbox(value="0.0002", label="UNet Optimization: Learning rate", interactive= True )
226
+ max_diffusion_train_steps = gr.Number(value="28", label="UNet Optimization: Learning rate: Training steps", interactive= True )
227
 
228
  train_batch_size = gr.Number(value="20", label="Batch size", interactive= True )
229
  gradient_accumulation_steps=gr.Number(value="2", label="Gradient accumulation", interactive= True )
 
249
  image_gt=np.array(image),
250
  num_tokens=int(num_tokens),
251
  embedding_learning_rate = float(embedding_learning_rate),
252
+ max_emb_train_steps = min(int(max_emb_train_steps),50),
253
  diffusion_model_learning_rate= float(diffusion_model_learning_rate),
254
+ max_diffusion_train_steps = min(int(max_diffusion_train_steps),100),
255
  train_batch_size=int(train_batch_size),
256
  gradient_accumulation_steps=int(gradient_accumulation_steps)
257
  )