Giter Club home page Giter Club logo

sygil-webui's Introduction

Web-based UI for Stable Diffusion

Created by Sygil.Dev

Join us at Sygil.Dev's Discord Server Generic badge

Installation instructions for:

Want to ask a question or request a feature?

Come to our Discord Server or use Discussions.

Documentation

Documentation is located here

Want to contribute?

Check the Contribution Guide

Sygil-Dev main devs:

Project Features:

  • Built-in image enhancers and upscalers, including GFPGAN and realESRGAN

  • Generator Preview: See your image as its being made

  • Run additional upscaling models on CPU to save VRAM

  • Textual inversion: Reaserch Paper

  • K-Diffusion Samplers: A great collection of samplers to use, including:

    • k_euler
    • k_lms
    • k_euler_a
    • k_dpm_2
    • k_dpm_2_a
    • k_heun
    • PLMS
    • DDIM
  • Loopback: Automatically feed the last generated sample back into img2img

  • Prompt Weighting & Negative Prompts: Gain more control over your creations

  • Selectable GPU usage from Settings tab

  • Word Seeds: Use words instead of seed numbers

  • Automated Launcher: Activate conda and run Stable Diffusion with a single command

  • Lighter on VRAM: 512x512 Text2Image & Image2Image tested working on 4GB (with optimized mode enabled in Settings)

  • Prompt validation: If your prompt is too long, you will get a warning in the text output field

  • Sequential seeds for batches: If you use a seed of 1000 to generate two batches of two images each, four generated images will have seeds: 1000, 1001, 1002, 1003.

  • Prompt matrix: Separate multiple prompts using the | character, and the system will produce an image for every combination of them.

  • [Gradio] Advanced img2img editor with Mask and crop capabilities

  • [Gradio] Mask painting 🖌️: Powerful tool for re-generating only specific parts of an image you want to change (currently Gradio only)

SD WebUI

An easy way to work with Stable Diffusion right from your browser.

Streamlit

Features:

  • Clean UI with an easy to use design, with support for widescreen displays
  • Dynamic live preview of your generations
  • Easily customizable defaults, right from the WebUI's Settings tab
  • An integrated gallery to show the generations for a prompt
  • Optimized VRAM usage for bigger generations or usage on lower end GPUs
  • Text to Video: Generate video clips from text prompts right from the WebUI (WIP)
  • Image to Text: Use CLIP Interrogator to interrogate an image and get a prompt that you can use to generate a similar image using Stable Diffusion.
  • Concepts Library: Run custom embeddings others have made via textual inversion.
  • Textual Inversion training: Train your own embeddings on any photo you want and use it on your prompt.
  • **Currently in development: Stable Horde integration; ImgLab, batch inputs, & mask editor from Gradio

Prompt Weights & Negative Prompts:

To give a token (tag recognized by the AI) a specific or increased weight (emphasis), add :0.## to the prompt, where 0.## is a decimal that will specify the weight of all tokens before the colon. Ex: cat:0.30, dog:0.70 or guy riding a bicycle :0.7, incoming car :0.30

Negative prompts can be added by using ### , after which any tokens will be seen as negative. Ex: cat playing with string ### yarn will negate yarn from the generated image.

Negatives are a very powerful tool to get rid of contextually similar or related topics, but be careful when adding them since the AI might see connections you can't, and end up outputting gibberish

*Tip: Try using the same seed with different prompt configurations or weight values see how the AI understands them, it can lead to prompts that are more well-tuned and less prone to error.

Please see the Streamlit Documentation to learn more.

Gradio [Legacy]

Features:

  • Older UI that is functional and feature complete.
  • Has access to all upscaling models, including LSDR.
  • Dynamic prompt entry automatically changes your generation settings based on --params in a prompt.
  • Includes quick and easy ways to send generations to Image2Image or the Image Lab for upscaling.

Note: the Gradio interface is no longer being actively developed by Sygil.Dev and is only receiving bug fixes.

Please see the Gradio Documentation to learn more.

Image Upscalers


GFPGAN

