mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-24 09:22:32 +08:00
better AMD CDNA4 and RDNA4 support
This commit is contained in:
parent
1de83f91c3
commit
693ce0a1b2
@ -1446,7 +1446,7 @@ def pytorch_attention_enabled():
|
|||||||
return ENABLE_PYTORCH_ATTENTION
|
return ENABLE_PYTORCH_ATTENTION
|
||||||
|
|
||||||
def pytorch_attention_enabled_vae():
|
def pytorch_attention_enabled_vae():
|
||||||
if is_amd():
|
if is_amd() and not SUPPORT_FP8_OPS: # exclude RDNA4 (gfx1200, gfx1201) and CDNA4 (gfx950) that support fp8
|
||||||
return False # enabling pytorch attention on AMD currently causes crash when doing high res
|
return False # enabling pytorch attention on AMD currently causes crash when doing high res
|
||||||
return pytorch_attention_enabled()
|
return pytorch_attention_enabled()
|
||||||
|
|
||||||
|
|||||||
@ -440,7 +440,7 @@ class VAE:
|
|||||||
if 'decoder.up_blocks.0.resnets.0.norm1.weight' in sd.keys(): #diffusers format
|
if 'decoder.up_blocks.0.resnets.0.norm1.weight' in sd.keys(): #diffusers format
|
||||||
sd = diffusers_convert.convert_vae_state_dict(sd)
|
sd = diffusers_convert.convert_vae_state_dict(sd)
|
||||||
|
|
||||||
if model_management.is_amd():
|
if model_management.is_amd() and not model_management.SUPPORT_FP8_OPS: # exclude RDNA4 (gfx1200, gfx1201) and CDNA4 (gfx950) that support fp8
|
||||||
VAE_KL_MEM_RATIO = 2.73
|
VAE_KL_MEM_RATIO = 2.73
|
||||||
else:
|
else:
|
||||||
VAE_KL_MEM_RATIO = 1.0
|
VAE_KL_MEM_RATIO = 1.0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user