HNHacker News
TopNewBestAskShowJobs

carefree0910

135 karma · joined October 7, 2022

submissionscomments
carefree0910··on Show HN: AI-powered infinite drawboard in Python
(The descriptions below are partially copied from the 'design philosophy' wiki page of my GitHub project)

`carefree-drawboard` made assumptions that:

* It is a painful process to spend time thinking and designing the layout of various UIs.

* Most user interactions can be abstracted into "send something to server" & "receive something to server".

* A completely decoupled system is what we dreamed of, because it can be easily customized, extended and maintained.

* An infinite drawboard is capable of building (almost) all the desired applications.

So, we derived the following design principles:

* Everything is a plugin on an infinite drawboard.

* Plugin Styles should be fully declarative and should contain a smart layout system (which should also be declarative).

* Plugin Logics should only have access to the data from:

> Itself (e.g., some input fields declared by the Styles).

> The selecting Node(s).

Under these principles, no matter what programming languages (even JSON, if your plugins contain no logics) you are using, you can easily extend the functionality of `carefree-drawboard` by writing plugins.

And since:

* We love Python.

So (currently) we provide a python binding, the `cfdraw` package, for you to write plugins (both styles and logics) using Python. However, theoretically speaking, any backend programming languages are able to write plugins that work with `carefree-drawboard`. I've already wrote a brief introduction in the wiki page about this topic, if you are really interested, please check it out and send feedbacks to me!

carefree0910··on Show HN: AI magics meet Infinite draw board
Of course! I will be more than happy to hear real demands!
carefree0910··on Show HN: AI magics meet Infinite draw board
Hi, thank you so much for the valuable advice and information!

If I didn't get you wrong, maybe another project (carefree-learn) meets your needs better: https://github.com/carefree0910/carefree-learn.

This is an old project, with a VERY outdated document, but all the features of carefree-creator can be achieved with one or few lines of code from carefree-learn.

Take the typical text to image feature as an example, here's a piece of minimal-working-codes:

```python

import torch, cflearn

api = cflearn.cv.DiffusionAPI.from_sd("cuda:0", use_half=True)

api.txt2img("a beautiful, fantasy landscape", "out.png") # this will save the generated image to `out.png`

```

And you can install it with `pip install carefree-learn[cv]` XD.

carefree0910··on Show HN: AI magics meet Infinite draw board
Yes indeed, my poor cloud server burnt down just now... But I fixed it so it should be OK now!
carefree0910··on Show HN: AI magics meet Infinite draw board
Coooool! And yes, I'm not sure whether the models can run on the m1 chip, but I think this is more of a PyTorch issue instead of this project XD.
carefree0910··on Show HN: AI magics meet Infinite draw board
Guess what, I'm actually using the runway inpainting model as the backend of the `Erase & Replace` feature XD!
carefree0910··on Show HN: AI magics meet Infinite draw board
Thank you so much for your patience! You experience will definitely help me make this project compatible to the m1 chip systems XD!

And since ONNX is not a forced requirement, maybe the following guides can make things easier:

1. Install `carefree-learn` instead of `carefree-learn[cv]`

2. Install the following packages manually:

ftfy regex lmdb albumentations carefree-cv

> I'll consider removing the `onnx` requirements from the `cv` spec in the near future!

carefree0910··on Show HN: AI magics meet Infinite draw board
That's a ton of great suggestions! I'll try to digest them and use them to guide my future works!

And for your requirement, actually carefree-creator is built to be a stand-alone backend server, so you can indeed customize your own frontend if you like, as I mentioned here (the first point): https://github.com/carefree0910/carefree-creator/issues/11#i...

And if you are interested in customizing carefree-creator itself (like integrating your fancy model into it), I haven't written any documentation yet, but here are some brief guides: https://github.com/carefree0910/carefree-creator/issues/8#is...

Feel free to contact me if you encountered any trouble!

carefree0910··on Show HN: AI magics meet Infinite draw board
I haven't tested on m1 macbook yet, but the Docker solution should be OK...

Here's the onnx-simplifier project: https://pypi.org/project/onnx-simplifier/, looks like it already goes to 0.4.8.

I'll try to reproduce the error, before that maybe you can try the Google Colab solution:

https://colab.research.google.com/github/carefree0910/carefr...

