zer0tf / xyz_plot_script Goto Github PK
View Code? Open in Web Editor NEWXYZ Plot Script for Stable Diffusion WebUI
License: The Unlicense
XYZ Plot Script for Stable Diffusion WebUI
License: The Unlicense
https://i.imgur.com/zylrWSb.png
We can see that the box "Z values" starts well after the 2 boxes of x and y located just above, would it be possible - in view of a future update - to correct this bad alignment ?
So that the interface is more aesthetic / homogeneous
Thanks by advance for response or your help o/
I installed this script per the doc and am running in to an issue when trying to use it.
In Automatic 1111, in the txt2img tab, I have X/Y/Z plot selected.
X Type
Steps
X values
10,20,30,40,50
Y type
CFG Scale
Y values
5,6,7,8,9,10
Z type
Sampler
Z values
euler a
All of the images get generated, but then I get the following error:
Arguments: ('task(x6szqcdl2w34quj)', 'a photo of man', '', [], 20, 0, False, False, 1, 1, 7, -1.0, -1.0, 0, 0, 0, False, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, [], 5, True, False, 1, False, False, False, 1.1, 1.5, 100, 0.7, False, False, True, False, False, 0, 'Gustavosta/MagicPrompt-Stable-Diffusion', '', True, -1.0, False, None, None, '', '', '', '', 'Auto rename', {'label': 'Upload avatars config'}, 'Open outputs directory', 'Export to WebUI style', True, {'label': 'Presets'}, {'label': 'QC preview'}, '', [], 'Select', 'QC scan', 'Show pics', None, False, False, 'positive', 'comma', 0, False, False, '', 'Positive', 0, ', ', 'Generate and always save', 32, 4, '10,20,30,40,50', 5, '5,6,7,8,9,10', 8, 'euler a', False, '{inspiration}', None) {}
Traceback (most recent call last):
File "C:\Users\joeys\source\stable-diffusion-webui\modules\call_queue.py", line 56, in f
res = list(func(*args, **kwargs))
File "C:\Users\joeys\source\stable-diffusion-webui\modules\call_queue.py", line 37, in f
res = func(*args, **kwargs)
File "C:\Users\joeys\source\stable-diffusion-webui\modules\txt2img.py", line 53, in txt2img
processed = modules.scripts.scripts_txt2img.run(p, *args)
File "C:\Users\joeys\source\stable-diffusion-webui\modules\scripts.py", line 376, in run
processed = script.run(p, *script_args)
File "C:\Users\joeys\source\stable-diffusion-webui\scripts\xyz_grid.py", line 405, in run
with SharedSettingsStackHelper():
File "C:\Users\joeys\source\stable-diffusion-webui\scripts\xyz_grid.py", line 241, in __exit__
hypernetwork.apply_strength()
AttributeError: module 'modules.hypernetworks.hypernetwork' has no attribute 'apply_strength'
I haven't played with hyper networks yet, so all settings related to that are standard.
When selecting this Script, only "Keep -1 for seeds" is displayed as an option, nothing else is available as options or parameters. The Web UI is running with the following arguments and it's updated to commit (30b1bcc):
Launching Web UI with arguments: --xformers --disable-safe-unpickle --api --deepdanbooru --allow-code --administrator
I am sure it was working a few days ago because I did translate it in Italian. There are no error messages in the webui-user console. I disabled all the other non-official scripts as well as all the extensions, apart from the Image Browser, in case of conflicts, but without results. I am on Windows 10 Pro 64bit.
venv "F:\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)]
Commit hash: b5050ad2071644f7b4c99660dc66a8a95136102f
Installing requirements for Web UI
Installing requirements for Dreambooth
Checking Dreambooth requirements.
Checking/upgrading existing torch/torchvision installation
Checking torch and torchvision versions
Dreambooth revision is 40f81123b99492799d924b8c8816564ef6e8fa9f
Diffusers version is 0.7.2.
Torch version is 1.12.1+cu116.
Torch vision version is 0.13.1+cu116.
Transformers version is 4.21.0.
Launching Web UI with arguments: --deepdanbooru --autolaunch --xformers
Error loading script: xyz_grid.py
Traceback (most recent call last):
File "F:\stable-diffusion-webui\modules\scripts.py", line 184, in load_scripts
module = script_loading.load_module(scriptfile.path)
File "F:\stable-diffusion-webui\modules\script_loading.py", line 13, in load_module
exec(compiled, module.__dict__)
File "F:\stable-diffusion-webui\scripts\xyz_grid.py", line 17, in <module>
from modules.processing import StableDiffusionProcessingTxt2Img, process_images, get_correct_sampler
ImportError: cannot import name 'get_correct_sampler' from 'modules.processing' (F:\stable-diffusion-webui\modules\processing.py)
Hi, hope this is a bug and not just me, try to explain it :) If I set say:
haircolor, black, red, blonde
in one of the txt2img XYZ script S/R fields and include (haircolor hair:1.2) in my prompt, I would expect most simply, a black hair, a redhead and a blonde in my results, but there are four passes, the first one just trying to actually prompt 'haircolor hair'.
In the img2img XYZ S/R script it seems to function correctly, and also writes the correct selected field from each S/R option to the filename / metadata, wheras the txt2image will write every filename / meta as eg: haircolor.png
As stated, trying to generate batches with batch count causes it to lose/not keep every image except for the first one in the batch.
In the normal X/Y script it keeps and displays all extra batches
Hi, would it be possible to add the "Styles" option in the x, y and z drop down menus please ?
Anyway, thank you for this script which has excellent potential !
Looking forward to the day when we will be able to view the results in the form of a 3-dimensional grid, with the images transparent so that we can see those from behind, the possibility of turning the "camera" by holding down the mouse wheel, and a slider to scroll the grids on the Z axis xD
Exuse me If I'm wrong on 2 things:
Hi there,
I am not sure if your plugin is responsible, but it happened while doing some (quite excessive) creations.
DecompressionBombError: Image size (299658624 pixels) exceeds limit of 178956970 pixels, could be decompression bomb DOS attack.
I already felt that very large jobs end up in quite large pictures (already had a >800mb png), but my PC was able to handle that.
At least it would be nice if some kind of warning would show up BEFORE generating 15 hours long a few thousand pictures that are not very useful in the end- looking for a grid to compare the resultsside by side.
Or it would be at least nice to stitch the sub-grids (x/y) before stopping the whole process with no grid at all...
Error completing request Arguments: ('task(uttvl0jyhqsk114)', 'very detailed realistic painting of ohwx man as a futuristic space soldier by zack snyder, greg rukowski,\nvery detailed, ultra intricate, colorful fantastic mystery apocalyptic city in the background, canon 5d', 'low, bad, worst, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, extra limbs, disfigured, deformed, body out of frame, blurry, bad anatomy, blurred, watermark, grainy, signature, cut off, draft, amateur, multiple, gross, weird, uneven, furnishing, decorating, decoration, furniture, text, poor, low, basic, worst, juvenile, unprofessional, failure, crayon, oil, label, thousand hands', [], 25, 0, True, False, 4, 2, 15.5, 117716222.0, -1.0, 0, 0, 0, False, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, ['Model hash: 5277afa334'], 5, False, False, 'LoRA', 'None', 0, 0, 'LoRA', 'None', 0, 0, 'LoRA', 'None', 0, 0, 'LoRA', 'None', 0, 0, 'LoRA', 'None', 0, 0, 'Refresh models', False, 'none', 'None', 1, None, False, 'Scale to Fit (Inner Fit)', False, False, 64, 64, 64, 1, False, False, 'none', 'None', 1, None, False, 'Scale to Fit (Inner Fit)', False, False, 64, 64, 64, 1, False, False, False, 'positive', 'comma', 0, False, False, '', 'Illustration', 'svg', True, True, False, 0.5, True, 16, True, 16, 1, '', 0, '', True, False, False, 10, 'ohwx_1.5_34_5_680.ckpt,ohwx_1.5_34_5_1360.ckpt,ohwx_1.5_34_5_2040.ckpt,ohwx_1.5_34_5_2720.ckpt,ohwx_1.5_34_5_3400.ckpt,ohwx_1.5_34_5_4080.ckpt,ohwx_1.5_34_5_4760.ckpt,ohwx_1.5_34_5_5440.ckpt,ohwx_1.5_34_5_6120.ckpt,ohwx_1.5_34_5_6800.ckpt,ohwx_1.5_34_5_7480.ckpt,ohwx_1.5_34_5_8160.ckpt,ohwx_1.5_34_5_8840.ckpt,ohwx_1.5_34_5_9520.ckpt,ohwx_1.5_34_5_10200.ckpt,ohwx_1.5_34_5_11560.ckpt,ohwx_1.5_34_5_14960.ckpt', 6, '7,9,10,14,19,24,30', 1, '20,30,40,50,60,70', True, False, True, False, 0, '{inspiration}', None) {} Traceback (most recent call last): File "C:\SD\stable-diffusion-webui\modules\call_queue.py", line 56, in f res = list(func(*args, **kwargs)) File "C:\SD\stable-diffusion-webui\modules\call_queue.py", line 37, in f res = func(*args, **kwargs) File "C:\SD\stable-diffusion-webui\modules\txt2img.py", line 53, in txt2img processed = modules.scripts.scripts_txt2img.run(p, *args) File "C:\SD\stable-diffusion-webui\modules\scripts.py", line 376, in run processed = script.run(p, *script_args) File "C:\SD\stable-diffusion-webui\scripts\xyz_grid.py", line 596, in run processed, sub_grids = draw_xyz_grid( File "C:\SD\stable-diffusion-webui\scripts\xyz_grid.py", line 309, in draw_xyz_grid z_grid = images.draw_grid_annotations(z_grid, sub_grid_size[0], sub_grid_size[1], title_texts, [[images.GridAnnotation()]]) File "C:\SD\stable-diffusion-webui\modules\images.py", line 206, in draw_grid_annotations cell = im.crop((width * col, height * row, width * (col+1), height * (row+1))) File "C:\SD\stable-diffusion-webui\venv\lib\site-packages\PIL\Image.py", line 1234, in crop return self._new(self._crop(self.im, box)) File "C:\SD\stable-diffusion-webui\venv\lib\site-packages\PIL\Image.py", line 1252, in _crop _decompression_bomb_check(absolute_values) File "C:\SD\stable-diffusion-webui\venv\lib\site-packages\PIL\Image.py", line 3164, in _decompression_bomb_check raise DecompressionBombError(msg) PIL.Image.DecompressionBombError: Image size (299658624 pixels) exceeds limit of 178956970 pixels, could be decompression bomb DOS attack.
Can you please update to support controlnet? I believe it is a revolutionary plug-in,Someone has now turned it into an extension of AUTO1111.For More detailed ,Here is the link https://github.com/lllyasviel/ControlNet;https://github.com/Mikubill/sd-webui-controlnet;
Thank you so much.
Hello,
The following error occurs whenever attempting to generate an image using your script: FileNotFoundError: [Errno 2] No such file or directory: 'outputs/txt2img-images\xyz\00000\index.html'
Details from the webui console:
Traceback (most recent call last):
File "C:\dif\stable-diffusion-webui-master\modules\ui.py", line 212, in f
res = list(func(*args, **kwargs))
File "C:\dif\stable-diffusion-webui-master\webui.py", line 64, in f
res = func(*args, **kwargs)
File "C:\dif\stable-diffusion-webui-master\modules\txt2img.py", line 41, in txt2img
processed = modules.scripts.scripts_txt2img.run(p, *args)
File "C:\dif\stable-diffusion-webui-master\modules\scripts.py", line 162, in run
processed = script.run(p, *script_args)
File "C:\dif\stable-diffusion-webui-master\scripts\xyz_grid.py", line 363, in run
processed = draw_xyz_grid(
File "C:\dif\stable-diffusion-webui-master\scripts\xyz_grid.py", line 188, in draw_xyz_grid
shutil.copy2('scripts/xyz_grid.template.html', os.path.join(web_path, 'index.html'))
File "C:\Users\aurik\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 434, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Users\aurik\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 256, in copyfile
with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: 'outputs/txt2img-images\xyz\00000\index.html'
Is there a way to force the script to generate the correct html and data js for partially complete grids?
I had a 4 hour job fail at 98% and would like a way to continue from where I left off or force built the html and js files so that I can make use of the 800 images I generated.
An extra "empty" folder is created in the "images" folder. When you open the html file, the images don't appear in the grid, nor when you left click on it to open in another tab. It's because there's the extra "empty" folder that's created inside the "images" folder.
I just move everything from the "empty" folder into the "images" folder, and all is good. But I just wanted you to know it doesn't work right off the bat without doing that.
Thank YOU, xrpgame, for this amazing fork! You've solved two things I wish was in the original:
Error loading script: xyz_grid.py Traceback (most recent call last): File "D:\stable-diffusion-webui\modules\scripts.py", line 184, in load_scripts module = script_loading.load_module(scriptfile.path) File "D:\stable-diffusion-webui\modules\script_loading.py", line 13, in load_module exec(compiled, module.__dict__) File "D:\stable-diffusion-webui\scripts\xyz_grid.py", line 17, in <module> from modules.processing import StableDiffusionProcessingTxt2Img, process_images, get_correct_sampler ImportError: cannot import name 'get_correct_sampler' from 'modules.processing' (D:\stable-diffusion-webui\modules\processing.py)
It just not working for some reason
Video demonstration:
As you can see all fields are filled with values, but it isn't work
No any logs in console, it doesn's starting
the following errors come up when attempting to load Stable Diffusion with your xyz plot script:
Error loading script: vue.min.js
Traceback (most recent call last):
File "C:\dif\stable-diffusion-webui-master\modules\scripts.py", line 69, in load_scripts
compiled = compile(text, path, 'exec')
File "C:\dif\stable-diffusion-webui-master\scripts\vue.min.js", line 1
/*!
^
SyntaxError: invalid syntax
Error loading script: xyz_grid.py
Traceback (most recent call last):
File "C:\dif\stable-diffusion-webui-master\modules\scripts.py", line 71, in load_scripts
exec(compiled, module.dict)
File "C:\dif\stable-diffusion-webui-master\scripts\xyz_grid.py", line 16, in
from modules.hypernetworks import hypernetwork
ModuleNotFoundError: No module named 'modules.hypernetworks'
Error loading script: xyz_grid.template.html
Traceback (most recent call last):
File "C:\dif\stable-diffusion-webui-master\modules\scripts.py", line 69, in load_scripts
compiled = compile(text, path, 'exec')
File "C:\dif\stable-diffusion-webui-master\scripts\xyz_grid.template.html", line 10
--label-col-width: 220px;
^
SyntaxError: invalid decimal literal
In the original Automatic1111, when you select X/Y/Z plot, and select either of the Sampler, or Checkpoint name options, they provide an icon that looks like a book. When that is icon is pressed, it auto-fills the X/Y/or Z values/names of those options. This makes it easier to just delete the ones you don't want, instead of typing - possibly incorrectly - the ones you want.
It's a minor thing, a quality of life thing; so not a priority. I could always create a text file with a list to copy and paste into the field.
Is it possible to bring this script more inline with standard x/y plot?
By that I mean:
I posted a longer explanation here: AUTOMATIC1111/stable-diffusion-webui#3775
Hi,
I'm going to check out this script based on my question here:
AUTOMATIC1111/stable-diffusion-webui#3608
but I was wondering, can output be sent to a grid image? I think this outputs HTML files that you "flip" through, if I am reading correctly. Ideally, I'd want to see the images plotted on a single output grid with increasing resolution for 20 steps on row one, then 30 steps on row two, etc. Yup, I know the row would look wonky because it would have to accommodate the larger pictures next to the smallest, but it would save flipping files.
Thanks for any advice you may be able to offer
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.