mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix hires fix
This commit is contained in:
@ -23,7 +23,7 @@ class Txt2Img2Img(Generator):
|
|||||||
Return value depends on the seed at the time you call it
|
Return value depends on the seed at the time you call it
|
||||||
kwargs are 'width' and 'height'
|
kwargs are 'width' and 'height'
|
||||||
"""
|
"""
|
||||||
uc, c, extra_conditioing_info = conditioning
|
uc, c, extra_conditioning_info = conditioning
|
||||||
|
|
||||||
@torch.no_grad()
|
@torch.no_grad()
|
||||||
def make_image(x_T):
|
def make_image(x_T):
|
||||||
@ -96,7 +96,8 @@ class Txt2Img2Img(Generator):
|
|||||||
img_callback = step_callback,
|
img_callback = step_callback,
|
||||||
unconditional_guidance_scale=cfg_scale,
|
unconditional_guidance_scale=cfg_scale,
|
||||||
unconditional_conditioning=uc,
|
unconditional_conditioning=uc,
|
||||||
extra_conditioning_info = extra_conditioning_info
|
# cross-attention control is disabled during upscale
|
||||||
|
#extra_conditioning_info = None
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.free_gpu_mem:
|
if self.free_gpu_mem:
|
||||||
|
@ -86,7 +86,7 @@ class InvokeAIDiffuserComponent:
|
|||||||
cross_attention_control_types_to_do = CrossAttentionControl.get_active_cross_attention_control_types_for_step(self.cross_attention_control_context, percent_through)
|
cross_attention_control_types_to_do = CrossAttentionControl.get_active_cross_attention_control_types_for_step(self.cross_attention_control_context, percent_through)
|
||||||
|
|
||||||
if len(cross_attention_control_types_to_do)==0:
|
if len(cross_attention_control_types_to_do)==0:
|
||||||
print('pct', percent_through, ': not doing cross attention control')
|
print('not doing cross attention control')
|
||||||
# faster batched path
|
# faster batched path
|
||||||
x_twice = torch.cat([x]*2)
|
x_twice = torch.cat([x]*2)
|
||||||
sigma_twice = torch.cat([sigma]*2)
|
sigma_twice = torch.cat([sigma]*2)
|
||||||
|
Reference in New Issue
Block a user