inference icon indicating copy to clipboard operation
inference copied to clipboard

无法启动FLUX

Open Minamiyama opened this issue 6 months ago • 1 comments

System Info / 系統信息

Windows11, docker desktop v4.28.0

Running Xinference with Docker? / 是否使用 Docker 运行 Xinfernece?

  • [X] docker / docker
  • [ ] pip install / 通过 pip install 安装
  • [ ] installation from source / 从源码安装

Version info / 版本信息

v0.14.1.post1

The command used to start Xinference / 用以启动 xinference 的命令

version: '3.8' name: xinference services: xinference: image: registry.cn-hangzhou.aliyuncs.com/xprobe_xinference/xinference:v0.14.1.post1 # build: . ports: - "9997:9997" restart: always volumes: - ./root:/root environment: - XINFERENCE_MODEL_SRC=modelscope - HF_ENDPOINT=https://hf-mirror.com command: xinference-local --host 0.0.0.0 --port 9997 --log-level debug deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu]

Reproduction / 复现过程

2024-08-14 13:52:36 2024-08-14 05:52:35,999 xinference.core.supervisor 77 DEBUG Enter launch_builtin_model, model_uid: FLUX.1-dev, model_name: FLUX.1-dev, model_size: , model_format: None, quantization: None, replica: 1, kwargs: {} 2024-08-14 13:52:36 2024-08-14 05:52:36,001 xinference.core.worker 77 DEBUG Enter get_model_count, args: (<xinference.core.worker.WorkerActor object at 0x7f739536ade0>,), kwargs: {} 2024-08-14 13:52:36 2024-08-14 05:52:36,002 xinference.core.worker 77 DEBUG Leave get_model_count, elapsed time: 0 s 2024-08-14 13:52:36 2024-08-14 05:52:36,002 xinference.core.worker 77 DEBUG Enter launch_builtin_model, args: (<xinference.core.worker.WorkerActor object at 0x7f739536ade0>,), kwargs: {'model_uid': 'FLUX.1-dev-1-0', 'model_name': 'FLUX.1-dev', 'model_size_in_billions': None, 'model_format': None, 'quantization': None, 'model_engine': None, 'model_type': 'image', 'n_gpu': 'auto', 'request_limits': None, 'peft_model_config': None, 'gpu_idx': None, 'download_hub': 'modelscope', 'model_path': None} 2024-08-14 13:52:36 2024-08-14 05:52:36,003 xinference.core.worker 77 DEBUG GPU selected: [0] for model FLUX.1-dev-1-0 2024-08-14 13:53:16 2024-08-14 05:53:16,546 xinference.model.image.core 77 DEBUG Image model FLUX.1-dev found in ModelScope. 2024-08-14 13:53:16 2024-08-14 05:53:16,553 xinference.model.utils 77 INFO Use model cache from a different hub. 2024-08-14 13:53:17 /usr/local/lib/python3.10/dist-packages/xformers/ops/fmha/flash.py:211: FutureWarning: torch.library.impl_abstract was renamed to torch.library.register_fake. Please use that instead; we will remove torch.library.impl_abstract in a future version of PyTorch. 2024-08-14 13:53:17 @torch.library.impl_abstract("xformers_flash::flash_fwd") 2024-08-14 13:53:17 /usr/local/lib/python3.10/dist-packages/xformers/ops/fmha/flash.py:344: FutureWarning: torch.library.impl_abstract was renamed to torch.library.register_fake. Please use that instead; we will remove torch.library.impl_abstract in a future version of PyTorch. 2024-08-14 13:53:17 @torch.library.impl_abstract("xformers_flash::flash_bwd") 2024-08-14 13:53:17 /usr/local/lib/python3.10/dist-packages/diffusers/utils/outputs.py:63: FutureWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. 2024-08-14 13:53:17 torch.utils._pytree._register_pytree_node( 2024-08-14 13:53:17 2024-08-14 05:53:17,963 xinference.model.image.stable_diffusion.core 199 DEBUG Loading model <class 'diffusers.pipelines.auto_pipeline.AutoPipelineForText2Image'> 2024-08-14 13:53:17 2024-08-14 05:53:17,974 xinference.core.worker 77 ERROR Failed to load model FLUX.1-dev-1-0 2024-08-14 13:53:17 Traceback (most recent call last): 2024-08-14 13:53:17 File "/usr/local/lib/python3.10/dist-packages/xinference/core/worker.py", line 882, in launch_builtin_model 2024-08-14 13:53:17 await model_ref.load() 2024-08-14 13:53:17 File "/usr/local/lib/python3.10/dist-packages/xoscar/backends/context.py", line 231, in send 2024-08-14 13:53:17 return self._process_result_message(result) 2024-08-14 13:53:17 File "/usr/local/lib/python3.10/dist-packages/xoscar/backends/context.py", line 102, in _process_result_message 2024-08-14 13:53:17 raise message.as_instanceof_cause() 2024-08-14 13:53:17 File "/usr/local/lib/python3.10/dist-packages/xoscar/backends/pool.py", line 656, in send 2024-08-14 13:53:17 result = await self._run_coro(message.message_id, coro) 2024-08-14 13:53:17 File "/usr/local/lib/python3.10/dist-packages/xoscar/backends/pool.py", line 367, in _run_coro 2024-08-14 13:53:17 return await coro 2024-08-14 13:53:17 File "/usr/local/lib/python3.10/dist-packages/xoscar/api.py", line 384, in on_receive 2024-08-14 13:53:17 return await super().on_receive(message) # type: ignore 2024-08-14 13:53:17 File "xoscar/core.pyx", line 558, in on_receive 2024-08-14 13:53:17 raise ex 2024-08-14 13:53:17 File "xoscar/core.pyx", line 520, in xoscar.core._BaseActor.on_receive 2024-08-14 13:53:17 async with self._lock: 2024-08-14 13:53:17 File "xoscar/core.pyx", line 521, in xoscar.core._BaseActor.on_receive 2024-08-14 13:53:17 with debug_async_timeout('actor_lock_timeout', 2024-08-14 13:53:17 File "xoscar/core.pyx", line 526, in xoscar.core._BaseActor.on_receive 2024-08-14 13:53:17 result = await result 2024-08-14 13:53:17 File "/usr/local/lib/python3.10/dist-packages/xinference/core/model.py", line 300, in load 2024-08-14 13:53:17 self._model.load() 2024-08-14 13:53:17 File "/usr/local/lib/python3.10/dist-packages/xinference/model/image/stable_diffusion/core.py", line 135, in load 2024-08-14 13:53:17 self._model = AutoPipelineModel.from_pretrained( 2024-08-14 13:53:17 File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn 2024-08-14 13:53:17 return fn(*args, **kwargs) 2024-08-14 13:53:17 File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/auto_pipeline.py", line 339, in from_pretrained 2024-08-14 13:53:17 text_2_image_cls = _get_task_class(AUTO_TEXT2IMAGE_PIPELINES_MAPPING, orig_class_name) 2024-08-14 13:53:17 File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/auto_pipeline.py", line 162, in _get_task_class 2024-08-14 13:53:17 raise ValueError(f"AutoPipeline can't find a pipeline linked to {pipeline_class_name} for {model_name}") 2024-08-14 13:53:17 ValueError: [address=0.0.0.0:37671, pid=199] AutoPipeline can't find a pipeline linked to FluxPipeline for None 2024-08-14 13:53:18 2024-08-14 05:53:18,002 xinference.core.supervisor 77 DEBUG Enter terminate_model, args: (<xinference.core.supervisor.SupervisorActor object at 0x7f739536ae30>, 'FLUX.1-dev'), kwargs: {'suppress_exception': True} 2024-08-14 13:53:18 2024-08-14 05:53:18,003 xinference.core.supervisor 77 DEBUG Leave terminate_model, elapsed time: 0 s 2024-08-14 13:53:18 2024-08-14 05:53:18,009 xinference.api.restful_api 1 ERROR [address=0.0.0.0:37671, pid=199] AutoPipeline can't find a pipeline linked to FluxPipeline for None 2024-08-14 13:53:18 Traceback (most recent call last): 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xinference/api/restful_api.py", line 878, in launch_model 2024-08-14 13:53:18 model_uid = await (await self._get_supervisor_ref()).launch_builtin_model( 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xoscar/backends/context.py", line 231, in send 2024-08-14 13:53:18 return self._process_result_message(result) 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xoscar/backends/context.py", line 102, in _process_result_message 2024-08-14 13:53:18 raise message.as_instanceof_cause() 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xoscar/backends/pool.py", line 656, in send 2024-08-14 13:53:18 result = await self._run_coro(message.message_id, coro) 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xoscar/backends/pool.py", line 367, in _run_coro 2024-08-14 13:53:18 return await coro 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xoscar/api.py", line 384, in on_receive 2024-08-14 13:53:18 return await super().on_receive(message) # type: ignore 2024-08-14 13:53:18 File "xoscar/core.pyx", line 558, in on_receive 2024-08-14 13:53:18 raise ex 2024-08-14 13:53:18 File "xoscar/core.pyx", line 520, in xoscar.core._BaseActor.on_receive 2024-08-14 13:53:18 async with self._lock: 2024-08-14 13:53:18 File "xoscar/core.pyx", line 521, in xoscar.core._BaseActor.on_receive 2024-08-14 13:53:18 with debug_async_timeout('actor_lock_timeout', 2024-08-14 13:53:18 File "xoscar/core.pyx", line 526, in xoscar.core._BaseActor.on_receive 2024-08-14 13:53:18 result = await result 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xinference/core/supervisor.py", line 1027, in launch_builtin_model 2024-08-14 13:53:18 await _launch_model() 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xinference/core/supervisor.py", line 991, in _launch_model 2024-08-14 13:53:18 await _launch_one_model(rep_model_uid) 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xinference/core/supervisor.py", line 970, in _launch_one_model 2024-08-14 13:53:18 await worker_ref.launch_builtin_model( 2024-08-14 13:53:18 File "xoscar/core.pyx", line 284, in __pyx_actor_method_wrapper 2024-08-14 13:53:18 async with lock: 2024-08-14 13:53:18 File "xoscar/core.pyx", line 287, in xoscar.core.__pyx_actor_method_wrapper 2024-08-14 13:53:18 result = await result 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xinference/core/utils.py", line 45, in wrapped 2024-08-14 13:53:18 ret = await func(*args, **kwargs) 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xinference/core/worker.py", line 882, in launch_builtin_model 2024-08-14 13:53:18 await model_ref.load() 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xoscar/backends/context.py", line 231, in send 2024-08-14 13:53:18 return self._process_result_message(result) 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xoscar/backends/context.py", line 102, in _process_result_message 2024-08-14 13:53:18 raise message.as_instanceof_cause() 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xoscar/backends/pool.py", line 656, in send 2024-08-14 13:53:18 result = await self._run_coro(message.message_id, coro) 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xoscar/backends/pool.py", line 367, in _run_coro 2024-08-14 13:53:18 return await coro 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xoscar/api.py", line 384, in on_receive 2024-08-14 13:53:18 return await super().on_receive(message) # type: ignore 2024-08-14 13:53:18 File "xoscar/core.pyx", line 558, in on_receive 2024-08-14 13:53:18 raise ex 2024-08-14 13:53:18 File "xoscar/core.pyx", line 520, in xoscar.core._BaseActor.on_receive 2024-08-14 13:53:18 async with self._lock: 2024-08-14 13:53:18 File "xoscar/core.pyx", line 521, in xoscar.core._BaseActor.on_receive 2024-08-14 13:53:18 with debug_async_timeout('actor_lock_timeout', 2024-08-14 13:53:18 File "xoscar/core.pyx", line 526, in xoscar.core._BaseActor.on_receive 2024-08-14 13:53:18 result = await result 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xinference/core/model.py", line 300, in load 2024-08-14 13:53:18 self._model.load() 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/xinference/model/image/stable_diffusion/core.py", line 135, in load 2024-08-14 13:53:18 self._model = AutoPipelineModel.from_pretrained( 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn 2024-08-14 13:53:18 return fn(*args, **kwargs) 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/auto_pipeline.py", line 339, in from_pretrained 2024-08-14 13:53:18 text_2_image_cls = _get_task_class(AUTO_TEXT2IMAGE_PIPELINES_MAPPING, orig_class_name) 2024-08-14 13:53:18 File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/auto_pipeline.py", line 162, in _get_task_class 2024-08-14 13:53:18 raise ValueError(f"AutoPipeline can't find a pipeline linked to {pipeline_class_name} for {model_name}") 2024-08-14 13:53:18 ValueError: [address=0.0.0.0:37671, pid=199] AutoPipeline can't find a pipeline linked to FluxPipeline for None

Expected behavior / 期待表现

正常启动

Minamiyama avatar Aug 14 '24 05:08 Minamiyama