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

Is DeepCache by comfyui only supports sizes that are multiples of 32? #778

Closed
onefish51 opened this issue Apr 2, 2024 · 2 comments
Closed
Assignees
Labels
Request-bug Something isn't working Response-important Response-need_days This issue need some days to be solved sig-optimzation-alg
Milestone

Comments

@onefish51
Copy link

onefish51 commented Apr 2, 2024

Describe the bug

When I was testing the acceleration inference of DeepCache, I encountered an error when I modified the inference size to 720*960. However, when I modified the inference size to a multiple of 8, there was no error.

This situation is similar to what I previously mentioned #527 (comment) when testing the acceleration of diffusers.

Your environment

OS

Ubuntu 20.04.6 LTS

OneDiff git commit id

Building wheels for collected packages: onediff
  Building editable for onediff (pyproject.toml) ... done
  Created wheel for onediff: filename=onediff-0.13.0.dev1-0.editable-py3-none-any.whl size=5362 sha256=9e86fa1dc8cfefa40c1c163833bc6bf7e9c689012ae7b44dfab6e26ff4423d0f
  Stored in directory: /tmp/pip-ephem-wheel-cache-wqfwl901/wheels/b4/62/0d/0a502b53cf9cb2a2f46a88e2251c723c39df227d4f44413c4d
Successfully built onediff
Installing collected packages: onediff
  Attempting uninstall: onediff
    Found existing installation: onediff 0.13.0.dev1
    Uninstalling onediff-0.13.0.dev1:
      Successfully uninstalled onediff-0.13.0.dev1
Successfully installed onediff-0.13.0.dev1

OneFlow version info

libibverbs not available, ibv_fork_init skipped
Ignoring PCI device with non-16bit domain.
Pass --enable-32bits-pci-domain to configure to support such devices
(warning: it would break the library ABI, don't enable unless really needed).
path: ['/opt/conda/lib/python3.10/site-packages/oneflow']
version: 0.9.1.dev20240219+cu121
git_commit: 6621521
cmake_build_type: Release
rdma: True
mlir: True
enterprise: False

How To Reproduce

workflow_deepcache.json

The complete error message

Prompt executed in 1.54 seconds
got prompt
[ERROR](GRAPH:OneflowGraph_0:OneflowGraph) run got error: <class 'oneflow._oneflow_internal.exception.Exception'> Check failed: (45 == 46) 
  File "oneflow/core/job/job_interpreter.cpp", line 307, in InterpretJob
    RunNormalOp(launch_context, launch_op, inputs)
  File "oneflow/core/job/job_interpreter.cpp", line 219, in RunNormalOp
    it.Apply(*op, inputs, &outputs, OpExprInterpContext(empty_attr_map, JUST(launch_op.device)))
  File "oneflow/core/framework/op_interpreter/eager_local_op_interpreter.cpp", line 84, in NaiveInterpret
    [&]() -> Maybe<const LocalTensorInferResult> { LocalTensorMetaInferArgs ... mut_local_tensor_infer_cache()->GetOrInfer(infer_args)); }()
  File "oneflow/core/framework/op_interpreter/eager_local_op_interpreter.cpp", line 87, in operator()
    user_op_expr.mut_local_tensor_infer_cache()->GetOrInfer(infer_args)
  File "oneflow/core/framework/local_tensor_infer_cache.cpp", line 210, in GetOrInfer
    Infer(*user_op_expr, infer_args)
  File "oneflow/core/framework/local_tensor_infer_cache.cpp", line 178, in Infer
    user_op_expr.InferPhysicalTensorDesc( infer_args.attrs ... ) -> TensorMeta* { return &output_mut_metas.at(i); })
  File "oneflow/core/framework/op_expr.cpp", line 602, in InferPhysicalTensorDesc
    physical_tensor_desc_infer_fn_(&infer_ctx)
  File "oneflow/user/ops/concat_op.cpp", line 55, in InferLogicalTensorDesc
    CHECK_EQ_OR_RETURN(in_desc.shape().At(i), out_dim_vec.at(i))
Error Type: oneflow.ErrorProto.check_failed_error
Exception in __call__: e=Exception('Check failed: (45 == 46) \n  File "oneflow/core/job/job_interpreter.cpp", line 307, in InterpretJob\n    RunNormalOp(launch_context, launch_op, inputs)\n  File "oneflow/core/job/job_interpreter.cpp", line 219, in RunNormalOp\n    it.Apply(*op, inputs, &outputs, OpExprInterpContext(empty_attr_map, JUST(launch_op.device)))\n  File "oneflow/core/framework/op_interpreter/eager_local_op_interpreter.cpp", line 84, in NaiveInterpret\n    [&]() -> Maybe<const LocalTensorInferResult> { LocalTensorMetaInferArgs ... mut_local_tensor_infer_cache()->GetOrInfer(infer_args)); }()\n  File "oneflow/core/framework/op_interpreter/eager_local_op_interpreter.cpp", line 87, in operator()\n    user_op_expr.mut_local_tensor_infer_cache()->GetOrInfer(infer_args)\n  File "oneflow/core/framework/local_tensor_infer_cache.cpp", line 210, in GetOrInfer\n    Infer(*user_op_expr, infer_args)\n  File "oneflow/core/framework/local_tensor_infer_cache.cpp", line 178, in Infer\n    user_op_expr.InferPhysicalTensorDesc( infer_args.attrs ... ) -> TensorMeta* { return &output_mut_metas.at(i); })\n  File "oneflow/core/framework/op_expr.cpp", line 602, in InferPhysicalTensorDesc\n    physical_tensor_desc_infer_fn_(&infer_ctx)\n  File "oneflow/user/ops/concat_op.cpp", line 55, in InferLogicalTensorDesc\n    CHECK_EQ_OR_RETURN(in_desc.shape().At(i), out_dim_vec.at(i))\nError Type: oneflow.ErrorProto.check_failed_error')
Recompile oneflow module ...
Building a graph for <class 'register_comfy.deep_cache_unet.DeepCacheUNet'> ...
Prompt executed in 41.97 seconds
@strint strint added Request-bug Something isn't working Response-need_days This issue need some days to be solved Response-important labels Apr 3, 2024
@strint strint assigned lixiang007666 and clackhan and unassigned strint Apr 15, 2024
@strint strint added this to the v1.1 milestone Apr 15, 2024
@strint strint modified the milestones: v1.1, v1.2 Jun 9, 2024
@strint
Copy link
Collaborator

strint commented Jul 5, 2024

We have fixed this, please update and have a try.

@strint
Copy link
Collaborator

strint commented Jul 12, 2024

too old to follow, please feel free to reopen it.

@strint strint closed this as completed Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request-bug Something isn't working Response-important Response-need_days This issue need some days to be solved sig-optimzation-alg
Projects
None yet
Development

No branches or pull requests

4 participants