Hi all. I’m going to lead off with the fact I’m a python neophyte, and I apologize if my question here is a bit obtuse. I’ve searched here and elsewhere without finding a good solution, though it might be as simple as “not asking the right questions”
I cloned the Diffusers repo from GitHub, and using the examples I’ve managed to get things like the Dreambooth and Stable Diffusion Pipeline example scripts working. But in order to get any of them working, I’ve also had to use pip to install the diffusers library.
This is a problem, because I want to try modifying the various pipeline scripts. (Specifically I’m wanting to be able to extract, view, modify, and re-inject the latent tensors at each step of inference in the Stable Diffusion Pipeline) However, I can’t reliably get my code to exclusively use the scripts I cloned from the repo. Instead it pulls the code from the diffusers library installed with pip.
The first thing I tried was simple renaming of scripts, and adding the cloned repo directory to my PYTHONPATH, but I ended up with circular import errors, not to mention just the sheer number of references that need to be changed in every single init file and script on the whole repo.
I also tried creating new Conda or venv environments, specifically excluding the Diffusers library, but in that case even the example scripts refused to work unless I installed Diffusers via pip. Even adding the cloned Diffusers directory to PYTHONPATH.
I have such a wide variety of errors and things I’ve tried, things I’ve changed, and I don’t have the knowledge to untangle it all, so I’m starting over with a fresh clone of the repo and this question:
What is the accepted best practice for making changes to Diffusers, and testing those changes locally, keeping them separate from any installed version of Diffusers? I want to be able to tinker with the scripts in the Diffusers repo, and then run them so that any import or reference to “diffusers” goes to the scripts I’ve modified instead of the pip installed/wheel built diffusers library on my machine. Obviously my current workflows are flawed, and I’d like input from people with more coding experience than myself.
Thanks!