remove fixed float16 COLAB_FREE env var
add ACE_PIPELINE_DTYPE env var dtype config set colab notebook to float16
This commit is contained in:
@@ -129,8 +129,8 @@ class ACEStepPipeline:
|
|||||||
self.dtype = torch.float16
|
self.dtype = torch.float16
|
||||||
if device.type == "mps":
|
if device.type == "mps":
|
||||||
self.dtype = torch.float32
|
self.dtype = torch.float32
|
||||||
if 'COLAB_FREE' in os.environ and len(os.environ['COLAB_FREE']):
|
if 'ACE_PIPELINE_DTYPE' in os.environ and len(os.environ['ACE_PIPELINE_DTYPE']):
|
||||||
self.dtype = torch.float16
|
self.dtype = getattr(torch, os.environ['ACE_PIPELINE_DTYPE'])
|
||||||
self.device = device
|
self.device = device
|
||||||
self.loaded = False
|
self.loaded = False
|
||||||
self.torch_compile = torch_compile
|
self.torch_compile = torch_compile
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
"#!pip uninstall ace-step -y\n",
|
"#!pip uninstall ace-step -y\n",
|
||||||
"!pip install --upgrade git+https://github.com/craftmine1000/ACE-Step-Colab-Opt.git\n",
|
"!pip install --upgrade git+https://github.com/craftmine1000/ACE-Step-Colab-Opt.git\n",
|
||||||
"import os\n",
|
"import os\n",
|
||||||
"os.environ['COLAB_FREE'] = 'TRUE'"
|
"os.environ['ACE_PIPELINE_DTYPE'] = 'float16'"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user