GithubHelp home page GithubHelp logo

zenafey / prodiapy Goto Github PK

View Code? Open in Web Editor NEW
19.0 3.0 7.0 875 KB

Python module for using Stable Diffusion Prodia API

Home Page: https://prodiapy.notion.site/Quick-start-b91c7da3918342e6b2d5748e96e68a74

License: MIT License

Python 100.00%
ai imagine prodia python python3 sd stable-diffusion prodiapy

prodiapy's Introduction

Description

prodiapy is an unofficial lightweight Python package for Prodia Stable Diffusion API

Pre-requirements

The minimal ver. of Python supported by this package is 3.8.10

Installation

pip install prodiapy

text2img example

from prodiapy import Prodia

prodia = Prodia(
    api_key="YOUR_PRODIA_KEY"
)

job = prodia.sd.generate(prompt="cat")
result = prodia.wait(job)

print(result.image_url)

Contact

Join our discord to get help with package - https://discord.gg/7NbzdD6qg8

prodiapy's People

Contributors

raymerjacque avatar zenafey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

prodiapy's Issues

Async Class

Why is there an async class when its using request and not aiohttp?
There is no point, because request is still blocking.

The current library creates images in small sizes.

This code used to work but now it doesn't.
Small size images are downloaded with the current library code.
In the code I gave, 1024x1024 images could previously be downloaded.
How can I solve this problem?

from prodiapy import StableDiffusionXL

def resimcek(prodia_apikey, sorgu): while True: try: pipe = StableDiffusionXL( api_key=prodia_apikey ) job = pipe.generate(prompt=sorgu) result = pipe.wait_for(job) image = result['imageUrl'] image1 = image.startswith("https://") if bool(image) and bool(image1): return image else: print("Resim Çekilemedi. 5 Saniye Sonra Tekrar Denenecek") sleep(5) except Exception as e20: print("Prodia Hata Alındı. Tekrar Denenecek. Hata Kodu e20: "+str(e20)) yaz = open("log.txt", "a", encoding="utf-8") yaz.write("Prodia Hata Alındı. Tekrar Denenecek. Hata Kodu e20: "+str(e20)+"\n") yaz.close() sleep(5)

Request for Compatibility with Lower Python Versions

Dear ProdiaPy Developers,

I am currently using your ProdiaPy library for a project, and I find it very useful. However, I am encountering a problem due to my Python environment. I am using Python version lower than 3.10 (3.8.17), and it seems that your library uses the match statement, which is a feature introduced in Python 3.10.

Unfortunately, upgrading my Python version is not an option for me at the moment due to various reasons. I was wondering if it would be possible for you to provide a version of ProdiaPy that is compatible with lower Python versions, or if there is a workaround that you could suggest.

I understand that this might require additional work, but it would be greatly appreciated. Thank you for your time and consideration.

Best Regards,
NowLoadY

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.