-
Notifications
You must be signed in to change notification settings - Fork 21
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
Extremely slow generation #55
Comments
Can I take a look at your workflow? |
@jcatsuki I'm not sure if you are still interested in this. But ELLA is indeed utilizing CPU instead of GPU when encoding text unless one of this condition applies:
An alternative that works for me but require a little bit of hacky code editing is to edit the this is from roughly line 118, remove the class T5TextEmbedder:
def __init__(self, pretrained_path="google/flan-t5-xl", max_length=None, dtype=None, legacy=True):
- self.load_device = model_management.text_encoder_device()
+ self.load_device = model_management.get_torch_device() and on roughly line 312: class ELLA:
def __init__(self, path: str, **kwargs) -> None:
- self.load_device = model_management.text_encoder_device()
+ self.load_device = model_management.get_torch_device() This might not be the most elegant solution but it sure does works well for me, reducing down the encoding time from 6 minutes down to just a couple of seconds. IMO, there should be an option in ELLA node to either use GPU when available, seperate from ComfyUI's decision, and force GPU or CPU. I will make a pull-request if I make the change. |
Hi, my gpu is gtx 1660 (6 gb) and while using ella my speed drop from 1.5it/s to 5s/it, seems like cuda cores are almost not being used and my CPU does most of the calculations instead
The text was updated successfully, but these errors were encountered: