benrugg / AI-Render

Stable Diffusion in Blender
MIT License
1.05k stars 81 forks source link

Local Stable Diffusion Render #2

Closed jasonmhead closed 1 year ago

jasonmhead commented 1 year ago

Describe the feature you'd like to see:

Any plans to support generating local diffusion images locally? Perhaps it could tie into Automatic1111's API (with it being a dependency to install) after launching it and save a lot of work that way, and just pull it into Blender from there.

Additional information

No response

benrugg commented 1 year ago

For sure. I hadn't realized how much demand there would be for local installation until about a dozen people asked for that yesterday. That will be my next focus!

anotherjesse commented 1 year ago

I've had good luck using https://github.com/replicate/cog in my projects for local work

Replicate has an auto-scale web service you pay for, but also exposes the models as docker containers you can run locally. (I like using this because I can use local version for overnight renders - and use hosted version for getting images from many concurrent renders (pay $0.01 to replicate for an images from A100 renders, use my local linux machine for batch)

https://replicate.com/stability-ai/stable-diffusion

docker run -d -p 5000:5000 --gpus=all r8.im/stability-ai/stable-diffusion@sha256:cc201941f43a4b6299d31f28a9745f2c33523b9d78a92cf7261fcab3fc36fd37

gives you an HTTP endpoint

curl http://localhost:5000/predictions -X POST -H "Content-Type: application/json" \
  -d '{"input": {
    "prompt": "...",
    "width": "...",
    "height": "...",
    "init_image": "https://url/to/file",
    "mask": "https://url/to/file",
    "prompt_strength": "...",
    "num_outputs": "...",
    "num_inference_steps": "...",
    "guidance_scale": "...",
    "seed": "..."
  }}'

gives you an image.

If I have time today, I can try modifying operators.py to see if it is relatively straightforward to support either replicate or local

benrugg commented 1 year ago

@anotherjesse Thanks for letting me know about this! I had used replicate.com a bit, but I didn't realize it also exposed docker containers. That's rad.

Definitely feel free to contribute - I'd be happy to have more collaboration. I am not sure if docker is the best route for everyone, or if there will be a relatively hands off way to install everything through python. I think https://github.com/carson-katri/dream-textures is doing the latter, and that was going to be my next step to look at.

erwincoumans commented 1 year ago

Thanks for sharing the project! I use the local webui from https://github.com/sd-webui/stable-diffusion-webui, would be nice if your Blender plugin can connect to such a thing locally.

benrugg commented 1 year ago

Nice, I'll check that out. A number of people have said they use https://github.com/AUTOMATIC1111/stable-diffusion-webui

I'd love to support a variety of local installation options if possible

jasonmhead commented 1 year ago

Docker can be great but does introduce some install overhead. Using straight virtual python envs can work pretty well - Automatic1111's web ui supports that method and it's becoming a pretty bit project over there.

Norgus commented 1 year ago

Agree that automatic1111's repository is basically so well updated and contributed to, it's more or less standard advice to use for a local install. Would be awesome to use it linked with blender.

carson-katri commented 1 year ago

@benrugg This addon looks really cool, especially helpful for people with low VRAM. RE dependencies in Dream Textures, I package all of the dependencies into the addon for distribution. I’ve setup a GitHub Actions workflow that does this for every tagged release. Also, the addon hooks into Cycles to add a “Dream Textures” render pass, which similarly runs image2image on your rendered scene: https://github.com/carson-katri/dream-textures/blob/main/docs/RENDER_PASS.md

If you’re interested in doing local inference in your addon, here’s the build process we use to package everything up: https://github.com/carson-katri/dream-textures/blob/main/.github/workflows/package-release.yml

benrugg commented 1 year ago

Hey @carson-katri, thank you so much for reaching out. I looked at Dream Textures a few days ago, and I was very impressed with what you've done!

When I saw the Render Pass output you created was like, "oh... I wish I had known about that!"

I've been considering the different ways to support local installations. Ideally, I'd like to support existing installations people already have (like Automatic1111 and InvokeAI bundled in Dream Textures, etc). The quickest route seems like tapping into the API of those existing installs and just running a simple web request. I've got it maybe 50% done for Automatic1111 so far.

If it's alright, I will use your code as inspiration as I go. Your work is far more robust than what I've done. (This is also my first Blender add-on and my first time with Python!)

