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

Fix Check Failed Error #585

Merged
merged 8 commits into from
Jan 30, 2024
Merged

Conversation

ccssu
Copy link
Contributor

@ccssu ccssu commented Jan 30, 2024

修改 因为模型输入参数数量改变的 check failed 行为,目前 发现模型输入参数数量改变,让其重新加载图文件。
image

@ccssu ccssu requested a review from strint January 30, 2024 01:54
if count != input_count:
logger.warning(
f"{type(cls._deployable_module_model.oneflow_module)} input count changed, will reload graph. "
f"When setting the strength parameter in the 'Apply ControlNet' node, please exercise caution. "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个说明不太通用。可以当前使用输入的 tensor 的个数是否变化来判断是否要重新编译一个图,当前出现了变化,所以会新编译一个图。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修改为 f"Module {type(self._deployable_module_model.oneflow_module)} input tensor count changed from {count} to {input_count}, will compile again."

self._deployable_module_dpl_graph = None
self._load_graph_first_run = True

self._deployable_module_input_count = input_count
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

只有 count != input_count 才更新 _deployable_module_input_count ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改为 只有 count != input_count 才更新 _deployable_module_input_count

@ccssu ccssu merged commit db3b18e into main Jan 30, 2024
5 checks passed
@ccssu ccssu deleted the fix_check_model_input_count_failed_error branch January 30, 2024 15:13
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

Successfully merging this pull request may close these issues.

2 participants