happyme531 / RK3588-stable-diffusion-GPU

MLC Stable Diffusion for RK3588's Mali GPU
https://mlc.ai/web-stable-diffusion
Apache License 2.0
35 stars 7 forks source link

转换模型时出错 #5

Open nongze opened 1 month ago

nongze commented 1 month ago
orangepi@orangepi5:~/RK3588-stable-diffusion-GPU$ python ./convert_model_from_pth_safetensors.py --checkpoint_path ./1.safetensors --dump_path ./1/ --from_safetensors --original_config_file ./v1-inference.yaml
The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling `transformers.utils.move_cache()`.
0it [00:00, ?it/s]
Traceback (most recent call last):
  File "/home/orangepi/.local/lib/python3.12/site-packages/urllib3/connection.py", line 196, in _new_conn
    sock = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/urllib3/util/connection.py", line 85, in create_connection
    raise err
  File "/home/orangepi/.local/lib/python3.12/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
TimeoutError: timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/orangepi/.local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 490, in _make_request
    raise new_e
  File "/home/orangepi/.local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 466, in _make_request
    self._validate_conn(conn)
  File "/home/orangepi/.local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1095, in _validate_conn
    conn.connect()
  File "/home/orangepi/.local/lib/python3.12/site-packages/urllib3/connection.py", line 615, in connect
    self.sock = sock = self._new_conn()
                       ^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/urllib3/connection.py", line 205, in _new_conn
    raise ConnectTimeoutError(
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0xffff555b37d0>, 'Connection to huggingface.co timed out. (connect timeout=10)')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/orangepi/.local/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 843, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/urllib3/util/retry.py", line 519, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /openai/clip-vit-large-patch14/resolve/main/config.json (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0xffff555b37d0>, 'Connection to huggingface.co timed out. (connect timeout=10)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/orangepi/.local/lib/python3.12/site-packages/huggingface_hub/file_download.py", line 1722, in _get_metadata_or_catch_error
    metadata = get_hf_file_metadata(url=url, proxies=proxies, timeout=etag_timeout, headers=headers)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/huggingface_hub/file_download.py", line 1645, in get_hf_file_metadata
    r = _request_wrapper(
        ^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/huggingface_hub/file_download.py", line 372, in _request_wrapper
    response = _request_wrapper(
               ^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/huggingface_hub/file_download.py", line 395, in _request_wrapper
    response = get_session().request(method=method, url=url, **params)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/huggingface_hub/utils/_http.py", line 66, in send
    return super().send(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/requests/adapters.py", line 688, in send
    raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /openai/clip-vit-large-patch14/resolve/main/config.json (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0xffff555b37d0>, 'Connection to huggingface.co timed out. (connect timeout=10)'))"), '(Request ID: 76ae4277-b601-46a9-ad19-1a0d2324b497)')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/orangepi/.local/lib/python3.12/site-packages/transformers/utils/hub.py", line 402, in cached_file
    resolved_file = hf_hub_download(
                    ^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/huggingface_hub/file_download.py", line 1221, in hf_hub_download
    return _hf_hub_download_to_cache_dir(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/huggingface_hub/file_download.py", line 1325, in _hf_hub_download_to_cache_dir
    _raise_on_head_call_error(head_call_error, force_download, local_files_only)
  File "/home/orangepi/.local/lib/python3.12/site-packages/huggingface_hub/file_download.py", line 1826, in _raise_on_head_call_error
    raise LocalEntryNotFoundError(
huggingface_hub.utils._errors.LocalEntryNotFoundError: An error happened while trying to locate the file on the Hub and we cannot find the requested files in the local cache. Please check your connection and try again or make sure your Internet connection is on.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/orangepi/.local/lib/python3.12/site-packages/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py", line 797, in convert_ldm_clip_checkpoint
    config = CLIPTextConfig.from_pretrained(config_name, local_files_only=local_files_only)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/transformers/models/clip/configuration_clip.py", line 137, in from_pretrained
    config_dict, kwargs = cls.get_config_dict(pretrained_model_name_or_path, **kwargs)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/transformers/configuration_utils.py", line 632, in get_config_dict
    config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/transformers/configuration_utils.py", line 689, in _get_config_dict
    resolved_config_file = cached_file(
                           ^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/transformers/utils/hub.py", line 445, in cached_file
    raise EnvironmentError(
OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like openai/clip-vit-large-patch14 is not the path to a directory containing a file named config.json.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/orangepi/RK3588-stable-diffusion-GPU/./convert_model_from_pth_safetensors.py", line 160, in <module>
    pipe = download_from_original_stable_diffusion_ckpt(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py", line 1674, in download_from_original_stable_diffusion_ckpt
    text_model = convert_ldm_clip_checkpoint(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orangepi/.local/lib/python3.12/site-packages/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py", line 799, in convert_ldm_clip_checkpoint
    raise ValueError(
ValueError: With local_files_only set to False, you must first locally save the configuration in the following path: 'openai/clip-vit-large-patch14'.
orangepi@orangepi5:~/RK3588-stable-diffusion-GPU$ ls
1.safetensors                          deploy.py            log_db_my_unet_softmax2  scripts   v1-inference.yaml
3rdparty                               LICENSE              log_db_my_vae            setup.py  web
build.py                               log_db               README.md                site      web_stable_diffusion
convert_model_from_pth_safetensors.py  log_db_my_clip_unet  requirements.txt         tests
orangepi@orangepi5:~/RK3588-stable-diffusion-GPU$
happyme531 commented 1 month ago

挂个代理

nongze commented 1 month ago

image 可还行,大概是没问题了

nongze commented 1 month ago
orangepi@orangepi5:~/RK3588-stable-diffusion-GPU$ python ./convert_model_from_pth_safetensors.py --checkpoint_path ./1.safetensors --dump_path ./1/ --from_safetensors --original_config_file ./v1-inference.yaml
tokenizer.json: 100%|██████████████████████████████████████████████████████████████| 2.22M/2.22M [00:01<00:00, 1.62MB/s]
config.json: 100%|█████████████████████████████████████████████████████████████████| 4.55k/4.55k [00:00<00:00, 21.5MB/s]
pytorch_model.bin: 100%|███████████████████████████████████████████████████████████| 1.22G/1.22G [03:24<00:00, 5.95MB/s]
preprocessor_config.json: 100%|████████████████████████████████████████████████████████| 342/342 [00:00<00:00, 1.53MB/s]
/home/orangepi/.local/lib/python3.12/site-packages/transformers/models/clip/feature_extraction_clip.py:28: FutureWarning: The class CLIPFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please use CLIPImageProcessor instead.

这样就行了嘛

nongze commented 1 month ago

请问python ./deploy.py --device-name opencl这个命令就能开启webui吗

nongze commented 1 month ago
(sd1) orangepi@orangepi5:~/RK3588-stable-diffusion-GPU$ python ./build.py
Automatically configuring target: opencl -keys=mali,opencl,gpu -device=mali -max_function_args=128 -max_num_threads=1024 -max_shared_memory_per_block=32768 -max_threads_per_block=1024 -texture_spatial_limit=16384 -thread_warp_size=16
Loading pipeline components...:   0%|                                                                                                                                 | 0/7 [00:00<?, ?it/s]An error occurred while trying to fetch ./1/vae: Error no file named diffusion_pytorch_model.safetensors found in directory ./1/vae.
Defaulting to unsafe serialization. Pass `allow_pickle=False` to raise an error instead.
Loading pipeline components...:  29%|██████████████████████████████████▌                                                                                      | 2/7 [00:01<00:03,  1.29it/s]An error occurred while trying to fetch ./1/unet: Error no file named diffusion_pytorch_model.safetensors found in directory ./1/unet.
Defaulting to unsafe serialization. Pass `allow_pickle=False` to raise an error instead.
Loading pipeline components...:  43%|███████████████████████████████████████████████████▊                                                                     | 3/7 [00:10<00:18,  4.59s/it]/home/orangepi/anaconda3/envs/sd1/lib/python3.10/site-packages/transformers/models/clip/feature_extraction_clip.py:28: FutureWarning: The class CLIPFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please use CLIPImageProcessor instead.
  warnings.warn(
Loading pipeline components...: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:11<00:00,  1.61s/it]
Entry functions: ['clip', 'unet', 'vae', 'dpm_solver_multistep_scheduler_convert_model_output', 'dpm_solver_multistep_scheduler_step', 'pndm_scheduler_step_0', 'pndm_scheduler_step_1', 'pndm_scheduler_step_2', 'pndm_scheduler_step_3', 'pndm_scheduler_step_4', 'image_to_rgba', 'concat_embeddings']
Traceback (most recent call last):
  File "/home/orangepi/RK3588-stable-diffusion-GPU/./build.py", line 239, in <module>
    mod = legalize_and_lift_params(mod, params, ARGS)
  File "/home/orangepi/RK3588-stable-diffusion-GPU/./build.py", line 129, in legalize_and_lift_params
    new_params = utils.transform_params(mod_transform, model_params)
  File "/home/orangepi/RK3588-stable-diffusion-GPU/web_stable_diffusion/utils.py", line 95, in transform_params
    new_params[name] = vm[name + "_transform_params"](params)
  File "/home/orangepi/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 239, in __call__
    raise_last_ffi_error()
  File "/home/orangepi/tvm/python/tvm/_ffi/base.py", line 481, in raise_last_ffi_error
    raise py_err
ValueError: Traceback (most recent call last):
  8: _ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjIZNS0_8relax_vm18VirtualMachineImpl15_LookupFunctionERKNS0_6StringEEUlNS0_7TVMArgsEPNS0_11TVM
  7: tvm::runtime::relax_vm::VirtualMachineImpl::InvokeClosurePacked(tvm::runtime::ObjectRef const&, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)
  6: tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::relax_vm::VirtualMachineImpl::GetClosureInternal(tvm::runtime::String const&, bool)::{lambda(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)
  5: tvm::runtime::relax_vm::VirtualMachineImpl::InvokeBytecode(long, std::vector<tvm::runtime::TVMRetValue, std::allocator<tvm::runtime::TVMRetValue> > const&)
  4: tvm::runtime::relax_vm::VirtualMachineImpl::RunLoop()
  3: tvm::runtime::relax_vm::VirtualMachineImpl::RunInstrCall(tvm::runtime::relax_vm::VMFrame*, tvm::runtime::relax_vm::Instruction)
  2: tvm::runtime::relax_vm::VirtualMachineImpl::InvokeClosurePacked(tvm::runtime::ObjectRef const&, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)
  1: tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::TypedPackedFunc<void (tvm::runtime::ObjectRef, long, tvm::runtime::Optional<tvm::runtime::String>)>::AssignTypedLambda<void (*)(tvm::runtime::ObjectRef, long, tvm::runtime::Optional<tvm::runtime::String>)>(void (*)(tvm::runtime::ObjectRef, long, tvm::runtime::Optional<tvm::runtime::String>), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)
  0: tvm::runtime::relax_vm::CheckTupleInfo(tvm::runtime::ObjectRef, long, tvm::runtime::Optional<tvm::runtime::String>)
  File "/home/orangepi/tvm/src/runtime/relax_vm/builtin.cc", line 310
ValueError: Check failed: (static_cast<int64_t>(ptr->size()) == size) is false: ErrorContext(fn=clip_transform_params, loc=param[0], param=model_params, annotation=R.Tuple(R.Tuple(R.Tensor((77, 768), dtype="float32"), R.Tensor((49408, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((3072,), dtype="float32"), R.Tensor((3072, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 3072), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((3072,), dtype="float32"), R.Tensor((3072, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 3072), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((3072,), dtype="float32"), R.Tensor((3072, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 3072), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((3072,), dtype="float32"), R.Tensor((3072, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 3072), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((3072,), dtype="float32"), R.Tensor((3072, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 3072), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((3072,), dtype="float32"), R.Tensor((3072, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 3072), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((3072,), dtype="float32"), R.Tensor((3072, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 3072), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((3072,), dtype="float32"), R.Tensor((3072, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 3072), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((3072,), dtype="float32"), R.Tensor((3072, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 3072), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((3072,), dtype="float32"), R.Tensor((3072, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 3072), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((3072,), dtype="float32"), R.Tensor((3072, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 3072), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((3072,), dtype="float32"), R.Tensor((3072, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 3072), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768, 768), dtype="float32"), R.Tensor((768,), dtype="float32"), R.Tensor((768,), dtype="float32"))))  expect a Tuple with 1 elements,  but get a Tuple with 196 elements.
(sd1) orangepi@orangepi5:~/RK3588-stable-diffusion-GPU$ python ./deploy.py --device-name opencl
Traceback (most recent call last):
  File "/home/orangepi/RK3588-stable-diffusion-GPU/./deploy.py", line 169, in <module>
    deploy_to_pipeline(ARGS)
  File "/home/orangepi/RK3588-stable-diffusion-GPU/./deploy.py", line 139, in deploy_to_pipeline
    const_params_dict = utils.load_params(args.artifact_path, device)
  File "/home/orangepi/RK3588-stable-diffusion-GPU/web_stable_diffusion/utils.py", line 115, in load_params
    params, meta = tvmjs.load_ndarray_cache(f"{artifact_path}/params", device)
  File "/home/orangepi/tvm/python/tvm/contrib/tvmjs.py", line 344, in load_ndarray_cache
    json_info = json.loads(open(cachepath, "r").read())
FileNotFoundError: [Errno 2] No such file or directory: 'dist/params/ndarray-cache.json'

请问这是怎么回事

happyme531 commented 1 month ago

expect a Tuple with 1 elements, but get a Tuple with 196 elements.

看一遍readme