Clear the torch cache before generating

This commit is contained in:
oobabooga 2025-12-02 06:41:08 -08:00
parent f4b27a39af
commit e7a15a0361

View file

@ -667,6 +667,10 @@ def generate(state):
"""
import torch
from modules.torch_utils import clear_torch_cache
clear_torch_cache()
try:
model_name = state['image_model_menu']