Skip to content
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

Can't set attribute "device" #56

Open
atxoxx opened this issue Aug 7, 2024 · 15 comments
Open

Can't set attribute "device" #56

atxoxx opened this issue Aug 7, 2024 · 15 comments

Comments

@atxoxx
Copy link

atxoxx commented Aug 7, 2024

Hello since today I have this error :

Traceback (most recent call last):
File "E:\IA\Stability matrix\Data\Packages\Comfy\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "E:\IA\Stability matrix\Data\Packages\Comfy\execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "E:\IA\Stability matrix\Data\Packages\Comfy\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "E:\IA\Stability matrix\Data\Packages\Comfy\custom_nodes\ComfyUI-ELLA\ella.py", line 281, in encode
cond = text_encoder_model(text, max_length=None)
File "E:\IA\Stability matrix\Data\Packages\Comfy\custom_nodes\ComfyUI-ELLA\model.py", line 136, in call
self.load_model()
File "E:\IA\Stability matrix\Data\Packages\Comfy\custom_nodes\ComfyUI-ELLA\model.py", line 132, in load_model
model_management.load_model_gpu(self.patcher)
File "E:\IA\Stability matrix\Data\Packages\Comfy\comfy\model_management.py", line 474, in load_model_gpu
return load_models_gpu([model])
File "E:\IA\Stability matrix\Data\Packages\Comfy\comfy\model_management.py", line 468, in load_models_gpu
cur_loaded_model = loaded_model.model_load(lowvram_model_memory, force_patch_weights=force_patch_weights)
File "E:\IA\Stability matrix\Data\Packages\Comfy\comfy\model_management.py", line 296, in model_load
self.model.unpatch_model(self.model.offload_device)
File "E:\IA\Stability matrix\Data\Packages\Comfy\comfy\model_patcher.py", line 556, in unpatch_model
self.model.device = device_to
File "E:\IA\Stability matrix\Data\Packages\Comfy\venv\lib\site-packages\torch\nn\modules\module.py", line 1754, in setattr
super().setattr(name, value)
AttributeError: can't set attribute 'device'

Any idea what's happening ?

@ka1tte
Copy link

ka1tte commented Aug 7, 2024

@atxoxx Have you fixed it?

@atxoxx
Copy link
Author

atxoxx commented Aug 7, 2024

@atxoxx Have you fixed it?

no...
seems like it is caused by comfyui change

here is fix by animate diff evolved dev : Kosinkadink/ComfyUI-AnimateDiff-Evolved@c1c3bbc
Gonna take a look on ELLA see if I can do something

Edit : this is the comfyui commit that cause the issue : comfyanonymous/ComfyUI@b334605

@ka1tte
Copy link

ka1tte commented Aug 7, 2024

Yes, I have temporarily rolled back to de17a9755ecb8419cb167fe8504791df5b07246f

@GammaSix
Copy link

GammaSix commented Aug 8, 2024

I am getting this error as well. Currently trying to figure out how to roll back ComfyUI within Stability Matrix

@DaveScream
Copy link

property 'device' of 'T5EncoderModel' object has no setter

!!! Exception during processing!!! property 'device' of 'T5EncoderModel' object has no setter
Traceback (most recent call last):
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 294, in model_load
self.real_model = self.model.patch_model(device_to=patch_model_to, patch_weights=load_weights)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_patcher.py", line 306, in patch_model
self.model.device = device_to
^^^^^^^^^^^^^^^^^
File "D:\SD\venv3.11\Lib\site-packages\torch\nn\modules\module.py", line 1768, in setattr
super().setattr(name, value)
AttributeError: property 'device' of 'T5EncoderModel' object has no setter

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-ELLA\ella.py", line 281, in encode
cond = text_encoder_model(text, max_length=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-ELLA\model.py", line 136, in call
self.load_model()
File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-ELLA\model.py", line 132, in load_model
model_management.load_model_gpu(self.patcher)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 474, in load_model_gpu
return load_models_gpu([model])
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 468, in load_models_gpu
cur_loaded_model = loaded_model.model_load(lowvram_model_memory, force_patch_weights=force_patch_weights)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 296, in model_load
self.model.unpatch_model(self.model.offload_device)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_patcher.py", line 556, in unpatch_model
self.model.device = device_to
^^^^^^^^^^^^^^^^^
File "D:\SD\venv3.11\Lib\site-packages\torch\nn\modules\module.py", line 1768, in setattr
super().setattr(name, value)
AttributeError: property 'device' of 'T5EncoderModel' object has no setter

@Skuuurt
Copy link

Skuuurt commented Aug 8, 2024

Any fix guys ? this broke my big ass workflow, it would be a shame to start all over again...

@Skuuurt
Copy link

Skuuurt commented Aug 8, 2024

I am getting this error as well. Currently trying to figure out how to roll back ComfyUI within Stability Matrix

If you figure out how to rollback within SM please do tell, I am on Stability Matrix too and I don't wanna break everything.

@GammaSix
Copy link

GammaSix commented Aug 8, 2024

@atxoxx Have you fixed it?

no... seems like it is caused by comfyui change

here is fix by animate diff evolved dev : Kosinkadink/ComfyUI-AnimateDiff-Evolved@c1c3bbc Gonna take a look on ELLA see if I can do something

Edit : this is the comfyui commit that cause the issue : comfyanonymous/ComfyUI@b334605

This is a really roundabout fix and I don't know if it's best practice, but I managed to get it working again by downloading the second most recent version for each file listed in that comfyui commit, and pasting them to replace the existing ones in the folder. They were model_base.py, model_management.py, model_patcher.py, and sd.py. Now I just... don't click the "Update" button in SM until this issue is marked as resolved, I guess. I'm still new at this.

@saphtea
Copy link

saphtea commented Aug 11, 2024

also running into this issue!

@LoathingScreen
Copy link

tried rolling back with no luck, ella workflows are broken

@atxoxx
Copy link
Author

atxoxx commented Aug 11, 2024

@atxoxx Have you fixed it?

no... seems like it is caused by comfyui change

here is fix by animate diff evolved dev : Kosinkadink/ComfyUI-AnimateDiff-Evolved@c1c3bbc Gonna take a look on ELLA see if I can do something

Edit : this is the comfyui commit that cause the issue : comfyanonymous/ComfyUI@b334605

tried rolling back with no luck, ella workflows are broken

you need to rollback comfy before this commit or change the files needed

@niko2020
Copy link

same isssue here, maybe this can be fixed in ComfyUI-ELLA?

@JettHu
Copy link
Collaborator

JettHu commented Aug 14, 2024

I'll try to fix this problem when I have time, in the next two days.

@JettHu
Copy link
Collaborator

JettHu commented Aug 16, 2024

I'll try to fix this problem when I have time, in the next two days.

fixed

@atxoxx
Copy link
Author

atxoxx commented Aug 16, 2024

I'll try to fix this problem when I have time, in the next two days.

fixed

thanks a lot !
you're a legend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants