News for hackers. Stuff that matters.

carefree0910

Re:Show HN: AI-powered infinite drawboard in Python on Sunday May 14, 2023 @08:08AM (#35937380)
(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!

Show HN: AI-powered infinite drawboard in Python

https://github.com/carefree0910/carefree-drawboard

I released 'AI magics meet Infinite draw board' 6 months ago and received plenty of 'open source the webui codes' requests, so here comes my new project, which aims to build performant, infinite drawboard based web apps in pure Python. If you are familiar with Gradio/Streamlit, this project is kind of infinite-drawboard-powered version of them.I'll leave a brief design...

( Read More... | 1 comment | on HN )
Re:Show HN: AI magics meet Infinite draw board on Monday October 31, 2022 @09:51PM (#33415974)
Of course! I will be more than happy to hear real demands!
Re:Show HN: AI magics meet Infinite draw board on Monday October 31, 2022 @09:14AM (#33405264)
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.

Re:Show HN: AI magics meet Infinite draw board on Monday October 31, 2022 @02:40AM (#33402678)
Yes indeed, my poor cloud server burnt down just now... It should be OK now!
Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @11:05PM (#33401619)
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.
Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @10:37PM (#33401450)
Guess what, I'm actually using the runway inpainting model as the backend of the `Erase & Replace` feature XD!
Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @10:05PM (#33401246)
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!

Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @09:43PM (#33401082)
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!

Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @09:01PM (#33400813)
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...

Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @07:39PM (#33400239)
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!

Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @07:37PM (#33400212)
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!
Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @07:33PM (#33400183)
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!

Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @03:32PM (#33397781)
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.

Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @03:24PM (#33397701)
And BTW, you don't need an account to use this project if I fixed the bug / you visit it on PC!
Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @03:22PM (#33397681)
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!

Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @03:17PM (#33397625)
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)

Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @02:03PM (#33396928)
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.

Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @01:14PM (#33396391)
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!

Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @12:57PM (#33396146)
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!

Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @12:34PM (#33395894)
Thank you so much for pointing out the missing-LICENSE-issue as well, that's really a huge miss from me XD.
Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @12:27PM (#33395836)
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!

Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @12:23PM (#33395793)
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!

Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @12:20PM (#33395768)
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.

Re:Show HN: AI magics meet Infinite draw board on Sunday October 30, 2022 @08:33AM (#33393888)
I have been dreaming of creating things (arts, games, etc.), but that wouldn't be possible because I can hardly draw anything. But now with Stable Diffusion everything is hopeful again, so I further collected the AI magics that I considered necessary in creation activities, and integrated them into an Infinite draw board (like Figma).

Hope that I can hear from you, any advice or suggestions will be really appreciated!