Lets you improve faces in pictures using the GFPGAN model. There is a checkbox in every tab to use GFPGAN at 100%, and also a separate tab that just allows you to use GFPGAN on any picture, with a slider that controls how strong the effect is.

If you want to use GFPGAN to improve generated faces, you need to install it separately. Download GFPGANv1.4.pth and put it into the /sygil-webui/models/gfpgan directory.

RealESRGAN

Lets you double the resolution of generated images. There is a checkbox in every tab to use RealESRGAN, and you can choose between the regular upscaler and the anime version. There is also a separate tab for using RealESRGAN on any picture.

Download RealESRGAN_x4plus.pth and RealESRGAN_x4plus_anime_6B.pth. Put them into the sygil-webui/models/realesrgan directory.

LSDR

Download LDSR project.yaml and model last.cpkt. Rename last.ckpt to model.ckpt and place both under sygil-webui/models/ldsr/

GoBig, and GoLatent (Currently on the Gradio version Only)

More powerful upscalers that uses a separate Latent Diffusion model to more cleanly upscale images.

Please see the Post-Processing Documentation to learn more.


Original Information From The Stable Diffusion Repo:

Stable Diffusion

Stable Diffusion was made possible thanks to a collaboration with Stability AI and Runway and builds upon our previous work:

High-Resolution Image Synthesis with Latent Diffusion Models Robin Rombach*, Andreas Blattmann*, Dominik Lorenz, Patrick Esser, Björn Ommer

CVPR '22 Oral

which is available on GitHub. PDF at arXiv. Please also visit our Project page.

Stable Diffusion is a latent text-to-image diffusion model. Thanks to a generous compute donation from Stability AI and support from LAION, we were able to train a Latent Diffusion Model on 512x512 images from a subset of the LAION-5B database. Similar to Google's Imagen, this model uses a frozen CLIP ViT-L/14 text encoder to condition the model on text prompts. With its 860M UNet and 123M text encoder, the model is relatively lightweight and runs on a GPU with at least 10GB VRAM. See this section below and the model card.

Stable Diffusion v1

Stable Diffusion v1 refers to a specific configuration of the model architecture that uses a downsampling-factor 8 autoencoder with an 860M UNet and CLIP ViT-L/14 text encoder for the diffusion model. The model was pretrained on 256x256 images and then finetuned on 512x512 images.

*Note: Stable Diffusion v1 is a general text-to-image diffusion model and therefore mirrors biases and (mis-)conceptions that are present in its training data. Details on the training procedure and data, as well as the intended use of the model can be found in the corresponding model card.

Comments

BibTeX

