"docs/source/converting_tensorflow_models.rst" did not exist on "e75c3f70aa5122dbdd06cc693a58df837e422721"
Commit 103c487a authored by comfyanonymous's avatar comfyanonymous
Browse files

Cleanup.

parent ae948b42
...@@ -16,11 +16,14 @@ if model_management.xformers_enabled(): ...@@ -16,11 +16,14 @@ if model_management.xformers_enabled():
import xformers import xformers
import xformers.ops import xformers.ops
from comfy.cli_args import args
# CrossAttn precision handling # CrossAttn precision handling
import os if args.dont_upcast_attention:
_ATTN_PRECISION = os.environ.get("ATTN_PRECISION", "fp32") print("disabling upcasting of attention")
_ATTN_PRECISION = "fp16"
else:
_ATTN_PRECISION = "fp32"
from comfy.cli_args import args
def exists(val): def exists(val):
return val is not None return val is not None
......
...@@ -14,10 +14,6 @@ if os.name == "nt": ...@@ -14,10 +14,6 @@ if os.name == "nt":
logging.getLogger("xformers").addFilter(lambda record: 'A matching Triton is not available' not in record.getMessage()) logging.getLogger("xformers").addFilter(lambda record: 'A matching Triton is not available' not in record.getMessage())
if __name__ == "__main__": if __name__ == "__main__":
if args.dont_upcast_attention:
print("disabling upcasting of attention")
os.environ['ATTN_PRECISION'] = "fp16"
if args.cuda_device is not None: if args.cuda_device is not None:
os.environ['CUDA_VISIBLE_DEVICES'] = str(args.cuda_device) os.environ['CUDA_VISIBLE_DEVICES'] = str(args.cuda_device)
print("Set cuda device to:", args.cuda_device) print("Set cuda device to:", args.cuda_device)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment