Coder Social home page Coder Social logo

diffuse_my_lyrics's People

Contributors

michaelistrofficus avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

diffuse_my_lyrics's Issues

feature requests for the existing library

Hello @MichaelisTrofficus
The library is awesome!

After using the library, I have a few feature requests:

  1. could we embed the lyrics line to the image?

maybe at the bottom of the image,
or the file name keeping the prefix in the numeric order, as it is now (eg: 1_substr_line_one_of_lyrics.png).
this would help the user understand the image and which prompt it was generated from

  1. can we have a new function for string input and inline image output?

besides the existing input via txt file and output as pgn file,
allowing support for string input and image buffer output
this would help the library to be used in dynamic events to feed the function with an input string and get an image output.
the current implementation only allows the library to be used as a background running script.

  1. enable this library to be used outside colab

this point you have already considered in your "next steps". Looking forward to that!

getattr() failing in pipeline_utils.py

I was trying out the code from the sample code snippets from the readme in google colab environment.

here is my sample code:

# Install the latest version of the package
%pip install -U diffuse-my-lyrics

# Import the Lyrics2Images class
from diffuse_my_lyrics import Lyrics2Images

l2i = Lyrics2Images(num_inference_steps=100) # In this case, we are indicating the model to run for 100 steps
l2i.run(input_path="./lyrics.txt", output_path="./out")

full error stack:

TypeError                                 Traceback (most recent call last)
[<ipython-input-9-06e26054323b>](https://localhost:8080/#) in <module>
      3 
      4 l2i = Lyrics2Images(num_inference_steps=100) # In this case, we are indicating the model to run for 100 steps
----> 5 l2i.run(input_path="./lyrics.txt", output_path="./out")

2 frames
[/usr/local/lib/python3.9/dist-packages/diffuse_my_lyrics/lyrics_to_images.py](https://localhost:8080/#) in run(self, input_path, output_path)
     38     def run(self, input_path: str, output_path: str):
     39         verses = parse_lyrics(input_path, self.prompt)
---> 40         pipe = self.load_model_pipeline()
     41 
     42         try:

[/usr/local/lib/python3.9/dist-packages/diffuse_my_lyrics/lyrics_to_images.py](https://localhost:8080/#) in load_model_pipeline(self)
     31 
     32     def load_model_pipeline(self) -> StableDiffusionPipeline:
---> 33         return StableDiffusionPipeline.from_pretrained(self.model_id,
     34                                                        revision=self.revision,
     35                                                        torch_dtype=self.torch_dtype,

[/usr/local/lib/python3.9/dist-packages/diffusers/pipeline_utils.py](https://localhost:8080/#) in from_pretrained(cls, pretrained_model_name_or_path, **kwargs)
    237                         load_method_name = importable_classes[class_name][1]
    238 
--> 239                 load_method = getattr(class_obj, load_method_name)
    240 
    241                 loading_kwargs = {}

TypeError: getattr(): attribute name must be string

I think something is wrong inside pipeline_utils.py -> getattr() function
or the model/dependencies got updated which is causing the issue.
@MichaelisTrofficus could you please look into the issue or suggest to me if I am going wrong somewhere?

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.