luna

text to image generation with stable diffusion

https://github.com/slowy07/luna

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.8%) to scientific vocabulary

Keywords

artificial-intelligence python stable-diffusion text-to-image
Last synced: 6 months ago · JSON representation ·

Repository

text to image generation with stable diffusion

Basic Info
  • Host: GitHub
  • Owner: slowy07
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 16.4 MB
Statistics
  • Stars: 64
  • Watchers: 3
  • Forks: 12
  • Open Issues: 1
  • Releases: 1
Topics
artificial-intelligence python stable-diffusion text-to-image
Created over 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme Contributing Funding License Citation

README.md

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 git@github.com: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 ```python from stablediffusiontensorflow.stable_diffusion import StableDiffusion

generator = StableDiffusion(imgheight=512, imgwidth=512, jitcompose=False) img = generator.generate( "DSLR photograph of an astronut riding a horse", numsteps = 50, unconditionalguidancescale = 75, temperature = 1, batch_size = 1, ) ```

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

python 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"

Owner

  • Name: arfy slowy
  • Login: slowy07
  • Kind: user
  • Location: Indonesia
  • Company: @google

love about quantum computing and artificial intelligence

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Arfy"
  given-names: "Slowy"
title: "Luna"
version: 1.0.0
date-released: 2022-11-09
url: "https://github.com/slowy07/luna"

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 2
  • Total pull requests: 17
  • Average time to close issues: about 15 hours
  • Average time to close pull requests: about 12 hours
  • Total issue authors: 2
  • Total pull request authors: 4
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.06
  • Merged pull requests: 16
  • Bot issues: 0
  • Bot pull requests: 5
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • onixldlc (1)
  • zakirkun (1)
Pull Request Authors
  • onixldlc (9)
  • dependabot[bot] (5)
  • mspronesti (1)
  • khairanabila (1)
Top Labels
Issue Labels
good first issue (1)
Pull Request Labels
dependencies (5) build (3) documentation (3) bug (2) enhancement (1) add (1)

Dependencies

requirements.txt pypi
  • Pillow ==9.2.0
  • ftfy ==6.1.1
  • h5py ==3.7.0
  • regex ==2022.9.13
  • tensorflow ==2.10.0
  • tensorflow-addons ==0.18.0
  • tqdm ==4.64.1
requirements_m1.txt pypi
  • Pillow ==9.2.0
  • ftfy ==6.1.1
  • h5py ==3.7.0
  • protobuf ==3.19.5
  • regex ==2022.9.13
  • tensorflow-macos ==2.10.0
  • tensorflow-metal ==0.6.0
  • tensorflow_addons ==0.17.1
  • tqdm ==4.64.1
.github/workflows/codeql.yml actions
  • actions/checkout v3 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/autobuild v2 composite
  • github/codeql-action/init v2 composite
.github/workflows/dependency-review.yml actions
  • actions/checkout v3 composite
  • actions/dependency-review-action v2 composite
.github/workflows/pythonPostProcessing.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
setup.py pypi