Before loop
Browse files
app.py
CHANGED
|
@@ -190,6 +190,9 @@ def worker(input_image, prompt, n_prompt, seed, total_second_length, latent_wind
|
|
| 190 |
history_latents = torch.cat([history_latents, start_latent.to(history_latents)], dim=2)
|
| 191 |
total_generated_latent_frames = 1
|
| 192 |
|
|
|
|
|
|
|
|
|
|
| 193 |
for section_index in range(total_latent_sections):
|
| 194 |
if stream.input_queue.top() == 'end':
|
| 195 |
stream.output_queue.push(('end', None))
|
|
@@ -197,9 +200,6 @@ def worker(input_image, prompt, n_prompt, seed, total_second_length, latent_wind
|
|
| 197 |
|
| 198 |
print(f'section_index = {section_index}, total_latent_sections = {total_latent_sections}')
|
| 199 |
|
| 200 |
-
if len(prompt_parameters) > 1:
|
| 201 |
-
[llama_vec, clip_l_pooler, llama_vec_n, clip_l_pooler_n, llama_attention_mask, llama_attention_mask_n] = prompt_parameters.pop(0)
|
| 202 |
-
|
| 203 |
if not high_vram:
|
| 204 |
unload_complete_models()
|
| 205 |
move_model_to_device_with_memory_preservation(transformer, target_device=gpu, preserved_memory_gb=gpu_memory_preservation)
|
|
|
|
| 190 |
history_latents = torch.cat([history_latents, start_latent.to(history_latents)], dim=2)
|
| 191 |
total_generated_latent_frames = 1
|
| 192 |
|
| 193 |
+
if len(prompt_parameters) > 1:
|
| 194 |
+
[llama_vec, clip_l_pooler, llama_vec_n, clip_l_pooler_n, llama_attention_mask, llama_attention_mask_n] = prompt_parameters.pop(0)
|
| 195 |
+
|
| 196 |
for section_index in range(total_latent_sections):
|
| 197 |
if stream.input_queue.top() == 'end':
|
| 198 |
stream.output_queue.push(('end', None))
|
|
|
|
| 200 |
|
| 201 |
print(f'section_index = {section_index}, total_latent_sections = {total_latent_sections}')
|
| 202 |
|
|
|
|
|
|
|
|
|
|
| 203 |
if not high_vram:
|
| 204 |
unload_complete_models()
|
| 205 |
move_model_to_device_with_memory_preservation(transformer, target_device=gpu, preserved_memory_gb=gpu_memory_preservation)
|