Code Monkey home page Code Monkey logo

sd-webui-lua's Introduction

sd-webui-lua

Generate images with Lua scripts in Stable Diffusion webui.

This is an extension for Vlad's SD.next and automatic1111's stable-diffusion-webui to let you run Lua code to generate images (and more?).

Installation

Under Extensions go to Manual install and paste the link to this repository. Click Install.

Usage

It too early to try writing some sort of proper guide. But all functions should be listed if you open up the "Lua Extras..." at the bottom, but the best way to get started is probably by looking in the examples folder and tinker with those. There are also some information in the wiki.

sd-webui-lua

Why?

This project started as a joke, but quickly turned into a fun way to dig into and learn more about the code behind the webui. It also turned out to be a fun tool to generate images in weird ways that normally isn't really possible through the webui. So, is this an amazing tool to help you generate beautiful images? No. But it will probably be fun to play with if you know a little about how Stable Diffusion works, but not enough to be comfortable to write your own code from scratch.

With this extension you can let the webui do the heavy lifting but still have access to poke at things on a fairly low level.

Issues & todo

  • Better css for the poor Code-box.

  • Needs a lot more functions to manipulate/access things. (and a save button/function)

  • Split sd.sample() into more parts.

  • Maybe import the diffusers-library, but I'm not sure how to use that with ckpt/safetensors.

  • More examples to show how things work. (Or actual documentation)

  • More ideas. I'd rather have a PR than a vague Issue. But I'm happy for any input. :)

sd-webui-lua's People

Contributors

yownas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

wdshin

sd-webui-lua's Issues

nice

I feel very interesting,
I need to be very tedious to write in vscode
package.loaded['insert'] = nil
require "insert"
Is there any good plan

after installed the extention, launch error

*** Error loading script: sd-webui-lua.py
Traceback (most recent call last):
File "D:\sd-webui-aki-v4\modules\scripts.py", line 274, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "D:\sd-webui-aki-v4\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "D:\sd-webui-aki-v4\extensions\sd-webui-lua\scripts\sd-webui-lua.py", line 16, in
from modules.shared import opts, cmd_opts, state, log
ImportError: cannot import name 'log' from 'modules.shared' (D:\sd-webui-aki-v4\modules\shared.py)
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

It broke!

The webui is a moving target to be sure, things keep changing and breaking stuff. Currently only the basic hardcoded method in your addon works. When trying to use a processing object it fails with ValueError: An event handler (lua_run) didn't receive enough output values (needed: 3, received: 2).

If you haven't lost all interest in this project, please fix it, it's a great tool for tinkering with image generation and experimenting with crazy novel ideas! All Stable Diffusion nerds in the world depend on you! (Well, at least ONE nerd out there appreciates this wonderful addon and is tearing his hair out trying to figure out what's wrong with it).

Make it work again, pretty please?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.