Code Monkey home page Code Monkey logo

Comments (5)

 avatar commented on August 27, 2024 4

I second this, and would love for the tool to be able to generate multiple images automatically with different seed values so we can pick and choose the best ones. This is especially relavant on CPU since I typically leave SD running in the background while it generates and come back to it later.

I'll leave here the quick and dirty bash script I currently use to create multiple iterations (appending the seed to the filename) if anyone's interested.

#! /bin/bash

PROMPT="<prompt>"
STEPS=<inference steps>
GUID=<guidance>
STR=<strength>
INIT="<input image>"
OUTDIR="<output directory>"
ITER=<number of images to generate>

for ((i=0;i<${ITER};i++))
do
    RANNO=$RANDOM
    python demo.py --prompt "${PROMPT}" --seed ${RANNO} --num-inference-steps ${STEPS} --guidance-scale ${GUID} --strength ${STR} --init-image "${INIT}" --output "${OUTDIR}/output_${RANNO}.png"
done

from stable_diffusion.openvino.

rncar avatar rncar commented on August 27, 2024

The problem using demo.py is the model needs to be reloaded each time.
Would be great to have a way to produce images from the terminal caching the models.

from stable_diffusion.openvino.

IceChes avatar IceChes commented on August 27, 2024

I wonder if you could put most of the Python script into a loop and make the loop repeat for the amount of images you want.

from stable_diffusion.openvino.

rncar avatar rncar commented on August 27, 2024

The web interface does it, so its possible.

Would be great to have some kind of repl to produce images in a interactive way,
a command to render an image, other to change params, etc.

In addition to the interactive behavior, you could do a script that send commands to
the engine, for example, to produce images with differents inference steps, guiadance scales,
outputs names, etc.

from stable_diffusion.openvino.

Drake53 avatar Drake53 commented on August 27, 2024

In my fork it's possible to do multiple prompts without reloading the model every time: Drake53@1862800
It's not as an argument though so you have run every prompt manually or make your own solution for that part, but it does give more freedom in what arguments to use for every prompt (instead of only having different seeds and output filenames).

from stable_diffusion.openvino.

Related Issues (20)

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.