-
Notifications
You must be signed in to change notification settings - Fork 85
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
Cannot run sdxl sample code with deepcache, PyTorch should be >= 1.12 #977
Comments
@ccssu looks like a problem with mock |
hello, Thank you for your feedback @XuekuanWang The onediff nearest ci test script is pass, using the diffusers==0.19.3 , You can also try using it |
Describe the bug
A clear and concise description of what the bug is.
I cannot run example code of SDXL with deepcache.
The error report is "
obj_entity = self._get_module(name)
File "/mnt/wangxuekuan/onediff/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 167, in _get_module
raise RuntimeError(
RuntimeError: Failed to import onediffx.deep_cache because of the following error (look up to see its traceback):
PyTorch should be >= 1.12"
However, my pytorch is 2.3.0. And I try to print the version of Pytorch, and get log
"You are using torch==0.9.1.dev20240624+cu122, but torch>=1.10.0 is required to use BridgeTowerModel. Please upgrade torch."
I find the version of 0.9.1.dev20240624+cu122 is oneflow not torch.
Your environment
A100, ubuntu 20.04
OneDiff git commit id
master branch code
onediff 1.2.0.dev1
onediffx 1.2.0.dev1
oneflow 0.9.1.dev20240624+cu122
OneFlow version info
Run
python -m oneflow --doctor
and paste it here.version: 0.9.1.dev20240624+cu122
git_commit: ec7b682
cmake_build_type: Release
rdma: True
mlir: True
enterprise: False
How To Reproduce
Steps to reproduce the behavior(code or script):
The complete error message
The sample code "
import torch
from onediffx import compile_pipe
from onediffx.deep_cache import StableDiffusionXLPipeline
pipe = StableDiffusionXLPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0",
torch_dtype=torch.float16,
variant="fp16",
use_safetensors=True
)
pipe.to("cuda")
pipe = compile_pipe(pipe)
prompt = "A photo of a cat. Focus light and create sharp, defined edges."
Warmup
for i in range(1):
deepcache_output = pipe(
prompt,
cache_interval=3, cache_layer_id=0, cache_block_id=0,
output_type='pil'
).images[0]
deepcache_output = pipe(
prompt,
cache_interval=3, cache_layer_id=0, cache_block_id=0,
output_type='pil'
).images[0]
"
The text was updated successfully, but these errors were encountered: