thereforegames / txt2img2img Goto Github PK
View Code? Open in Web Editor NEWImprove the editability of any Stability Diffusion subject while retaining a high degree of likeness
Improve the editability of any Stability Diffusion subject while retaining a high degree of likeness
File "C:\Users\chlyw\Desktop\Automatic1111\scripts\txt2mask.py", line 16, in
from repositories.clipseg.models.clipseg import CLIPDensePredT
ModuleNotFoundError: No module named 'repositories.clipseg'
Hi, I am having problems decoding your instructions.
Could you please provide an example, describing in detail all steps?
Thanks.
When I'm trying to start the webui after installing rembg to venv an error occures
I think there is a conflict between webui requirements and rembg requirements
Log when I'm trying to start webui-user.bat:
Installing collected packages: Pillow, numpy, scikit-image
Attempting uninstall: Pillow
Found existing installation: Pillow 9.0.1
Uninstalling Pillow-9.0.1:
Successfully uninstalled Pillow-9.0.1
stderr: ERROR: Could not install packages due to an OSError: [WinError 5] : 'C:\\Software\\Other Software\\sdautomatic111\\venv\\Lib\\site-packages\\~il\\_imaging.cp39-win_amd64.pyd'
Check the permissions.
succesfully installed rembg (cpu and gpu) using pip install commands
when running the script i get an error when the rembg tries to import onnxruntime as ort
currently fixed with this solution modifing the requirementes of automatic1111
" 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"."
i just wanna let you know that some of us is getting that error maybe you can fix it.
I noticed that this uses venv. I'm not too familiar with venv. I installed automatic's repo into a conda environment. Can this script be installed and used in a conda environment? Could I just install the packages that are in the venv directly into my conda environment without venv?
TypeError: img2img() missing 2 required positional arguments: 'img2img_batch_input_dir' and 'img2img_batch_output_dir'
I don't see any such configurable values in Automatic111's webui.
Following Error occurs when I run the script:
Error completing request
Arguments: ('a woman and a dog are standing in a field with trees in the background and a blue sky in the background, by Van gogh', '', 'None', 'None', <PIL.Image.Image image mode=RGB size=639x480 at 0x26D93DBBEB0>, None, None, 0, 50, 1, 4, 0, True, False, 0, 1, 1, 8.5, 0.75, -1.0, -1.0, 0, 0, 0, 512, 512, 0, 0, 64, False, 0, 2, '', '', '', 1, 50, 4, 1, 128, 4, 0, ['left', 'right', 'up', 'down'], None, False, 1, '', 4, '', True) {}
Traceback (most recent call last):
File "C:\stable-diffusion-webui-master\modules\ui.py", line 125, in f
res = list(func(*args, **kwargs))
File "C:\stable-diffusion-webui-master\webui.py", line 71, in f
res = func(*args, **kwargs)
File "C:\stable-diffusion-webui-master\modules\img2img.py", line 129, in img2img
processed = modules.scripts.scripts_img2img.run(p, *args)
File "C:\stable-diffusion-webui-master\modules\scripts.py", line 139, in run
processed = script.run(p, *script_args)
File "C:\stable-diffusion-webui-master\scripts\img2imgalt.py", line 113, in run
processed = processing.process_images(p)
File "C:\stable-diffusion-webui-master\modules\processing.py", line 265, in process_images
samples_ddim = p.sample(x=x, conditioning=c, unconditional_conditioning=uc)
File "C:\stable-diffusion-webui-master\scripts\img2imgalt.py", line 97, in sample_extra
noise = find_noise_for_image(p, cond, unconditional_conditioning, cfg, st)
File "C:\stable-diffusion-webui-master\scripts\img2imgalt.py", line 36, in find_noise_for_image
cond_in = torch.cat([uncond, cond])
TypeError: expected Tensor as element 0 in argument 0, but got ScheduledPromptBatch
help would be apreciated
Traceback (most recent call last):
File "D:\sd\modules\ui.py", line 125, in f
res = list(func(*args, **kwargs))
File "D:\sd\webui.py", line 71, in f
res = func(*args, **kwargs)
File "D:\sd\modules\txt2img.py", line 34, in txt2img
processed = modules.scripts.scripts_txt2img.run(p, *args)
File "D:\sd\modules\scripts.py", line 139, in run
processed = script.run(p, *script_args)
File "D:\sd\scripts\txt2img2img.py", line 193, in run
p.prompt_style,
AttributeError: 'StableDiffusionProcessingTxt2Img' object has no attribute 'prompt_style'
So, a video would be better, or just step by step, not sure why theres 2 json files one names exampe, should i name it after my subject name, its kinda unclear. Not really fond of overwriting files in my webui repo, is that necessary ?
Id like to try it out but we arent all devs that can jump into someone elses code and rock it immediately.
So... what should i do if my able to be stylised embedding with poor likeness is named "kry" but my overfit embedding is named "kryf ?
Heres what i got
{
"txt2img_term": "kryf",
"img2img_term": "kry",
"autoconfigure": true,
"prompt_method":0,
"negative_prompt": "include terms to offset any weaknesses in your subject",
"sampler_name":"euler",
"steps":25,
"denoising_strength": 0.7,
"cfg_scale": 9.5,
"restore_faces": true,
"bypass_color_correction":true
}
quite a few changes to the latest a1111
been working throught it from here...
File "D:\py\automatic1111\stable-diffusion-webui\scripts\txt2img2img.py", line 234, in run
p.sampler_index = samplers_dict.get(getattr(img_opts,"sampler_name","euler a").lower(), p.sampler_index)
p
object so you need to get it from p.sampler_name
img2img
have changed (see below).. i'm going to raise a ticket for them to just pass a single arg object to make it easier for third parties to keep in sync rather than have to reorder your args etcseed_enable_extras
is no longer passed through the entire path, so you can't get it from p
currentlyI'll see what else I can spot and update notes
def img2img(
mode: int,
prompt: str,
negative_prompt: str,
prompt_style: str,
prompt_style2: str,
init_img,
init_img_with_mask,
init_img_with_mask_orig,
init_img_inpaint,
init_mask_inpaint,
mask_mode,
steps: int,
sampler_index: int,
mask_blur: int,
mask_alpha: float,
inpainting_fill: int,
restore_faces: bool,
tiling: bool,
n_iter: int,
batch_size: int,
cfg_scale: float,
denoising_strength: float,
seed: int,
subseed: int,
subseed_strength: float,
seed_resize_from_h: int,
seed_resize_from_w: int,
seed_enable_extras: bool,
height: int,
width: int,
resize_mode: int,
inpaint_full_res: bool,
inpaint_full_res_padding: int,
inpainting_mask_invert: int,
img2img_batch_input_dir: str,
img2img_batch_output_dir: str,
*args):
the new option to hide images from the results panel (to fix the big delay after generation) needs to be checked for because the array will be empty, giving an index out of range
error otherwise
fix is on first line below:
if(opts.do_not_show_images == False): # need to apply this line
# Get the image stored in the first index
img2img_images = img2img_result[0]
# Add the new image(s) to our main output
processed.images.append(img2img_images[0])
you can see the cause of this here:
https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/c8045c5ad4f99deb3a19add06e0457de1df62b05/modules/img2img.py#L134
Automatic's webui does support prompt weighting, but it's using () for emphasis and [] for de-emphasis (nestable) rather than specifying explicit weight values
I got an error: "can't find ./txt2img2img/routines" so I had to change my base_dir variable in the scripts\txt2img2img.py program. I think the ./ wasn't doing it's intended purpose. I am not familiar with that notation so I don't know if it was something on my end of not. It is currently fix on my end, but I thought I should report it.
- base_dir = "./txt2img2img" ->>>>>>>>>>>>
+ base_dir = r"C:\Users\NAME\stable-diffusion-webui\extensions\txt2img2img\txt2img2img"
was my fix
When running the StableDiffusion batch file, it throws an error that txt2img2img cannot be loaded
Traceback (most recent call last):
File "C:\Users\user\Documents\WaifuDif\stable-diffusion-webui\modules\scripts.py", line 71, in load_scripts
exec(compiled, module.dict)
File "C:\Users\user\Documents\WaifuDif\stable-diffusion-webui\scripts\txt2img2img.py", line 21, in
from txt2img2img.dependencies import shortcodes
ModuleNotFoundError: No module named 'txt2img2img'
Line 21:
from txt2img2img.dependencies import shortcodes
Hi,
Firstly, thanks for your effors on maintaining this repo !
I have used my own embedding file following the instruction but the results are weird.
Could you please share the sheik embedding file used in Starter Guide, cause I would like to reproduce the result to see if my implementation has any problem.
Many thanks !
Best.
I have no idea how to use \txt2img2img\prompt_templates\
Can you give some good example for each prompt_templates.
low_subject_emphasis prompt2prompt_inversion simple_term_swap
Just wondering what the licence on your code? MIT?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.