easydiffusion / easydiffusion

Easiest 1-click way to create beautiful artwork on your PC using AI, with no tech knowledge. Provides a browser UI for generating images from text prompts and images. Just enter your text prompt, and see the generated image.
https://easydiffusion.github.io/
Other
9.45k stars 777 forks source link

Running without internet - fully offline #1829

Open mercurial-moon opened 1 month ago

mercurial-moon commented 1 month ago

I downloaded the installation file v3.0 from the releases section. And installed it on a pc without internet access. During the end of the installation it needed to download lots of models. I just cancelled them. Then I manually downloaded the stable diffusion 1.5 safetensors file from hugging face and saved it under

models\stable-diffusion inside my installation folder.

On first run I get an error like

File C:\EasyDiffusion\ui\easydiffusion\task_manager.py, line 284, in thread_render task.run() File C:\EasyDiffusion\ui\easydiffusion\tasks\render_images.py, line 74, in run model_manager.fail_if_models_did_not_load(context) File C:\EasyDiffusion\ui\easydiffusion\model_manager.py, line 212, in fail_if_models_did_not_load raise Exception(f"Could not load the {model_type} model! Reason: " + e) Exception: Could not load the stable-diffusion model! Reason: Can't load tokenizer for 'laion/CLIP-ViT-bigG-14-laion2B-39B-b160k'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'laion/CLIP-ViT-bigG-14-laion2B-39B-b160k' is the correct path to a directory containing all relevant files for a CLIPTokenizer tokenizer.

Do I need to download multiple models instead of only the stable diffusion model? Is there a list of the minimum required models apart from stable diffusion that is needed to run EasyDiffusion?

q5sys commented 3 weeks ago

Initial install needs to be done with internet access, but I've been able to use it offline after that. I dont think it needs that laion model unless you enable that feature. (maybe that changed recently, idk) If you need that model, you can side load it using another machine with internet access from here: https://huggingface.co/laion/CLIP-ViT-bigG-14-laion2B-39B-b160k

mercurial-moon commented 3 weeks ago

Exactly what I did, once ran setup on a pc connected to the internet, then copied files over to another PC without an internet connection. And I don't know what a laion model is plus its 39B, I don't think I need it so I don't know why its being looked for. I just want to use easy diffusion for image generation.

cmdr2 commented 3 weeks ago

@mercurial-moon Do you have a folder named .cache in C:\Users\YOUR_USERNAME? For e.g. C:\Users\YOUR_USERNAME\.cache\huggingface

If so, please copy that folder along as well.

Stable Diffusion uses a number of sub-models, like CLIP, as components. For e.g. CLIP converts your input text into a series of numbers that represent concepts (loosely speaking).