i have tried to run this space many times and the same issue pops up.
this is the command i used:
docker run -it -p 7860:7860 --platform=linux/amd64 --gpus all \
-e HF_TOKEN="YOUR_VALUE_HERE" \
registry.hf.space/damarjati-flux-1-realismlora:latest python app.py
it prints out this error message:
> docker run -it -p 7860:7860 --platform=linux/amd64 --gpus all -e HF_TOKEN="" registry.hf.space/damarjati-flux-1-realismlora:latest python app.py
> 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]
> model_index.json: 100%|ββββββββββββββββββββββββββββββββββββββββββββββ| 536/536 [00:00<00:00, 4.24MB/s]
> scheduler/scheduler_config.json: 100%|βββββββββββββββββββββββββββββββ| 273/273 [00:00<00:00, 2.03MB/s]
> text_encoder/config.json: 100%|ββββββββββββββββββββββββββββββββββββββ| 613/613 [00:00<00:00, 4.54MB/s]
> model.safetensors: 100%|βββββββββββββββββββββββββββββββββββββββββββ| 246M/246M [00:20<00:00, 12.2MB/s]
> text_encoder_2/config.json: 100%|ββββββββββββββββββββββββββββββββββββ| 782/782 [00:00<00:00, 4.88MB/s]
> model-00001-of-00002.safetensors: 100%|ββββββββββββββββββββββββββ| 4.99G/4.99G [05:09<00:00, 16.1MB/s]
> model-00002-of-00002.safetensors: 100%|ββββββββββββββββββββββββββ| 4.53G/4.53G [02:47<00:00, 27.0MB/s]
> (β¦)t_encoder_2/model.safetensors.index.json: 100%|βββββββββββββββ| 19.9k/19.9k [00:00<00:00, 9.16MB/s]
> tokenizer/merges.txt: 100%|ββββββββββββββββββββββββββββββββββββββββ| 525k/525k [00:00<00:00, 1.42MB/s]
> tokenizer/special_tokens_map.json: 100%|βββββββββββββββββββββββββββββ| 588/588 [00:00<00:00, 4.63MB/s]
> tokenizer/tokenizer_config.json: 100%|βββββββββββββββββββββββββββββββ| 705/705 [00:00<00:00, 5.28MB/s]
> tokenizer/vocab.json: 100%|ββββββββββββββββββββββββββββββββββββββ| 1.06M/1.06M [00:00<00:00, 1.39MB/s]
> tokenizer_2/special_tokens_map.json: 100%|βββββββββββββββββββββββ| 2.54k/2.54k [00:00<00:00, 21.9MB/s]
> spiece.model: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββ| 792k/792k [00:00<00:00, 1.83MB/s]
> tokenizer_2/tokenizer.json: 100%|ββββββββββββββββββββββββββββββββ| 2.42M/2.42M [00:00<00:00, 5.80MB/s]
> tokenizer_2/tokenizer_config.json: 100%|βββββββββββββββββββββββββ| 20.8k/20.8k [00:00<00:00, 1.43MB/s]
> transformer/config.json: 100%|βββββββββββββββββββββββββββββββββββββββ| 378/378 [00:00<00:00, 3.60MB/s]
> (β¦)pytorch_model-00001-of-00003.safetensors: 100%|βββββββββββββββ| 9.98G/9.98G [09:31<00:00, 17.5MB/s]
> (β¦)pytorch_model-00002-of-00003.safetensors: 100%|βββββββββββββββ| 9.95G/9.95G [10:10<00:00, 16.3MB/s]
> (β¦)pytorch_model-00003-of-00003.safetensors: 100%|βββββββββββββββ| 3.87G/3.87G [05:46<00:00, 11.2MB/s]
> (β¦)ion_pytorch_model.safetensors.index.json: 100%|ββββββββββββββββββ| 121k/121k [00:00<00:00, 609kB/s]
> vae/config.json: 100%|βββββββββββββββββββββββββββββββββββββββββββββββ| 820/820 [00:00<00:00, 6.30MB/s]
> diffusion_pytorch_model.safetensors: 100%|βββββββββββββββββββββββββ| 168M/168M [00:19<00:00, 8.48MB/s]diffusion_pytorch_model.safetensors: 100%|βββββββββββββββββββββββββ| 168M/168M [00:19<00:00, 10.7MB/sYou set \add_prefix_space`. The tokenizer needs to be converted from the slow tokenizers00:00<?, ?it/s]`
> Loading checkpoint shards: 100%|ββββββββββββββββββββββββββββββββββββββββ| 2/2 [00:00<00:00, 4.66it/s]
> Loading pipeline components...: 100%|βββββββββββββββββββββββββββββββββββ| 7/7 [00:02<00:00, 2.92it/s]
> lora.safetensors: 100%|ββββββββββββββββββββββββββββββββββββββββββ| 22.4M/22.4M [00:02<00:00, 10.9MB/s]
> Traceback (most recent call last):βββββββββ | 10.5M/22.4M [00:01<00:01, 9.69MB/s]
> File "/home/user/app/app.py", line 20, in <module>
> pipe.to("cuda")
> File "/usr/local/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 431, in to
> module.to(device, dtype)
> File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1174, in to
> return self._apply(convert)
> File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 780, in _apply
> module._apply(fn)
> File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 780, in _apply
> module._apply(fn)
> File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 780, in _apply
> module._apply(fn)
> [Previous line repeated 1 more time]
> File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 805, in _apply
> param_applied = fn(param)
> File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1160, in convert
> return t.to(
> torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 18.00 MiB. GPU 0 has a total capacity of 10.00 GiB of which 0 bytes is free. Including non-PyTorch memory, this process has 17179869184.00 GiB memory in use. Of the allocated memory 16.56 GiB is allocated by PyTorch, and 9.42 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management