Spaces:
Running
on
Zero
Error but working with private space and models
I duplicated the space and edited the lora json file with custom repos and images etc.
90% of gradio elements get an error message after choosing one of the added loras and during generation.
Everything works, but it is a bit annoying still.
Thanks for the report. I will try to verify it tomorrow, but I need a piece of Json that can reproduce the problem.
I'm not saying it's too much to ask, just part of it.
Errors are the best clue to a solution.
Line 9-15 from loras.json here, with personal details edited out in brackets:
{
"image": "https://huggingface.co/Pr0f3ssi0n4ln00b/Olav/resolve/main/images/[name]_e000020_00_20241116233706.png",
"title": "[name]",
"repo": "Pr0f3ssi0n4ln00b/[name]",
"weights":"[name]_epoch_20.safetensors",
"trigger_word": "[4n0nym0u5_t0k3n], ohwx man"
},
Error from logs:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/gradio/queueing.py", line 624, in process_events
response = await route_utils.call_process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/route_utils.py", line 323, in call_process_api
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 2028, in process_api
data = await self.postprocess_data(block_fn, result["prediction"], state)
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1836, in postprocess_data
outputs_cached = await processing_utils.async_move_files_to_cache(
File "/usr/local/lib/python3.10/site-packages/gradio/processing_utils.py", line 637, in async_move_files_to_cache
return await client_utils.async_traverse(
File "/usr/local/lib/python3.10/site-packages/gradio_client/utils.py", line 1017, in async_traverse
return await func(json_obj)
File "/usr/local/lib/python3.10/site-packages/gradio/processing_utils.py", line 610, in _move_to_cache
temp_file_path = await block.async_move_resource_to_block_cache(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 303, in async_move_resource_to_block_cache
temp_file_path = await processing_utils.async_ssrf_protected_download(
File "/usr/local/lib/python3.10/site-packages/gradio/processing_utils.py", line 358, in async_ssrf_protected_download
raise Exception(f"Failed to download file. Status code: {response.status_code}")
Exception: Failed to download file. Status code: 401
I've modified the private LoRA so that it can be added to the gallery. I think this should work for yours too.
In addition, I've made it so that you can add it to the gallery by specifying the repo as shown below. Well, if you have multiple LoRA in one repo, or if you want to specify the trigger word reliably, I think it's better to do it manually.
{
"repo": "AbeShinzo0708/AbeShinzo_flux_lora_test"
},