Skip to content

disabling fp8 compute launch argument #7562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions comfy/cli_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ class LatentPreviewMethod(enum.Enum):

parser.add_argument("--default-hashing-function", type=str, choices=['md5', 'sha1', 'sha256', 'sha512'], default='sha256', help="Allows you to choose the hash function to use for duplicate filename / contents comparison. Default is sha256.")

parser.add_argument("--disable-fp8-compute", action="store_true", help="Prevent ComfyUI from activating fp8 compute in Nvidia cards that support it. Can prevent some issues with some models not suitable for fp8 compute.")
parser.add_argument("--disable-smart-memory", action="store_true", help="Force ComfyUI to agressively offload to regular ram instead of keeping models in vram when it can.")
parser.add_argument("--deterministic", action="store_true", help="Make pytorch use slower deterministic algorithms when it can. Note that this might not make images deterministic in all cases.")

Expand Down
2 changes: 2 additions & 0 deletions comfy/model_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,8 @@ def should_use_bf16(device=None, model_params=0, prioritize_performance=True, ma
def supports_fp8_compute(device=None):
if not is_nvidia():
return False
if args.disable_fp8_compute:
return False

props = torch.cuda.get_device_properties(device)
if props.major >= 9:
Expand Down