Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written) OpenAssistant Conversations (oasst2)
How would I make a procedurally generated desktop background on Linux?
In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
- User
How would I make a procedurally generated desktop background on Linux?
- Assistant
Here's a script to do so:
import numpy as np from PIL import Image def generate_background(): # Generate a random array of RGB values rgb = np.random.randint(0, 256, size=(1080, 1920, 3), dtype=np.uint8) # Create an image from the array img = Image.fromarray(rgb) # Save the image to disk img.save("background.jpg") # Set the image as your desktop background # Replace "feh" with your preferred tool for setting the desktop background # on your Linux system !feh --bg-fill background.jpg if __name__ == "__main__": generate_background() - User
This just generates random noise.
Could you provide a procedural generation algorithm that will generate a mountain terrain with blue skies dotted with white, fluffy clouds?
- Assistant
Here is a program to generate images based on your custom prompt "a mountain terrain with blue skies dotted with white, fluffy clouds".
- Install packages on your selected python interpreter
pip install diffusers==0.12.1 torch==1.13.1- Now we are ready to create a stable diffusion pipeline
import torch as T from difusers import StableDiffusionPipeline as SDP # define pipeline and prompt prompt = "a mountain terrain with blue skies dotted with white, fluffy clouds" pipeline = SDP.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=T.float16) pipeline = pipeline.to("cuda")- use the instantiated pipeline object to generate an image and save it in the current directory
# generate and save image image = pipeline(prompt).images[0] image.save("./" + prompt + ".png")This program uses runwayml/sable-diffusion-v1-5 from huggingface and is implemented in torch, if you want me to switch to different versions please let me know !
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →