A CLI tool for using GLIDE to generate images from text.

Overview

Text-Glided-Diffusion

Installation

First clone this repository:

git clone https://github.com/afiaka87/text-glided-diffusion.git
cd text-glided-diffusion

You also need to install glide-text2im from openai's repository.

python3 -m venv .venv
source .venv/bin/activate
(.venv) git clone https://github.com/openai/glide-text2im.git
(.venv) cd glide-text2im/
(.venv) python -m pip install -e
(.venv) cd ../

Usage

time python tgd.py --prompt "the beach at sunset"
Selected device: cuda:0.
1. Creating model and diffusion.
1. Done.
2. Running base GLIDE text2im model.
2. Base model generations complete. Check glide_outputs/base/the_beach_at_sunset/the_beach_at_sunset.png for generations.
3. Loading GLIDE upsampling diffusion model.
3. Done.
4. Running GLIDE upsampling from 64x64 to 256x256.
4. Done. Check glide_outputs/sr/the_beach_at_sunset/the_beach_at_sunset.png for generations.

real    1m4.775s
user    1m9.648s
sys     0m8.894s

Detailed Usage

usage: tgd.py [-h] --prompt PROMPT [--batch_size BATCH_SIZE] [--guidance_scale GUIDANCE_SCALE] [--base_x BASE_X] [--base_y BASE_Y] [--respace RESPACE] [--prefix PREFIX] [--upsample_temp UPSAMPLE_TEMP]

optional arguments:
  -h, --help            show this help message and exit
  --prompt PROMPT       a caption to visualize
  --batch_size BATCH_SIZE
  --guidance_scale GUIDANCE_SCALE
  --base_x BASE_X       width of base gen. has to be multiple of 16
  --base_y BASE_Y       width of base gen. has to be multiple of 16
  --respace RESPACE     Number of timesteps to use for generation. Lower is faster but less accurate.
  --prefix PREFIX       Output dir for generations. Will be created if it doesn't exist with subfolders for base and upsampled.
  --upsample_temp       0.0 to 1.0. 1.0 can introduce artifacts, lower can introduce blurriness.
You might also like...
dbt-subdocs is a python CLI you can used to generate a dbt-docs for a subset of your dbt project

dbt-subdocs dbt-subdocs is a python CLI you can used to generate a dbt-docs for a subset of your dbt project πŸ€” Description This project is useful if

Python CLI vm manager for remote access of docker images via noVNC
Python CLI vm manager for remote access of docker images via noVNC

vmman is a tool to quickly boot and view docker-based VMs running on a linux server through noVNC without ssh tunneling on another network.

Dead simple CLI tool to try Python packages - It's never been easier! :package:
Dead simple CLI tool to try Python packages - It's never been easier! :package:

try - It's never been easier to try Python packages try is an easy-to-use cli tool to try out Python packages. Features Install specific package versi

Simple CLI tool to track your cryptocurrency portfolio in real time.
Simple CLI tool to track your cryptocurrency portfolio in real time.

Simple tool to track your crypto portfolio in realtime. It can be used to track any coin on the BNB network, even obscure coins that are not listed or trackable by major portfolio tracking applications.

GitFun - A Simplified Automated CLI tool for GITπŸ˜ƒ

GitFun A Simplified Automated CLI tool for GIT, It's for Lazy Developers and Newbies 😜 Table of contents GitFun Installation Usage Development Contri

Hurry is a CLI tool to speed setting up MoniGoMani HyperStrategy & co. #freqtrade #hyperopting #trading #strategy

Hurry is a CLI tool to speed setting up MoniGoMani HyperStrategy & co. #freqtrade #hyperopting #trading #strategy

CPOST is a CLI tool to assist with the proper sizing of Clara Deploy pipelines
CPOST is a CLI tool to assist with the proper sizing of Clara Deploy pipelines

CPOST (Clara Pipeline Operator Sizing Tool) Tool to measure resource usage of Clara Platform pipeline operators Cpost is a tool that will help you run

CLI tool to develop StarkNet projects written in Cairo

β›΅ Nile Navigate your StarkNet projects written in Cairo. Installation pip install cairo-nile Usage Install Cairo Use nile to install a given version o

