mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-01-18 14:40:53 +01:00
Clear the torch cache between sequential image generations
This commit is contained in:
parent
3b8369a679
commit
1ec9f708e5
|
|
@ -848,6 +848,9 @@ def generate(state, save_images=True):
|
|||
if shared.stop_everything:
|
||||
break
|
||||
|
||||
if batch_idx > 0:
|
||||
clear_torch_cache()
|
||||
|
||||
generator.manual_seed(int(seed + batch_idx))
|
||||
|
||||
# Generate prompt variation if enabled
|
||||
|
|
|
|||
Loading…
Reference in a new issue