@misc{rombach2021highresolution,
      title={High-Resolution Image Synthesis with Latent Diffusion Models},
      author={Robin Rombach and Andreas Blattmann and Dominik Lorenz and Patrick Esser and Björn Ommer},
      year={2021},
      eprint={2112.10752},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

sygil-webui's People

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  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  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  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  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  avatar  avatar

sygil-webui's Issues

gradio module error? post the details of your setup here

operating system:

version (10, 11 etc), build (21h2 etc)
language
do you have git4windows installed?

conda

did you install as all users?
if you answered yes, are you sure?

stable-diffusion repo

directory location
directory listing (dir /b from cmd or cmd /c dir /b from powershell)
first line of environment.yaml
did the stable-refusion repo exist previously? or was it a fresh clone (as in the stable-diffusion directory did not exist at all until you did git clone or downloaded the zip)
did you git clone or did you download the zip

launching

run webui.cmd from cmd/powershell
post the output from the line where you ran it to the first gradio error (do not post the repeated error messages... just once is fine)

Requested information could change, if you are asked to please post it again with the extra information

Support of Img2Img cropping

Hello! Loving the UI so far. Would it be possible to add cropping of the init image before generation as seen in other Gradio stable diffusion UIs?

image

GPU memory monitoring causes divide by zero error when there is no NVIDIA GPU

When using a non-NVIDIA platform like AMD ROCm to run the webui script, the memory management code throws an exception when trying to initialize pynvml (pynvml.nvmlInit())

This would normally be harmless, but because the default value for the total memory is 0, this causes a divide by zero error when the value is used to calculate final formatted string.

RealESRGAN integration

Integration with RealESRGAN, for "simpler" upscaling jobs.
I've already got an implementation here.
It's based on henk's fork, so I need to move it over to this fork, along with some minor improvements.

Disable Telemetry

Gradio sends telemetry by default, adding analytics_enabled=false to the Interface definition disables this.
However I am not sure if it also works in the current way the WebUI is setup with "gradio.Blocks" demo.

demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label", analytics_enabled=false)

see: https://gradio.app/docs/

I also saw one of the older gradio interfaces connect to an amazon ec2 instance, possibly there's more telemetry to be disabled.

Conflict

If 2 devices are connected to the web ui, and they both submit a prompt, the first one gets interrupted and gives a memory allocation error

Caught in error loop

When running webui.cmd, the dependencies are installed, but the it is stuck in this loop:

Relauncher: Launching...
Traceback (most recent call last):
  File "C:\Users\abc\Desktop\sd-w\scripts\webui.py", line 2, in <module>
    import gradio as gr
ModuleNotFoundError: No module named 'gradio'
Relauncher: Process is ending. Relaunching in 0.5s...
Relauncher: Launching...
        Relaunch count: 1
Traceback (most recent call last):
  File "C:\Users\abc\Desktop\sd-w\scripts\webui.py", line 2, in <module>
    import gradio as gr
ModuleNotFoundError: No module named 'gradio'
Relauncher: Process is ending. Relaunching in 0.5s...
Relauncher: Launching...
        Relaunch count: 2
Traceback (most recent call last):
  File "C:\Users\abc\Desktop\sd-w\scripts\webui.py", line 2, in <module>
    import gradio as gr
ModuleNotFoundError: No module named 'gradio'
Relauncher: Process is ending. Relaunching in 0.5s...
Relauncher: Launching...
        Relaunch count: 3
Traceback (most recent call last):
  File "C:\Users\abc\Desktop\sd-w\scripts\webui.py", line 2, in <module>
    import gradio as gr
ModuleNotFoundError: No module named 'gradio'
Relauncher: Process is ending. Relaunching in 0.5s...
Relauncher: Launching...
        Relaunch count: 4
Traceback (most recent call last):
  File "C:\Users\abc\Desktop\sd-w\scripts\webui.py", line 2, in <module>
    import gradio as gr
ModuleNotFoundError: No module named 'gradio'
Relauncher: Process is ending. Relaunching in 0.5s...
Relauncher: Launching...
        Relaunch count: 5
Traceback (most recent call last):
  File "C:\Users\abc\Desktop\sd-w\scripts\webui.py", line 2, in <module>
    import gradio as gr
ModuleNotFoundError: No module named 'gradio'
Relauncher: Process is ending. Relaunching in 0.5s...
Traceback (most recent call last):
  File "C:\Users\abc\Desktop\sd-w\scripts\relauncher.py", line 11, in <module>
    time.sleep(0.5)

This is printed every two seconds. Is this intentional or a bug?

RealESRGAN CPU support

RealESRGAN causes GPU out of memory crash at the end of each batch. CPU can run RealESRGAN pretty quickly and without reloading models each batch.

Go BIG (Upscaling using Stable Diffusion itself)

GoBIG is an upscaling technique, where a starting image is cut up into sections, and then each of those sections is re-rendered at a higher resolution. Once each section is done, they're all gathered and composited together, resulting in a new image that is 2x the size of the original.

https://github.com/lowfuel/progrock-stable

The main issue is probably adding one more requirement (realesrgan-ncnn-vulkan) and having people complain it doesn't work for them.

Hi there!

Thanks for your work!

Got an issue - pulled last webui.py, but after executing got this
image
error with any setting

Textual inversion error

Hi
This happens when adding a picture to Textual Inversion


Traceback (most recent call last):
  File "C:\Users\esfle\miniconda3\envs\ldc\lib\site-packages\gradio\routes.py", line 247, in run_predict
    output = await app.blocks.process_api(
  File "C:\Users\esfle\miniconda3\envs\ldc\lib\site-packages\gradio\blocks.py", line 641, in process_api
    predictions, duration = await self.call_function(fn_index, processed_input)
  File "C:\Users\esfle\miniconda3\envs\ldc\lib\site-packages\gradio\blocks.py", line 556, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "C:\Users\esfle\miniconda3\envs\ldc\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\Users\esfle\miniconda3\envs\ldc\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "C:\Users\esfle\miniconda3\envs\ldc\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "webui.py", line 702, in txt2img
    output_images, seed, info, stats = process_images(
  File "webui.py", line 440, in process_images
    load_embeddings(fp)
  File "webui.py", line 261, in load_embeddings
    model.embedding_manager.load(fp.name)
  File "C:\Users\esfle\Downloads\stable-diffusion-main\stable3\ldm\modules\embedding_manager.py", line 136, in load
    ckpt = torch.load(ckpt_path, map_location='cpu')
  File "C:\Users\esfle\miniconda3\envs\ldc\lib\site-packages\torch\serialization.py", line 713, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "C:\Users\esfle\miniconda3\envs\ldc\lib\site-packages\torch\serialization.py", line 920, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
[MemMon] Recording max memory usage...

_pickle.UnpicklingError: A load persistent id instruction was encountered,
but no persistent_load function was specified.

Separate directories for samples

Currently all individual samples are saved to the same directory.
I prefer to sort individual samples by prompt.
With previous scripts I simply hardcoded this in.
Is this functionality desirable to more people than just me?
If yes I will do a proper implementation.

embeddings.pt don't work when models are loaded with .half()

embeddings files from textual-inversion notebooks don't work when models are loaded with .half() :

!!Runtime error (txt2img)!!
 Index put requires the source and destination dtypes match, got Half for the destination and Float for the source.

Issue with outside access

Something has changed with how a public IP can work with Gradio.

With (share=True) turned on or if I turn it off and just allow anyone from outside to call upon my public IP:7860.

Sometimes you can press the submit button and SD will start sampling and you can see this in Condra, other times and most of the time submit does absolutely nothing. I tried other browsers and devices too.

If you go locally via the LAN to your computer or just the local host, it works just fine.

This was something that just started happening with the newer version.

I've tried removing and cleaning out the environment and reinstalling, but the same issue persists.

Also, Is there any way we can create a simple password challenge? I would like to allow my close friends access via public, but obviously, keep out anyone that could try to put images on my computer that may not be appropriate. I'm not talking about going all crazy SSL, but just something small that I could put in the webui.py. Just to make it a little harder.

Thanks,

Loopback should have the option to randomize seed

Loopback would be way more useful if it also randomized the seed on each loop (or incremented the seed). When it is stuck on the same seed the image will rapidly degrade. Adding this option would be very useful.

Error using textual_inversion checkpoints

I am currently using Colab Pro (assigned a T4 while experiencing these issues) and am getting an error when attempting to generate an image while I have a textual inversion checkpoint uploaded. The error is:
Index put requires the source and destination dtypes match, got Half for the destination and Float for the source

All other functions are working perfectly as long as I haven't uploaded a checkpoint.

img2img crop error

I can't completely reproduce it, but when using img2img right now I sometimes/often get this error:

  File "C:\tools\Miniconda\envs\ldo\lib\site-packages\gradio\routes.py", line 247, in run_predict
    output = await app.blocks.process_api(
  File "C:\tools\Miniconda\envs\ldo\lib\site-packages\gradio\blocks.py", line 639, in process_api
    processed_input = self.preprocess_data(fn_index, raw_input, state)
  File "C:\tools\Miniconda\envs\ldo\lib\site-packages\gradio\blocks.py", line 543, in preprocess_data
    processed_input.append(block.preprocess(raw_input[i]))
  File "C:\tools\Miniconda\envs\ldo\lib\site-packages\gradio\components.py", line 1546, in preprocess
    x, mask = x["image"], x["mask"]
TypeError: string indices must be integers```

Error in readme

When you git clone RealESRGAN, the directory is Real-ESRGAN.
You must rename the directory or modify line 59 of webui.py

parser.add_argument("--realesrgan-dir", type=str, help="RealESRGAN directory", default=('./src/realesrgan' if os.path.exists('./src/realesrgan') else './RealESRGAN'))

by

parser.add_argument("--realesrgan-dir", type=str, help="RealESRGAN directory", default=('./src/realesrgan' if os.path.exists('./src/realesrgan') else './Real-ESRGAN'))

Optimize the memory usage

image
I have a gtx 1060 with 6Gb VRAM. Webui claims almost the whole VRAM and keeps crashing when doing either txt2img or img2img:

!!Runtime error (img2img)!!
 CUDA error: out of memory
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
exiting...calling os._exit(0)

Please optimize the memory usage, so the webui is more stable and not crashing the generarion.

( an example of webui with more stable generation would be basujindal/stable-diffusion, however the drawback is the lack of advanced features )

Nvidia 1660ti green screens

Still looking for a fix for gtx16** series. The problem is, that it doesn't matter what settings i use, i'm always get a green picture instead of the result.
And it happens only if i use web version, if i generate pictures via cmd, i use in the end of command "--precision full" and everything works fine i got the pictures.
If i try to run webui.py with --precision full, i have an error "expected scalar type Half but found Float".
Is it possible to fix this bug and use the web version with gtx16**
It's not a big problem, because i can generate pistures with cmd, but with web it would be a little more convenient :)
grid-00060-1153684867_little_orange_cat

use diffusers

stable diffusion is supported in Hugging Face diffusers including img2img and inpainting now

can use it easily like this

# make sure you're logged in with `huggingface-cli login and pip install diffusers`
from torch import autocast
from diffusers import StableDiffusionPipeline, LMSDiscreteScheduler

lms = LMSDiscreteScheduler(
    beta_start=0.00085, 
    beta_end=0.012, 
    beta_schedule="scaled_linear"
)

pipe = StableDiffusionPipeline.from_pretrained(
    "CompVis/stable-diffusion-v1-3", 
    scheduler=lms,
    use_auth_token=True
).to("cuda")

prompt = "a photo of an astronaut riding a horse on mars"
with autocast("cuda"):
    image = pipe(prompt)["sample"][0]  
    
image.save("astronaut_rides_horse.png")

and here is a colab showing how to use it in a gradio demo: https://colab.research.google.com/drive/1NfgqublyT_MWtR5CsmrgmdnkWiijF3P3?usp=sharing

Gradio not found error loop

Trying to install and getting stuck in a module not found loop.

System info: Windows 11 Pro 64 bit 21H2 22000.856
I have a fresh anaconda install from a few days ago.
I had the previous model installed but installed

I already have the full version of anaconda installed, made sure that the script locations match the paths in webui. I followed instructions closely but every time i try and run webui i get stuck in an error loop:

Traceback (most recent call last):
File "C:\Users\heart\Desktop\DEV\stable-diffusion-main\stable-diffusion-main\scripts\webui.py", line 2, in
import gradio as gr
ModuleNotFoundError: No module named 'gradio'
Relauncher: Process is ending. Relaunching in 0.5s...

I have tried 'pip install gradio' before running it, this didnt help either.
help!!

Feature request: In GUI toggle option for optimized version of txt2img, img2img, etc. from Basujindal's fork, or any other optimizations.

Allowing for an in GUI toggle-switch/slider that would allow for larger image generations at the cost of speed would be a good option to have. Or, by optimizing, having faster image generations at normal size would be good as well.

Please check https://github.com/basujindal/stable-diffusion/tree/main/optimizedSD and combine with webui, unless there are better options available.

launch() share with auth fails with an error

Thank you so much for pointing me to the right place. I'm still very new to github.
self.demo.launch(share=True, auth=("username", "password"), show_error=True, server_name='0.0.0.0') results in an error

self.demo.launch(share=True, auth=("username", "password"), show_error=True, server_name='0.0.0.0')
File "C:\Users\Tomoose.conda\envs\ldo\lib\site-packages\gradio\blocks.py", line 921, in launch
raise ValueError(
ValueError: Cannot queue with encryption or authentication enabled.

Scripts for batch prompt processing

Once the specification of settings via YAML is on master I plan to write CLI scripts for automatically processing large amounts of prompts/settings.
If other people are also interested in these scripts I'll write Python scripts and document them.
If there is no interest I will simply hack something together for my personal use.

Cancel current job/generation

Hi :)

Is there a button that cancels the current generation that I'm too blind to find? Sometimes I accidentally generate too many images and have to wait forever for it to finish or quit and restart the whole script. It would be really great if there were a button to just straight up cancel the current generation (and maybe - to be extra fancy - display the results that finished generating before cancelling).

Thanks!

CSV file doesn't open properly in some languages

Hi,

Depending on the system language, the default CSV separator can be different from a comma (for example, in French, it is ";" by default). So when we open the log.csv file with Excel on a French system, everything is put into the first column. There is a way to fix this though, by specifying the separator on the first line of the file, like this:

sep=;

So the fix to make the log compatible with all languages is to modify the following code:

writer = csv.writer(file)
if at_start:
                writer.writerow(["sep=,"])
                writer.writerow(["prompt", "seed", "width", "height", "sampler", "toggles", "n_iter", "n_samples", "cfg_scale", "steps", "filename"])

Thank you for your awesome work!

Exception when trying to use img2img

To reproduce:

  1. Launch script.
  2. Open in web browser, switch to img2img tab.
  3. Type in any random prompt without touching anything else.
  4. Press "Generate" button.

This results in the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/gradio/routes.py", line 247, in run_predict
    output = await app.blocks.process_api(
  File "/usr/lib/python3.10/site-packages/gradio/blocks.py", line 639, in process_api
    processed_input = self.preprocess_data(fn_index, raw_input, state)
  File "/usr/lib/python3.10/site-packages/gradio/blocks.py", line 543, in preprocess_data
    processed_input.append(block.preprocess(raw_input[i]))
  File "/usr/lib/python3.10/site-packages/gradio/components.py", line 1546, in preprocess
    x, mask = x["image"], x["mask"]
TypeError: string indices must be integers

Manifestation is different when using this PR #29 but the effect and steps to reproduce are the same.

Need step by step tutorial on how to make Real Esrgan working

1

I pull the realesrgan git and save it to src/realesrgan, but currently this error msg pops out. Do i have to install Real Esrgan elsewhere, then copy the folder back inside the SD folder? a bit confused.

A fool-proof tutorial on how to do that would be awesome for us none coder lol! Thank you dev

"string indices must be integers" when running image 2 image on default settings

Trying to use image-to-image tab in webui if you try to use the Editor mode crop which is the default this is the error you get:

Traceback (most recent call last):
  File "Miniconda3\envs\ldm\lib\site-packages\gradio\routes.py", line 248, in run_predict
    output = await app.blocks.process_api(
  File "Miniconda3\envs\ldm\lib\site-packages\gradio\blocks.py", line 641, in process_api
    processed_input = self.preprocess_data(fn_index, raw_input, state)
  File "Miniconda3\envs\ldm\lib\site-packages\gradio\blocks.py", line 545, in preprocess_data
    processed_input.append(block.preprocess(raw_input[i]))
  File "Miniconda3\envs\ldm\lib\site-packages\gradio\components.py", line 1546, in preprocess
    x, mask = x["image"], x["mask"]
TypeError: string indices must be integers

Looking a bit deeper seems to be the one of the image editors from gradio is in "sketch" tool mode but the data it has is just the name of the file, that is part of "select" mode

Expose server to LAN

At the moment I can figure out how to use it on localhost, and via gradio link by adding share=True. Is there an option to just use my local ip?

globbing incompatible with square brackets

I implemented globbing to determine the indices of samples.
But I just realized that globbing is incompatible with prompts that contain square brackets because square brackets have a special meaning.
Solutions would be to either remove them from the filename or to just use os.listdir and a loop/list expression.

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.