Giter VIP home page Giter VIP logo

txt2dream's Introduction

txt2dream

machine vivid dreams

Requirements

pip install -r requirements.txt --upgrade
if system is not recognizing taming transformers import git clone https://github.com/CompVis/taming-transformers into same folder as txt2dream.py

Usage

Text to image

txt2dream.py / txt2dream.ipynb python txt2dream.py

"""
total iterations = video_length * target_fps
key_frames = True, allows setup such as 10: (Apple: 1| Orange: 0), 20: (Apple: 0| Orange: 1| Peach: 1)
from frame 0 to frame 10 show Apple, from frame 10 to 20 show Orange & Peach
"""

from txt2dream import Text2Image
settings = {
    'key_frames': True,
    'width': 256,
    'height': 256,
    'prompt': '10: (Apple: 1| Orange: 0), 20: (Apple: 0| Orange: 1| Peach: 1)',
    'angle': '10: (0), 30: (10), 50: (0)',
    'zoom': '10: (1), 30: (1.2), 50: (1)',
    'translation_x': '0: (0)',
    'translation_y': '0: (0)',
    'iterations_per_frame': '0: (1)'
    'generate_video': True,
    'video_length': 6, # seconds
    'target_fps': 30,
    'upscale_dream': True,
    'upscale_strength': 2, # available [2, 4] -> 2x or 4x the generated output
}
Text2Image(settings)
Upscale generated images

upscale_dream.py python upscale_dream.py

from upscale_dream import ScaleImage

settings = {
    'input': './vqgan-steps', # './vqgan-steps/0001.png',
    'output': './vqgan-steps-upscaled'
}
ScaleImage(settings)

Examples

gen-vid gen-art

Docker

Coming soon

References

This kind of work is possible because of cool people such as
https://github.com/crowsonkb
https://github.com/justin-bennington/S2ML-Art-Generator
https://github.com/xinntao/Real-ESRGAN
https://github.com/CompVis/taming-transformers
https://github.com/lucidrains/big-sleep
https://github.com/openai/CLIP
https://github.com/hojonathanho/diffusion

txt2dream's People

Contributors

pandas9 avatar

Stargazers

 avatar  avatar

Watchers

 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.