mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
Fixed embiggening crash due to clear_cuda_cache not being passed on and bad cuda stats initialization. (#2756)
This commit is contained in:
@@ -126,7 +126,7 @@ class Generator:
|
||||
seed = self.new_seed()
|
||||
|
||||
# Free up memory from the last generation.
|
||||
clear_cuda_cache = kwargs['clear_cuda_cache'] or None
|
||||
clear_cuda_cache = kwargs['clear_cuda_cache'] if 'clear_cuda_cache' in kwargs else None
|
||||
if clear_cuda_cache is not None:
|
||||
clear_cuda_cache()
|
||||
|
||||
|
||||
@@ -346,6 +346,7 @@ class Embiggen(Generator):
|
||||
newinitimage = torch.from_numpy(newinitimage)
|
||||
newinitimage = 2.0 * newinitimage - 1.0
|
||||
newinitimage = newinitimage.to(self.model.device)
|
||||
clear_cuda_cache = kwargs['clear_cuda_cache'] if 'clear_cuda_cache' in kwargs else None
|
||||
|
||||
tile_results = gen_img2img.generate(
|
||||
prompt,
|
||||
@@ -363,6 +364,7 @@ class Embiggen(Generator):
|
||||
init_image = newinitimage, # notice that init_image is different from init_img
|
||||
mask_image = None,
|
||||
strength = strength,
|
||||
clear_cuda_cache = clear_cuda_cache
|
||||
)
|
||||
|
||||
emb_tile_store.append(tile_results[0][0])
|
||||
|
||||
Reference in New Issue
Block a user