Skip to content

unable to use it #1

@jjiikkkk

Description

@jjiikkkk

/usr/local/lib/python3.10/dist-packages/accelerate/utils/modeling.py:1674: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
return torch.load(checkpoint_file, map_location=torch.device("cpu"))
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/content/OminiControl/src/gradio/gradio_app.py", line 112, in
init_pipeline()
File "/content/OminiControl/src/gradio/gradio_app.py", line 22, in init_pipeline
transformer_model = FluxTransformer2DModel.from_pretrained(
File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_utils.py", line 975, in from_pretrained
raise e
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_utils.py", line 932, in from_pretrained
accelerate.load_checkpoint_and_dispatch(
File "/usr/local/lib/python3.10/dist-packages/accelerate/big_modeling.py", line 615, in load_checkpoint_and_dispatch
load_checkpoint_in_model(
File "/usr/local/lib/python3.10/dist-packages/accelerate/utils/modeling.py", line 1882, in load_checkpoint_in_model
loaded_checkpoint = load_state_dict(checkpoint_file, device_map=device_map)
File "/usr/local/lib/python3.10/dist-packages/accelerate/utils/modeling.py", line 1674, in load_state_dict
return torch.load(checkpoint_file, map_location=torch.device("cpu"))
File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 1360, in load
return _load(
File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 1848, in _load
result = unpickler.load()
File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 1837, in find_class
return super().find_class(mod_name, name)
AttributeError: Can't get attribute 'PlainAQTLayout' on <module 'torchao.dtypes.affine_quantized_tensor' from '/usr/local/lib/python3.10/dist-packages/torchao/dtypes/affine_quantized_tensor.py'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions