You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(habitat) /home/zhangyiqing/IROS2025/habitat-lab $ /home/zhangyiqing/miniconda3/envs/habitat/bin/python /home/zhangyiqing/IROS2025/habitat-lab/dirtyHand/PPO_topdownmap.py
Traceback (most recent call last):
File "/home/zhangyiqing/IROS2025/habitat-lab/dirtyHand/PPO_topdownmap.py", line 7, in
ddpm = DDPMPipeline.from_pretrained("google/ddpm-cat-256", use_safetensors=True).to("cuda")
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/diffusers/pipelines/pipeline_utils.py", line 725, in from_pretrained
cached_folder = cls.download(
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/diffusers/pipelines/pipeline_utils.py", line 1390, in download
ignore_patterns = _get_ignore_patterns(
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/diffusers/pipelines/pipeline_loading_utils.py", line 906, in _get_ignore_patterns
raise EnvironmentError(
OSError: Could not find the necessary safetensors weights in {'diffusion_pytorch_model.safetensors', 'diffusion_pytorch_model.bin'} (variant=None)
Change "use_safetensors" to None to download the model:
Loading pipeline components...: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 30.22it/s]
Traceback (most recent call last):
File "/home/zhangyiqing/IROS2025/habitat-lab/dirtyHand/PPO_topdownmap.py", line 7, in
ddpm = DDPMPipeline.from_pretrained("google/ddpm-cat-256", use_safetensors=None).to("cuda")
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/diffusers/pipelines/pipeline_utils.py", line 948, in from_pretrained
model = pipeline_class(**init_kwargs)
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/diffusers/pipelines/ddpm/pipeline_ddpm.py", line 43, in init
self.register_modules(unet=unet, scheduler=scheduler)
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/diffusers/pipelines/pipeline_utils.py", line 165, in register_modules
library, class_name = _fetch_class_library_tuple(module)
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/diffusers/pipelines/pipeline_loading_utils.py", line 734, in _fetch_class_library_tuple
not_compiled_module = _unwrap_model(module)
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/diffusers/pipelines/pipeline_loading_utils.py", line 234, in _unwrap_model
if is_compiled_module(model):
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/diffusers/utils/torch_utils.py", line 88, in is_compiled_module
if is_torch_version("<", "2.0.0") or not hasattr(torch, "_dynamo"):
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/torch/init.py", line 2214, in getattr
return importlib.import_module(f".{name}", name)
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/torch/_dynamo/init.py", line 2, in
from . import convert_frame, eval_frame, resume_execution
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/torch/_dynamo/convert_frame.py", line 48, in
from . import config, exc, trace_rules
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/torch/_dynamo/trace_rules.py", line 52, in
from .variables import (
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/torch/_dynamo/variables/init.py", line 38, in
from .higher_order_ops import (
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/torch/_dynamo/variables/higher_order_ops.py", line 14, in
import torch.onnx.operators
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/torch/onnx/init.py", line 49, in
from ._internal.exporter import ( # usort:skip. needs to be last to avoid circular import
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/torch/onnx/_internal/exporter/init.py", line 13, in
from ._analysis import analyze
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/torch/onnx/_internal/exporter/_analysis.py", line 14, in
import torch._export.serde.schema
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/torch/_export/init.py", line 33, in
from torch._export.non_strict_utils import make_constraints
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/torch/_export/non_strict_utils.py", line 16, in
from torch._dynamo.variables.builder import TrackedFake
File "/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/torch/_dynamo/variables/builder.py", line 73, in
from ..trace_rules import (
ImportError: cannot import name 'is_callable_allowed' from partially initialized module 'torch._dynamo.trace_rules' (most likely due to a circular import) (/home/zhangyiqing/miniconda3/envs/habitat/lib/python3.9/site-packages/torch/_dynamo/trace_rules.py)
Reproduction
from diffusers import DDPMPipeline
import matplotlib.pyplot as plt
from huggingface_hub.hf_api import HfFolder;
HfFolder.save_token("token")
Describe the bug
When I try to run:
from diffusers import DDPMPipeline ddpm = DDPMPipeline.from_pretrained("google/ddpm-cat-256", use_safetensors=True).to("cuda") image = ddpm(num_inference_steps=25).images[0] image
Change "use_safetensors" to None to download the model:
Reproduction
from diffusers import DDPMPipeline
import matplotlib.pyplot as plt
from huggingface_hub.hf_api import HfFolder;
HfFolder.save_token("token")
ddpm = DDPMPipeline.from_pretrained("google/ddpm-cat-256", use_safetensors=True).to("cuda")
image = ddpm(num_inference_steps=25).images[0]
plt.imshow(image)
Logs
No response
System Info
Copy-and-paste the text below in your GitHub issue and FILL OUT the two last points.
Who can help?
No response
The text was updated successfully, but these errors were encountered: