Giter Site home page Giter Site logo

luna's Introduction

luna

luna_banner

This image background generated with stable diffusion luna

code_quality_checking python_post_processing TensorFlow

Stable diffusion is a deep learning, text-to-image model and used to generate detailted images conditioned on text description, thout it can also be applied to other task such as inpainting or outpainting and generate image to image translate guide by text prompt.

try online on google colab:

luna can running on online colab notebook you can check here:

usage for online colab:

  • click the connect

    connect

  • open on runtime and click run all ( ctrl+f9 if using shortcut )

    running

  • online collab running luna

usage

use venv

//create venv
python3 -m venv venv

//activate venv
source venv/bin/activate

clone repo

clone on https :

git clone https://github.com/slowy07/luna
cd luna
pip install -r requirements.txt

clone on ssh :

git clone [email protected]:slowy07/luna.git
cd luna
pip install -r requirements.txt

note : if using mac m1 you can try installing the requirements_m1.txt

run script

python text2image.py --prompt="example text"

to change the output file name run using the --output flag

python text2image.py --prompt="cool picture" --output="cool_pic.png"

install as python package

pip install git+https://github.com/slowy07/luna

and run the package using

from stable_diffusion_tensorflow.stable_diffusion import StableDiffusion

generator = StableDiffusion(img_height=512, img_width=512, jit_compose=False)
img = generator.generate(
  "DSLR photograph of an astronut riding a horse",
  num_steps = 50,
  unconditional_guidance_scale = 75,
  temperature = 1,
  batch_size = 1,
)

you can change dimension of image by change the img_height and img_width

generator = StableDiffusion(
  img_height = 1020 # or change 1080
  img_height = 1080 # or change 800
)

⚠️ NOTE ⚠️

if pip encountered an issue, try running pip with higher privilege using sudo

examples

prompt image
minimalist house with family, mountainous forested wild, concept art illustration minimalistic_house
natural cave wall, dynamic light, mist low over ground, illustration by josan gonzales and moebius, studio muti, malika favre, rhads, makoto, clean thick line, comics style natural_cave
A beautiful ultradetailed anime illustration of a city street, trending on artstation anime_street_ilustration

donate

"Buy Me A Coffee"

luna's People

Contributors

dependabot[bot] avatar khairanabila avatar mspronesti avatar onixldlc avatar slowy07 avatar

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.