carson-katri commented 1 year ago

Integrating with existing installs seems like a nice simple way to go about it.

As long as you comply with the license, feel free to take inspiration 😁

Looking forward to seeing the art people make with it!

benrugg commented 1 year ago

Yeah, I'm excited to see what people do with all of these tools!

geonom commented 1 year ago

Ill be very happy to test and give feedback about any stable diffusion 1111 local installation usage ;)

benrugg commented 1 year ago

@geonom sounds great. I'm hoping to have something ready to test tomorrow!

benrugg commented 1 year ago

@geonom and anyone else who would like to test: The attached version supports local installation with Automatic1111's web ui. (More local install options should be doable now that the structure is in place).

I have not tested at all on Windows. No help docs are up yet. Will be doing both of those things soon.

Because Automatic1111's code is changing so quickly, it's possible that you'll need to update your installation if you have a version from days/weeks ago. (Although any testing of this is helpful!)

Please test and let me know if it works for you! AI-Render-v0-3-0.zip

benrugg commented 1 year ago

Welp, so actually, the Automatic1111 web ui has changed since yesterday, and now the params are in a different format. Will make a new release as soon as I can get working again 😅

Norgus commented 1 year ago

@benrugg do you mind saying what commit hash it should work with?

benrugg commented 1 year ago

@Norgus It worked with 991a595. But I have it now working on the latest build as well. I just need to fix one last bug on Windows, and I'll have a new test release for you.

Norgus commented 1 year ago

Ah, I think I need to wait for that windows bugfix because I can't make it work on that checkpoint either. Looking forward to trying!

benrugg commented 1 year ago

Ok, here's a new version that should work on both Windows and Mac, and with a current install of Automatic1111 (and in theory also older versions, too).

AI-Render-v0-3-2.zip

Let me know if it works for you!

Norgus commented 1 year ago

So I still didn't get it working

My Automatic1111 console looks like this: (is up to date and working in the webui)

Commit hash: f49c08ea566385db339c6628f65c3a121033f67c
Installing requirements for Web UI
Launching Web UI with arguments: --listen --xformers
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Loading weights [7460a6fa] from C:\Users\norgu\SD_Automatic111\models\Stable-diffusion\model.ckpt
Global Step: 470000
Applying xformers cross attention optimization.
Model loaded.
2560 1440
1390
Loaded a total of 14 textual inversion embeddings.
Embeddings: centaur_o, coc, cora-tangle, dog-winston_o, dullboy-cari, fileteado-porteno, fireworks-over-water, glow-forrest, huayecai, junji-ito, roy-lichtenstein, spritual-monster_o, ugly-sonic, yoshi_o
Running on local URL:  http://0.0.0.0:7860

To create a public link, set `share=True` in `launch()`.

My blender add-on settings look enabled and pointing at the correct local URL/port image

And my AI render settings look enabled image

But rendering just seems to do an ordinary render with no response from the SD CLI window I tried EEVEE and Cycles, and also pressing either 'New Image...' buttons but none seem to have made a difference.

Am I missing something?

benrugg commented 1 year ago

@Norgus Thanks for testing it so quickly! It looks like your Automatic1111 server is running at http://0.0.0.0:7860. If you paste that into the Local Web Server URL field in the preferences, then hopefully it'll work 🤞

I'll have to add that to the installation instructions... 🧐

Norgus commented 1 year ago

@benrugg I'm fairly sure the all zeros just means it's listening on all available interfaces & addresses (I can't use 0.0.0.0:7860 in the browser or your add-on). I access it through http://localhost:7860/ (and the 127 version of the loopback address) just fine and this website I found googling seems to at least partly work with the default API URL of http://127.0.0.1:7860

when I say partly work, it actually generates an image (I can see them appear in my output folder) but the interface fails to display it.

To summarise: both versions of the loopback address (localhost and 127.0.0.1) work in my browser, so does my private LAN address, but none seem to be interfacing with the blender add-on so far.

benrugg commented 1 year ago

@Norgus Ah, ok, gotcha. I didn't realize that's what 0.0.0.0 meant. If it's at least partially working in Diffusion UI, then something is definitely going wrong on my end.

Can you get the Blender error log under Window > Toggle System Console?

geonom commented 1 year ago

It is working over here.

image

I needed to change the plugins setting for the stable diffusion 1111 version to being before October 21 and then it worked.

Norgus commented 1 year ago

How infuriating! I wonder what's going on with my system.. are we all using Blender 3.3.1 LTS?

I can't recognise anything relevant looking in the error log:

Read prefs: C:\Users\norgu\AppData\Roaming\Blender Foundation\Blender\3.3\config\userpref.blend
blenderkit addon: Verbose is enabled
blenderkit addon: Read in JSON settings from file
Reloading external rigs...
Reloading external metarigs...
HardOps 0.9.87.33 available!
Registered MACHIN3tools 1.0.2 with 5 tools, 2 pie menus
Registered MESHmachine 0.11.2 with 2 plug libraries
 • plug library: Examples
 • plug library: MyPlugs
RetopoFlow: Initial load
Addon Common: (shaders) GLSL Version: 4.50 NVIDIA
Addon Common: compiling UI shader
Addon Common: batching for shader
Addon Common: UI shader initialized
Addon Common: ########################################
              Loading shader using Shader
RetopoFlow Shader Info: uiShader (25)
  attribs:
  uniforms: uMVPMatrix (23), left (12), right (21), top (22), bottom (7), width (25), height (9), depth (8), margin_left (14), margin_right (15), margin_top (16), margin_bottom (13), padding_left (18), padding_right (19), padding_top (20), padding_bottom (17), border_width (6), border_radius (3), border_left_color (2), border_right_color (4), border_top_color (5), border_bottom_color (1), background_color (0), using_image (24), image_fit (11), image (10)
RetopoFlow git: None
gpustate.gpu_info cannot get shader version!
RetopoFlow options path: C:\Users\norgu\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\RetopoFlow\RetopoFlow_options.json
Addon Common: (bmesh_render) GLSL Version: NVIDIA Corporation, NVIDIA GeForce RTX 3090/PCIe/SSE2, 4.5.0 NVIDIA 522.25, (no shader version)
cgcookie addon: Verbose is enabled
cgcookie addon: Read in JSON settings from file
register_class(...):
Warning: 'BAGAPIE_OT_saveasset_list' does not contain '_UL_' with prefix and suffix
register_class(...):
Warning: 'bagapieassets.ui' does not contain '_PT_' with prefix and suffix
register_class(...):
Warning: 'bagapieasset_assetspie' does not contain '_MT_' with prefix and suffix
Traceback (most recent call last):
  File "C:\Users\norgu\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\node\__init__.py", line 83, in load_post_handler
    bpy.ops.npp.append_all_nodegroups()
  File "D:\Blender Launcher\stable\blender-3.3.1+lts.b292cfe5a936\3.3\scripts\modules\bpy\ops.py", line 113, in __call__    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.npp.append_all_nodegroups.poll() failed, context is incorrect
blenderkit updater: Running background check for update
blenderkit addon: Starting background checking thread
blenderkit addon: Checking for update now in background
blenderkit addon: Checking for update function
blenderkit addon: Read in JSON settings from file
blenderkit addon: Determined it's not yet time to check for updates
blenderkit addon: Aborting check for updated, check interval not reached
blenderkit addon: Finished check update, doing callback
blenderkit addon: Running background update callback
blenderkit addon: BG thread: Finished check update, no callback
blenderkit INFO: Daemon server starting on address http://127.0.0.1:62485, log file for errors located at: C:\Users\norgu\blenderkit_data\daemon/daemon-62485.log [22:58:51.332, reports.py:41]
blenderkit INFO: Daemon is running! [22:58:51.857, reports.py:41]
blenderkit INFO: Connected to www.blenderkit.com [22:58:51.857, reports.py:41]
geonom commented 1 year ago

Am on Blender 3.2.2 - though just by incident.

geonom commented 1 year ago

For me the URL always was something like 127.0.0.1:xxxxx - not sure, why it would be different from yours.

Though it seems my Stable Diffusion 1111 git version is from 36 hours ago approximately.

I'll attach the zipped download in case it helps.

stable-diffusion-webui-master(4).zip

benrugg commented 1 year ago

@geonom Great to see that it's working for more than just me. And yeah, the 36 hours' old version of Automatic1111 works with my setting for "before Oct 21". Very glad that that's working, too. An install from today should work with the default setting...

@Norgus I have no idea what's going wrong for you... I have errors printed at every possible place I can think of, so if there's nothing in the log, then I don't think it's probably running the post-render hook at all. I will try to give it some more thought...

Norgus commented 1 year ago

@benrugg I tried Blender 3.2.2 stable just in case but no luck there. Interestingly, the addon will kick an error if the local SD isn't running, so I assume it's detecting something or other..

I also just tried selecting the "installed before Oct 21st" option, but no difference. I don't even have windows firewall on so I'm a bit out of ideas.

benrugg commented 1 year ago

@Norgus ok, good info on the fact that it does error if sd isn't running. I'm unfortunately out of ideas, as well, although I'll keep thinking about it. I hate bugs!

I think in general I'll need to find a less brittle way of integrating with Automatic1111. If you know anyone who would like to collaborate/contribute, let me know!

benrugg commented 1 year ago

@Norgus Oh, I also meant to say that 3.0.0-3.3.1 should all work fine

Norgus commented 1 year ago

I tried removing all of my launch arguments on SD and it changes the listening address to say Running on local URL: http://127.0.0.1:7860 (this isn't really how I want to generally run it because it's handy to use over the network and this disables that). It doesn't appear to have influenced the result in blender, though.

geonom commented 1 year ago

This is my webui-user.bat:

@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--share

call webui.bat

It gives me both a local URL and also a gradio.app link - and both work within the blender plugin - just tested both. Strange, that it would not work for you. Not sure, what is going on there as well...

Norgus commented 1 year ago

OK I tried just disabling all of my blender addons except this one, and now at least I get an error message. In blender:

AI Render Error:  The local Stable Diffusion server couldn't be found. It's either not running, or it's running at a different location than what you specified in the add-on preferences. [Get help](https://github.com/benrugg/AI-Render/wiki/Local-Installation)

in SD console:

WARNING:  Invalid HTTP request received.
geonom commented 1 year ago

Can you try this?

https://a127e0a3b166c01f.gradio.app

I'll leave it online for about ten minutes and then stop it to avoid abuse by random internet users ;)

TiagoTiago commented 1 year ago

I haven't studied the code myself yet, so dunno if it's relevant. Would it help if you check how this Krita plugin does it? https://github.com/Interpause/auto-sd-krita

edit: Sorry about the weird grammar edits, I think I might be sleep deprived....

Norgus commented 1 year ago

@geonom thank you, I just realised I tried with the setting on the newest version, has it gummed up? My blender interface has been locked for a couple of minutes so I might give up and kill it.

geonom commented 1 year ago

Interesting - it triggered this in the SD console:

Error completing request
  0%|                                                                                           | 0/22 [00:00<?, ?it/s]Arguments: ('0', 'tree, beautiful portrait, 8k resolution concept art portrait, hyperdetailed, intricately detailed, trending on Artstation, triadic colors, volumetric lighting, soft focus, dynamic lighting', '', 'None') {}
Traceback (most recent call last):
  File "E:\stable-diffusion-webui-master\modules\ui.py", line 212, in f
    res = list(func(*args, **kwargs))
  File "E:\stable-diffusion-webui-master\modules\ui.py", line 137, in save_files
    p = MyObject(data)
  File "E:\stable-diffusion-webui-master\modules\ui.py", line 132, in __init__
    for key, value in d.items():
AttributeError: 'int' object has no attribute 'items'

Traceback (most recent call last):
  File "E:\stable-diffusion-webui-master\venv\lib\site-packages\gradio\routes.py", line 275, in run_predict
    output = await app.blocks.process_api(
  File "E:\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 791, in process_api
    predictions = self.postprocess_data(fn_index, result["prediction"], state)
  File "E:\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 742, in postprocess_data
    if predictions[i] is components._Keywords.FINISHED_ITERATING:
geonom commented 1 year ago

And then it began to work for me again. Not sure, what happened there but it seems like it did not like your input :)

Jitone1 commented 1 year ago

Ok, here's a new version that should work on both Windows and Mac, and with a current install of Automatic1111 (and in theory also older versions, too).

AI-Render-v0-3-2.zip

Let me know if it works for you!

hey I just trying out this 3.3 version and errored. sorry :) I tried to get you as much info as possible but I'm not a programmer. I've the latest version of blender, and windows 10

