Fabrice-TIERCELIN commited on
Commit
6cb9b0f
·
verified ·
1 Parent(s): cb9e8b9

Move call

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -130,8 +130,6 @@ def worker(input_image, prompt, n_prompt, seed, total_second_length, latent_wind
130
  fake_diffusers_current_device(text_encoder, gpu) # since we only encode one text - that is one model move and one encode, offload is same time consumption since it is also one load and one encode.
131
  load_model_as_complete(text_encoder_2, target_device=gpu)
132
 
133
- [llama_vec, clip_l_pooler, llama_vec_n, clip_l_pooler_n, llama_attention_mask, llama_attention_mask_n] = encode_prompt(prompt, n_prompt)
134
-
135
  # Processing input image
136
 
137
  stream.output_queue.push(('progress', (None, '', make_progress_bar_html(0, 'Image processing ...'))))
@@ -187,6 +185,8 @@ def worker(input_image, prompt, n_prompt, seed, total_second_length, latent_wind
187
 
188
  print(f'section_index = {section_index}, total_latent_sections = {total_latent_sections}')
189
 
 
 
190
  if not high_vram:
191
  unload_complete_models()
192
  move_model_to_device_with_memory_preservation(transformer, target_device=gpu, preserved_memory_gb=gpu_memory_preservation)
 
130
  fake_diffusers_current_device(text_encoder, gpu) # since we only encode one text - that is one model move and one encode, offload is same time consumption since it is also one load and one encode.
131
  load_model_as_complete(text_encoder_2, target_device=gpu)
132
 
 
 
133
  # Processing input image
134
 
135
  stream.output_queue.push(('progress', (None, '', make_progress_bar_html(0, 'Image processing ...'))))
 
185
 
186
  print(f'section_index = {section_index}, total_latent_sections = {total_latent_sections}')
187
 
188
+ [llama_vec, clip_l_pooler, llama_vec_n, clip_l_pooler_n, llama_attention_mask, llama_attention_mask_n] = encode_prompt(prompt, n_prompt)
189
+
190
  if not high_vram:
191
  unload_complete_models()
192
  move_model_to_device_with_memory_preservation(transformer, target_device=gpu, preserved_memory_gb=gpu_memory_preservation)