Comments
  • Missing cog.yaml and predict.py

    Missing cog.yaml and predict.py

    Hey @afiaka87!

    I just noticed you published this model on Replicate. So cool! πŸ¦†πŸš—

    I wanted to check out your implementation here on GitHub, but noticed that the cog.yaml and predict.py files are missing. Are you planning to add those to repo? Let me know if I can help out.

    opened by zeke 3
  • AttributeError: 'SpacedDiffusion' object has no attribute 'plms_sample_loop'

    AttributeError: 'SpacedDiffusion' object has no attribute 'plms_sample_loop'

    Windows 10, Python = 3.8 I tried with different version of torch (and cuda-toolkit) but I'm always getting the same error:

    (pyglide) PS C:\Users\my-name\Downloads\pyglide> python .\tgd.py --prompt "point of no return" --sr
    Using seed 0
    Selected device: cuda:0.
    Creating model and diffusion.
    Done.
    Loading GLIDE upsampling diffusion model.
    Done.
    Running base GLIDE text2im model.
    Traceback (most recent call last):
      File ".\tgd.py", line 178, in <module>
        run()
      File ".\tgd.py", line 122, in run
        low_res_samples = util.run_glide_text2im(
      File "C:\Users\my-name\Downloads\pyglide\util.py", line 179, in run_glide_text2im
        looper = diffusion.plms_sample_loop
    AttributeError: 'SpacedDiffusion' object has no attribute 'plms_sample_loop'
    

    In this case the GPU was being used but I also tried with CPU mode and the same error shows up. Also, the same error was reported by @SomeOrdinaryDude at https://github.com/afiaka87/pyglide/issues/1#issuecomment-1073072852

    opened by illtellyoulater 3
  • even after modifying requirements.txt getting module not found error

    even after modifying requirements.txt getting module not found error

    File "C:\Users\nemo\Desktop\pyglide-main\tgd.py", line 1, in from glide_text2im.download import load_checkpoint ModuleNotFoundError: No module named 'glide_text2im'

    opened by aadhiya 0
Releases(v0.0.1-beta)
Owner
Clay Mullis
Software engineer working with multi-modal deep learning.
Clay Mullis
Python Library and CLI for exporting MySQL databases

expdb Python library and CLI for exporting MySQL databases Installation Pre-requisites MySQL server Python 3.9+ Using git Clone the repository to your

Devansh Singh 1 Nov 29, 2021
Cek Username IG Yang Masih Bisa Dipake

Cek Username IG Cara Install $ pkg update && pkg upgrade $ pkg install python $ pkg install git $ git clone https://github.com/Dekusec/ig-checker $ cd

Deku 3 Nov 28, 2021
Tiny command-line utility for mapping broken keys to other positions.

brokenkey Tiny command-line utility for mapping broken keys to other positions. Installation Clone this repository using git: git clone https://github

0 Oct 04, 2021
This is an app for creating your own color scheme for Termux!

Termux Terminal Theme Creator [WIP] If you need help on how to use the program, you can either create a GitHub issue or join this temporary Discord se

asxlvm 3 Dec 31, 2022
An open-source CLI tool for backing up RDS(PostgreSQL) Locally or to Amazon S3 bucket

An open-source CLI tool for backing up RDS(PostgreSQL) Locally or to Amazon S3 bucket

1 Oct 30, 2021
cli simple python script to interact with iphone afc api based on python library( tidevice )

afcclient cli simple python script to interact with iphone afc api based on python library( tidevice ) installation pip3 install -U tidevice cp afccli

fyst_14 2 Jul 15, 2022
Shortcut-Maker - It is a tool that can be set to run any tool with a single command

Shortcut-Maker It is a tool that can be set to run any tool with a single command Coded by Dave Smith(Owner of Sl Cyber Warriors) Command list πŸ‘‡ pkg

Dave Smith 10 Sep 14, 2022
An interactive aquarium for your terminal.

sipedon An interactive aquarium for your terminal, written using pytermgui. The project got its name from the Common Watersnake, also known as Nerodia

17 Nov 07, 2022
CLTools provides various tools and command to use in the terminal.

CLTools provides various tools and command to use in the terminal. As of date, CLTools is only able to generate temporary email addresses and receive emails. There are plans to integrate more tools a

Ashwin Chugh 2 Feb 14, 2022
Easily handle day to day CLI operation via Python instead of regular Bash programs.

pz Ever wished to use Python in Bash? Would you choose the Python syntax over sed, awk, ...? Should you exactly know what command would you use in Pyt

CZ.NIC 697 Jan 03, 2023
A Multipurpose bot with many Commands made using Pycord

This repo has all of the commands you will ever need in a discord bot. a Multipurpose discord bot

Pogrammar 42 Dec 18, 2022
Bad Apple printed out on the console with Python!

Bad Apple printed out on the console with Python!

CalvinLoke 186 Dec 01, 2022
Dart Version Manager CLI implemented with Python and Typer.

Dart Version Manager CLI implemented with Python and Typer.

EducUp 6 Jun 26, 2022
StackOverflow in your terminal.

how. How do I ...? This project was started to help developers ask more questions. Table of Contents Installation Usage Foss Community Copyright Insta

Ron Nathaniel 2 Jan 31, 2022
🐾 Get the nftables counters easier to read

nft-stats Get the nftables counters easier to read It kind of hard to read the output of nft list ruleset so there is a small program parcising the ou

7 Oct 08, 2022
A 3D engine powered by ASCII art

3D engine powered by ASCII art

Lingdong Huang 48 Nov 16, 2022
This is a tool for managing file notes through the command line

This is a tool for managing file notes through the command line

2 Jun 22, 2022
Play videos in the terminal.

Termvideo Play videos in the terminal (stdout). python main.py /path/to/video.mp4 Terminal size: -x output_width, -y output_height. Default autodetect

Patrick 11 Jun 13, 2022
A minimal todo list for your terminal.

todo A minimal todo list for your terminal. Installation Run the following command. pip install git+https://github.com/piero-vic/todo.git Usage todo

Piero Lescano 7 Aug 08, 2022
Booky - A command line utility for bookmarking files on your terminal!

Booky A command line utility for bookmarking files for quick access With it you can: Bookmark and delete your (aliases of) files at demand Launch them

Pran 1 Sep 11, 2022