News for hackers. Stuff that matters.
Re:New AI edits images based on text instructions (instructP... by bryced on Saturday January 21, 2023 @11:25PM (#34474271)
This works suprisingly well. Just give it instructions like "make it winter" or "remove the cars" and the photo is altered.

Here are some examples of transformations it can make: Golden gate bridge: https://raw.githubusercontent.com/brycedrennan/imaginAIry/ma... Girl with a pearl earring: https://raw.githubusercontent.com/brycedrennan/imaginAIry/ma...

I integrated this new InstructPix2Pix model into imaginAIry (python library) so it's easy to use for python developers.

Re:New AI edits images based on text instructions (instructP... by perfopt on Sunday January 22, 2023 @05:39AM (#34476065)
How does this work? When I run it on a machine with a GPU (pytorch, CUDA etc installed) I still see it downloading files for each prompt. Is the image being generated on the cloud somewhere or on my local machine? Why the downloads?
Re:New AI edits images based on text instructions (instructP... by bryced on Sunday January 22, 2023 @05:48AM (#34476109)
Shouldn't be downloads per prompt. Processing happens on your machine. It does download models as needed. A network call per prompt would be a bug.
Re:New AI edits images based on text instructions (instructP... by perfopt on Sunday January 22, 2023 @05:55AM (#34476153)
OK. I noticed that the images are not accurate when I give my own descriptions. Not sure if this is a limitation of Stable Diffusion. For example, for the text "cat and mouse samurai fight in a forest, watched by a porcupine" I got a cat and a mouse (with a cat's face and tail!!) in a forest sort of fighting. But no - porcupine

Thank you for creating this.

Re:New AI edits images based on text instructions (instructP... by bryced on Sunday January 22, 2023 @06:04AM (#34476209)
yes stable diffusion is not great about handling multiple ideas. New image models coming out soon though.
Re:New AI edits images based on text instructions (instructP... by perfopt on Sunday January 22, 2023 @06:00AM (#34476187)
I keep seeing this even when the prompt is unchanged

Downloading https://huggingface.co/runwayml/stable-diffusion-v1-5/resolv... from huggingface Loading model /home/hrishi/.cache/huggingface/hub/models--runwayml--stable-diffusion-v1-5/snapshots/889b629140e71758e1e0006e355c331a5744b4bf/v1-5-pruned-emaonly.ckpt onto cuda backend...

followed by a download

Re:New AI edits images based on text instructions (instructP... by bryced on Sunday January 22, 2023 @06:03AM (#34476206)
That is strange. I'm not sure what would cause that unless it was running in some ephemeral environment. What OS? Can you open a github issue with a screenshot?
Re:New AI edits images based on text instructions (instructP... by perfopt on Sunday January 22, 2023 @06:19AM (#34476293)
Ubuntu 22.04.1 LTS. I'll file a issue
Re:New AI edits images based on text instructions (instructP... by bryced on Sunday January 22, 2023 @02:37PM (#34481418)
Oh I see what you're saying. It's not actually downloading but there is a bug where it's not using the cache properly. will fix
Re:New AI edits images based on text instructions (instructP... by searchableguy on Sunday January 22, 2023 @10:01AM (#34477974)
Is there a way to pre-download all models? I want to create a docker image and cache the models.
Re:New AI edits images based on text instructions (instructP... by bryced on Sunday January 22, 2023 @06:20AM (#34476305)
Here is a colab you can try it in. It crashed for me the first time but worked the second time. https://colab.research.google.com/drive/1rOvQNs0Cmn_yU1bKWjC...
Re:New AI edits images based on text instructions (instructP... by Tenoke on Sunday January 22, 2023 @08:02AM (#34476947)
Huh, I'm trying it now and the results seem so weak compared to any other model I've seen since dall-e.
Re:New AI edits images based on text instructions (instructP... by la64710 on Sunday January 22, 2023 @09:01AM (#34477459)
Hmm that’s true for me too. Not sure if it is due to resource constraint. I had a picture of a car in indoor parking lot with walls and pillars. When I prompted “Color the car blue” the whole image was drenched in a tint of blue. Similarly when prompted “make a hummingbird hover” … the hummingbirds were a patch of shiny colors with an shape that sort of looked like an hummingbird but not like a real one.
Re:New AI edits images based on text instructions (instructP... by menzoic on Sunday January 22, 2023 @09:18AM (#34477610)
Try "turn the car blue"
Re:New AI edits images based on text instructions (instructP... by bryced on Sunday January 22, 2023 @11:07AM (#34478715)
Does dalle do prompt based photo edits now?

But yeah sometimes it doesn't follow directions well. I haven't noticed a pattern yet for why that is.

Re:New AI edits images based on text instructions (instructP... by Damirakyan on Sunday January 22, 2023 @01:56PM (#34480929)
How would I upgrade to 2.1 if running locally?
Re:New AI edits images based on text instructions (instructP... by bryced on Sunday January 22, 2023 @02:11PM (#34481132)
If you're wanting to use Stable Diffusion 2.1 with imaginairy you just specify the model with `--model SD-2.1` when running the `aimg imagine` command.
Re:New AI edits images based on text instructions (instructP... by dang on Sunday January 22, 2023 @02:26PM (#34481317)
Sorry for the offtopicness but could you please email me at [email protected]? (I have an idea/possibility for you. Nothing that couldn't be posted here in principle but I'd rather not take the thread off topic.)
Re:New AI edits images based on text instructions (instructP... by Jerrrry on Monday January 23, 2023 @11:36AM (#34491063)
This was an uncanny comment, somehow.

Hope ya'll brainstorming session is fruitful.

Re:New AI edits images based on text instructions (instructP... by dang on Monday January 23, 2023 @01:54PM (#34493230)
Sorry for the uncanning! My thought was simply to connect the OP with a YC partner in case they wanted to explore doing this as a startup.

I send such emails all the time but on semi-rare occasions have to resort to offtopic pleas like the GP.

I hope that helps clear things up!

Re:New AI edits images based on text instructions (instructP... by Jerrrry on Monday January 23, 2023 @04:51PM (#34495601)
It does, thank you!
Re:New AI edits images based on text instructions (instructP... by cbeach on Sunday January 22, 2023 @04:44PM (#34482556)
EDIT - it's free of charge: https://research.google.com/colaboratory/faq.html

---

First time I've used "colab" - looks great. Out of interest, who pays for the compute used by this?

Is it freely offerred by Google? Or is it charged to my Google API account when I use it? Or your account? It wasn't clear in the UI.

Re:New AI edits images based on text instructions (instructP... by LewisVerstappen on Monday January 23, 2023 @05:33AM (#34487290)
Freely offered by Google. They offer a subscription model if you want to run your collab notebooks on a beefier machine.
Re:New AI edits images based on text instructions (instructP... by iuiz on Monday January 23, 2023 @08:46AM (#34488640)
I could not get the first cell to run.

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. tensorflow 2.9.2 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.3 which is incompatible. tensorboard 2.9.1 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.3 which is incompatible.

Re:New AI edits images based on text instructions (instructP... by bryced on Monday January 23, 2023 @09:13AM (#34488927)
I believe you can just ignore that error. The cell ran.
Re:New AI edits images based on text instructions (instructP... by TeMPOraL on Sunday January 22, 2023 @06:41AM (#34476431)
> Here are some examples of transformations it can make: Golden gate bridge:

I'm on mobile so can't try this myself now. Can it add a Klingon bird of prey flying under the Golden Gate Bridge, and will "add a Klingon bird of prey flying under the Golden Gate Bridge" prompt/command be enough?

Re:New AI edits images based on text instructions (instructP... by wongarsu on Sunday January 22, 2023 @02:34PM (#34481396)
No. At least not with the Stable Diffusion 1.5 checkpoint used in the colab notebook. It seems to only have a very vague idea of what a Klingon bird of prey is. The best I could get in ~30 images was [1], and that's with slight prompt tweaks and a negative prompt to discourage falcons and eagles.

1: https://i.imgur.com/gDj2Kn4.png

Re:New AI edits images based on text instructions (instructP... by xwdv on Sunday January 22, 2023 @08:20AM (#34477071)
How about “fix the hands”?
Re:New AI edits images based on text instructions (instructP... by social_quotient on Sunday January 22, 2023 @09:36AM (#34477746)
The hands issue is going to be an awesome story for all of us in 10-20 years. The younger generation just won’t fathom how hard it was to get proper hands. I wonder what a parallel comparable now would be? Something the slightly technical general public just can’t wrap their head around why it was complicated “back then”.

Maybe todays example is a smart voice assistant like Alexa.

Re:New AI edits images based on text instructions (instructP... by xwdv on Sunday January 22, 2023 @10:52AM (#34478544)
Or maybe it will never be fixed, and in the future when they are trying to determine if someone is a human or an artificial replica, they will simply ask them to draw a set of human hands as a test.
Re:New AI edits images based on text instructions (instructP... by mensetmanusman on Sunday January 22, 2023 @12:35PM (#34479906)
Someone needs to redo the blade runner scene with SD with the hands question :)
Re:New AI edits images based on text instructions (instructP... by AlecSchueler on Sunday January 22, 2023 @12:51PM (#34480113)
Most humans would struggle to draw human hands as well.
Re:New AI edits images based on text instructions (instructP... by lgas on Sunday January 22, 2023 @12:49PM (#34480077)
Well, this already uses this default negative prompt https://github.com/brycedrennan/imaginAIry/blob/master/imagi... so it may fix the hands automatically.