3-3StableDiffusion

geonom commented 1 year ago

hey I just trying out this 3.3 version and errored. sorry :) I tried to get you as much info as possible but I'm not a programmer. I've the latest version of blender, and windows 10

Hey there :) On my screen you can see an "Advanced: Local Installation" tab in the plugin settings on the left.

There I did two things:

  1. Check the "Enable rendering with Local Stable Diffusion" checkbox
  2. Copied the URL given by Stable Diffusion after starting webui-user.bat into the settings window and then clicked anywhere else in that window to leave the url textbox (otherwise I had issues with the url not being used)

From there it worked for me. See the Stable Diffusion cmd window in the middle for reference.

image

Update: Updated to the 0.3.3 version and it still works...

benrugg commented 1 year ago

@Norgus, I woke up thinking about this, and it suddenly struck me: You're running an older version of Automatic1111. Here's what should make it work for you:

  1. In the Automatic1111 terminal, quit the web ui, then run git pull (must be successful; if it errors, you'll need to do a fresh install) and then run git checkout f49c08e.
  2. Run Automatic1111 again
  3. Set the AI Render preferences to Automatic1111 (Oct 21, 2022 or newer)

Let me know if that works! (Also, I will be working on a less brittle integration next week)

benrugg commented 1 year ago

@TiagoTiago, thank you for posting about that other plugin. I will look into that.

@Jitone1, Blender has a really dumb thing, where it doesn't actually activate a newly installed add-on if you had an older version already running. Restart Blender and you should see a new box in the add-on preferences where you can activate local SD.

benrugg commented 1 year ago

TL;DR For anyone coming here, here are the instructions for how to get local install working: https://github.com/benrugg/AI-Render/wiki/Local-Installation

Hopefully in the near future, it will be a little easier 🤞

Norgus commented 1 year ago

@benrugg I can assure you that my automatic1111 repository was up to date because I include git pull in my webui-user.bat and see it successfully update each time (and then the following checkout hash in the console).

There have been updates since f49c08e now, which didn't help, so I tried checking out f49c08e as reccommended. Unfortunately I still can't seem to get 0.3.3 of AI render to interface with the locally running SD

image image

Commit hash: f49c08ea566385db339c6628f65c3a121033f67c
Installing requirements for Web UI
Launching Web UI with arguments: --xformers
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Loading weights [7eac8788] from C:\Users\norgu\SD_Automatic111\models\Stable-diffusion\f111\f111.ckpt
Applying xformers cross attention optimization.
Model loaded.
2560 1440
1390
Loaded a total of 14 textual inversion embeddings.
Embeddings: centaur_o, coc, cora-tangle, dog-winston_o, dullboy-cari, fileteado-porteno, fireworks-over-water, glow-forrest, huayecai, junji-ito, roy-lichtenstein, spritual-monster_o, ugly-sonic, yoshi_o
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.

image

Doing a render & the 'New Image' buttons don't seem to be causing any errors or any response from the blender CLI or the auto1111 CLI, so I'm at a loss as to how to get more information to troubleshoot.

The third party web-app that accesses the local API is still sort of working (generates the image fine but fails to display it) https://diffusionui.com/b/automatic1111 image

benrugg commented 1 year ago

@Norgus argh, I really thought that would work. I'm not sure what your comfort level is with coding, but you can try adding some debugging lines to print what AI Render is doing in regard to the Automatic1111 request.

Add this to line 53 of automatic1111_api.py in AI Render (you can find the source location in the Add-on preferences):


print("request body:")
print(response.request.body)
print("\n")
print("response body:")
print(response.content)
try:
    print(response.json())
except:
    print("body not json")```

Let me know what that prints for you (it'll be in the System Console window)
Norgus commented 1 year ago

@benrugg I wouldn't call myself a developer but I can kind of hack something simple together given enough time. This is the file you're referring to I think? It seems to be returning your debug text now so presumably I got it right!

C:\Users\norgu\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\AI-Render\sd_backends\automatic1111\automatic1111_api.py

The debug output on render was:

request body:
b'{"data": [0, "beautiful portrait, 8k resolution concept art portrait, hyperdetailed, intricately detailed, trending on Artstation, triadic colors, volumetric lighting, soft focus, dynamic lighting", "", "None", "None", "data:image/png;base64,iVBORw0K... (the base64 encoded image here) ... U5ErkJggg==", null, null, null, "Draw mask", 40, "LMS", 4, "original", false, false, 1, 1, 7.0, 0.699999988079071, 1320222823, -1, 0, 0, 0, false, 512, 512, "Just resize", false, 32, "Inpaint masked", "", "", 0.0001, 0, 0, null, false, "", 0.15, false, "None", null, true, true, "", "", true, 50, true, 1, 0, false, 4, 1, "", 128, 8, ["left", "right", "up", "down"], 1, 0.05, 128, 4, "fill", ["left", "right", "up", "down"], false, false, null, "", "", 64, "None", "Seed", "", "Nothing", "", true, false, false, null, null, null, null, null, null, null, null, null, null], "fn_index": 35}'

response body:
b'{"data":["<span id=\'img2img_progress_span\' style=\'display: none\'>1666471525.2988925</span><p><div class=\'progressDiv\'><div class=\'progress\' style=\\"overflow:visible;width:0%;white-space:nowrap;\\"></div></div></p>",{"visible":false,"__type__":"update"},{"visible":false,"__type__":"update"},{"visible":false,"__type__":"update"}],"is_generating":false,"duration":0.0,"average_duration":0.0}'
{'data': ['<span id=\'img2img_progress_span\' style=\'display: none\'>1666471525.2988925</span><p><div class=\'progressDiv\'><div class=\'progress\' style="overflow:visible;width:0%;white-space:nowrap;"></div></div></p>', {'visible': False, '__type__': 'update'}, {'visible': False, '__type__': 'update'}, {'visible': False, '__type__': 'update'}], 'is_generating': False, 'duration': 0.0, 'average_duration': 0.0}

I guess it actually responded and said it isn't generating?

benrugg commented 1 year ago

@Norgus Ok, cool, we're getting closer. Thanks for working on this with me. Based on the response you got, I tracked down a bug in my code that explains why it wasn't printing an error before. If it didn't get the response it was expecting from Automatic1111, it was supposed to throw an error, but instead it was just failing silently. Attaching a new release that handles the error properly.

Unfortunately, it still doesn't explain why the error is happening in the first place. It's basically just not calling out to Automatic1111 in the right way, but I don't know why. My only guess is still that it's not at the right commit, but I saw in your screenshot that it looks right.

It looks like Automatic1111 should be releasing an actual API endpoint any minute now. If that comes out this week, I'll integrate with it and it should fix all these issues (and make it much more robust for the future).

AI-Render-v0-3-4.zip

Norgus commented 1 year ago

Thanks for being so patient @benrugg I tried checking out f49c08e again and running 0-3-4 and it does spit an error now :) image

I just had the idea that maybe user scripts change some aspect of the expected JSON since there isn't a proper API yet, so I removed all my scripts (I had a few extras that are linked from the auto1111 wiki) and it got sort of closer to talking.

To create a public link, set `share=True` in `launch()`.
Error completing request
Arguments: ('0', 'a sugar cube in the mud, beautiful portrait, 8k resolution concept art portrait, hyperdetailed, intricately detailed, trending on Artstation, triadic colors, volumetric lighting, soft focus, dynamic lighting', '', 'None') {}
Traceback (most recent call last):
  File "C:\Users\norgu\SD_Automatic111\modules\ui.py", line 217, in f
    res = list(func(*args, **kwargs))
  File "C:\Users\norgu\SD_Automatic111\modules\ui.py", line 142, in save_files
    p = MyObject(data)
  File "C:\Users\norgu\SD_Automatic111\modules\ui.py", line 137, in __init__
    for key, value in d.items():
AttributeError: 'int' object has no attribute 'items'

Traceback (most recent call last):
  File "C:\Users\norgu\SD_Automatic111\venv\lib\site-packages\gradio\routes.py", line 275, in run_predict
    output = await app.blocks.process_api(
  File "C:\Users\norgu\SD_Automatic111\venv\lib\site-packages\gradio\blocks.py", line 791, in process_api
    predictions = self.postprocess_data(fn_index, result["prediction"], state)
  File "C:\Users\norgu\SD_Automatic111\venv\lib\site-packages\gradio\blocks.py", line 742, in postprocess_data
    if predictions[i] is components._Keywords.FINISHED_ITERATING:
IndexError: tuple index out of range
benrugg commented 1 year ago

@Norgus ah, I didn't even think about user scripts. It seems like we're so close, but honestly, I don't know what else to try. I think hooking up to a real API should solve everything, so hopefully that will happen very soon.