imaginAIry icon indicating copy to clipboard operation
imaginAIry copied to clipboard

won't run without network connection

Open Cybergate9 opened this issue 2 years ago • 8 comments

even if model/config etc in cache.. found this one accidentally.. 7.6.0 (OSX, Python venv 3.10.8)

I noticed recently that the first step is always (well what's output to console anyway) to go to the network to download model even when model is in cache.. not sure if this logic was changed at some point or for some reason..

Ideally of course : cache check first, then get model from network, and if network fails a graceful exit with error message..

thanks for all the latest adds + fixes!

Cybergate9 avatar Jan 20 '23 05:01 Cybergate9

Oh I see it says downloading every time. I dug into it and looks like a bug in huggingface-hub. Will fix.

brycedrennan avatar Jan 22 '23 19:01 brycedrennan

When you've fixed this bug please consider informing the community that the initial download is 4.27GB. That's not nothing. If there's a way to remove this data when we're housecleaning our computers that would be sweet indeed.

johnblommers avatar Jan 23 '23 00:01 johnblommers

@johnblommers the requirements already state

~10 gb space for models to download

brycedrennan avatar Jan 23 '23 15:01 brycedrennan

I've made a pull request into the hugging-face hub library to fix this. If that's not fixed in a timely fashion I can make a workaround. https://github.com/huggingface/huggingface_hub/pull/1306

brycedrennan avatar Jan 23 '23 16:01 brycedrennan

12 hours wasn't fast enough. just released 8.0.5 has fix/workaround.

brycedrennan avatar Jan 24 '23 04:01 brycedrennan

Um, I still have this problem and run current versions… is this fixed, a different bug, or am I holding it wrong?

Problem: If my computer is offline, Imaginairy aborts with an error, no image generation possible.

Error: requests.exceptions.ConnectionError: (MaxRetryError('HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/stabilityai/stable-diffusion-xl-base-1.0/revision/462165984030d82259a11f4367a4eed129e94a7b (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x154349450>: Failed to resolve 'huggingface.co' ([Errno 8] nodename nor servname provided, or not known)"))'), '(Request ID: 3816a0d4-9d26-4771-8599-eeaafc70c60d)')

Context: imaginAIry 14.1.1 Python 3.10.13 Macos 14.3 (23D56), M1

maschinenzeitmaschine avatar Feb 02 '24 00:02 maschinenzeitmaschine

On first generation with a model, it of course has to download the weights. If you're saying that the weights were already downloaded, I'll look into it more.

brycedrennan avatar Feb 02 '24 16:02 brycedrennan

yes, the weights are definitely downloaded and locally available. should be easily reproducible, at least in my case, i can't generate anything at all when offline, just aborts throwing this error.

if helpful: if i start my program while online and generate an image, then kill the internet connection while my code is still running, i can still keep generating. however if i now (while offline) stop and restart my program, it fails.

maschinenzeitmaschine avatar Feb 02 '24 19:02 maschinenzeitmaschine