-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
I don't know if it's possible or not, but what if dream could be directly invoked in python? It would have the form of
def dream(prompt, **config) -> PIL.Image[]where the config kwargs take the same name as in the dream console. config.init_img or config.I would be of instance PIL.Image.
example:
images = dream("A tasty burger", s=100, S=42, C=10, n=4)
new_images = dream("A tasty burger with fries", I=images[0], f=0.6, n=4)
final_image = new_images[0]
final_image.save("out.png")This can help developers who are interested in automating stuff or using Stable Diffusion as part of another project.
From quickly looking over the code, my guess is that T2I.prompt_to_image() needs to be called, which leads me to the guess that:
the module dream_api contains the following functions:
def load_model() # do the things that are done when starting scripts/dream.py until the dream cli is ready
def dream(prompt, **config) -> PIL.Image[]Metadata
Metadata
Assignees
Labels
No labels