carefree0910··on Show HN: AI magics meet Infinite draw board
It is not designed to generate pixel art, but you can try something like:

a lovely little cat, pixel art.

It will generate something weird, but (maybe) the quality of the generated image will be better with some tweaks!

carefree0910··on Show HN: AI magics meet Infinite draw board
Oh, that looks like a bug... Could you please share the `fidelity` property of your `img2img` process, or share the `AI Parameters` on the right (after you select the generated image) (there should be a little `copy` icon) here? Thanks!
carefree0910··on Show HN: AI magics meet Infinite draw board
I'm so glad that you like it!

Currently the UX is not perfect, and I'll definitely try my best to improve it XD.

Looking forward to your advice and feedbacks!

carefree0910··on Show HN: AI magics meet Infinite draw board
Wow, I'm so glad that you like it so much!

Just as you said, I'm trying to make it a studio-ish product which combines various AI magics, so they can work together and create something that a single AI model can hardly achieve.

Here's my future plan: I'm going to integrate natural language generation, music generation, video generation... Into this project, so you can make something really cool with and only with AI!

And the most important part: it will always be completely open source and free, and (maybe) a Google Colab is enough to serve all these stuffs XD.

carefree0910··on Show HN: AI magics meet Infinite draw board
And BTW, you don't need an account to use this project if I fixed the bug / you visit it on PC!
carefree0910··on Show HN: AI magics meet Infinite draw board
That's exactly what I'm always looking for! Here's the related GitHub issue:

https://github.com/carefree0910/carefree-creator/issues/2

Apart from the technical concerns (huge code base, lack of documentation, etc.), I'm also pretty afraid of someone (or some company) just taking away the codes and make profits or even claim that they make it, because webui codes (especially as production ready as this project) are something that's easy to copy and HARD to protect...

But if more and more people get to know this project, this concern will no longer exist, and I'll definitely open source the webui codes XD!

After all, I do want more and more people to be able to enjoy the current AI magics, for free, and forever!

carefree0910··on Show HN: AI magics meet Infinite draw board
Oops, that's in fact a bug from my side, I'm afraid it's currently only available on PC...

I'll try to fix it ASAP!

(p.s. I personally recommend using this project on PC, because the features on the mobile site are very, very limited XD)

carefree0910··on Show HN: AI magics meet Infinite draw board
Lol maybe I got your meaning!

By saying 'better', I'm not actually 'willing' to become better. In fact, I enjoy drawing even if the outcomes are 'bad'.

The hard part is, when I want to draw something 'concrete', I can't... For example, a story between a boy and a girl - The only thing I can do is to draw two sticks in order to make them consistent frame by frame XD.

So yes, I have to admit that I still want to share my creations with others, and without being better I can hardly do so... I think artists like Picasso are at another level, because they might treat art as their whole life, and might have the ability to focus and only focus on their own arts.

And me, as a normal person, will still need some compliment XD.

carefree0910··on Show HN: AI magics meet Infinite draw board
In fact, I've tried! I bought many books and just cannot get myself better at drawing...

I think you've mentioned something important: I haven't got enough time practicing. Maybe when I have more free time, I'll try to pick up these skills XD!

carefree0910··on Show HN: AI magics meet Infinite draw board
I noticed that they added a `LICENSE-ModelWeights.txt`! Maybe I should dive into their repo deeper and follow their good practices.

Thanks a lot for the advice! It really helps!

carefree0910··on Show HN: AI magics meet Infinite draw board
Thank you so much for pointing out the missing-LICENSE-issue as well, that's really a huge miss from me XD.
carefree0910··on Show HN: AI magics meet Infinite draw board
Of course! But I'm new to HN so I actually don't see any way to post images XD.

I'm also concerned that posting links of my creations will be some sort of spam...

Any advice will be really appreciated!

carefree0910··on Show HN: AI magics meet Infinite draw board
Oops, I thought I've used the MIT License, but it turns out that I have not!

I'm also curious whether I should somehow follow the SD license... But I'm not actually using their codes though...

Any advice will be really appreciated!

carefree0910··on Show HN: AI magics meet Infinite draw board
Yes indeed! In fact, I've already created a Google Colab based server:

https://colab.research.google.com/github/carefree0910/carefr...

Which means you can use the Google Colab as the product's backend, so you can enjoy all the AI magics for free forever XD.