ThereforeGames / txt2img2img

Improve the editability of any Stability Diffusion subject while retaining a high degree of likeness
151 stars 22 forks source link

Instructions are a bit too vague, could you provide an example? #6

Closed illtellyoulater closed 2 years ago

illtellyoulater commented 2 years ago

Hi, I am having problems decoding your instructions. Could you please provide an example, describing in detail all steps? Thanks.

ThereforeGames commented 2 years ago

https://github.com/ThereforeGames/txt2img2img/blob/main/STARTER%20GUIDE.md

illtellyoulater commented 2 years ago

I got it working! I had missed that you actually provided the Sheik example as well as the resulting images. It's working good! 👍👍👍

To avoiding risking to mess up the already existing stable-diffusion-webui venv, I only copied the libs from txt2img2img/venv I did not already have in in stable-diffusion-webui/venv/Lib/site-packages

Other than that, the only missing lib from both venvs that I had to install manually was onnxruntime.

ciaobnsr commented 2 years ago

how did you do the onnxruntime thing again? i'm getting errors with that

illtellyoulater commented 2 years ago

@ciaobnsr I temporarily added onnxruntime at the end of "requirements_versions.txt" (without specifying a version). Then I ran the webui-user batch/shell script normally, which correctly installed the onnxruntime lib in the stable-diffusion-webui venv. Then I removed onnxruntime from "requirements_version.txt".

ciaobnsr commented 2 years ago

i did as you said and solved the problem, the scripts works. but im experiencing a minor inconvenience. sorry to bother you maybe you can help: the .onxx file is downloaded not in the stablediffusionwebui venv folder, but in my root directory. everytime i move that file, even if i removed onxxruntime from "requirements_version.txt, i use the script and the download restarts. how can i put it in the right folder without having it laying around my c:user folder and why it keeps downloading the .onxx even if the requirement_version.txt doesnt mention "onxxruntime".

illtellyoulater commented 2 years ago

@ciaobnsr one thing is the onnxruntime lib and another thing is the file that the lib downloads the first time it runs.

The onnxruntime lib is automatically installed under /venv/... After being installed, it gets called and the first time it will try to download the file you mentioned.

I don't think you have to move that file, at least I didn't move it and there were no successive attempts to download it again.

ciaobnsr commented 2 years ago

ok ill leave it as it is, maybe ill open another issue explaining that someone is having that onxxruntime error even if rembg is installed and running

jmp909 commented 1 year ago

if this helps anyone (Windows):

from webui main directory I ran:

venv\Scripts\activate.bat
venv\Scripts\python.exe -m pip install onnxruntime-gpu rembg[gpu]

the last line makes sure it's running the a1111 version of python rather than any other on your system. I think you can maybe omit the onnxruntime-gpu part. And you can also use just rembg if you don't want the gpu version

this way I don't need to copy over the whole venv folder from the txt2img2img repo