forked from extern/easydiffusion
Proactively delete the partial samples from the callbacks
This commit is contained in:
parent
3e7f14af2c
commit
51443741b8
@ -72,9 +72,10 @@ def generate_images_internal(req: GenerateImageRequest, task_data: TaskData, dat
|
||||
user_stopped = True
|
||||
if context.partial_x_samples is not None:
|
||||
images = latent_samples_to_images(context, context.partial_x_samples)
|
||||
context.partial_x_samples = None
|
||||
finally:
|
||||
gc(context)
|
||||
if hasattr(context, 'partial_x_samples') and context.partial_x_samples is not None:
|
||||
del context.partial_x_samples
|
||||
context.partial_x_samples = None
|
||||
|
||||
return images, user_stopped
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user