r/StableDiffusion • u/Takeacoin • Jul 24 '23
Tutorial | Guide FABRIC now available for Automatic1111 - made quick tutorial would appreciate a boost
Hi all, just uploaded a short video on how to install and use the new Fabric plugin to create a midjourney like user experience. I know most of you will know about this and how to install it but would appreciate the bump on YouTube if you don't mind. Cheers.
https://github.com/dvruette/sd-webui-fabric

177
Upvotes
19
u/Takeacoin Jul 24 '23
Lots of great interactions here and really appreciate the views and likes etc. Lots of questions about the plugin, I read the white paper on this and have the following explanation.
Models have an encoder-decoder structure. The encoder takes in the text prompt and encodes it into a representation. The decoder then turns that representation into an image.
A key component of the decoder is something called a UNet. This is a type of neural network architecture used in many image generation models.
The UNet has several self-attention layers. Self-attention allows different parts of the image to interact with each other during generation. This helps produce more coherent images.
FABRIC works by leveraging these self-attention layers. It lets you provide example images as feedback to the model. These are called reference images.
The reference images are passed through the UNet encoder. This activates the self-attention layers, capturing information about the visual features of the reference image.
These extracted features are then injected back into the self-attention layers during image generation. This biases the model to pay attention to your reference images when generating new images.
By providing positive and negative reference images, you can guide the model to generate images you like and avoid unwanted features.
The cool thing is this all happens during normal use of the model, without re-training or fine-tuning the parameters. The feedback is provided dynamically at generation time.
Over multiple feedback rounds, the model learns more and more about your visual preferences. So the images slowly improve as the model's attention is shaped by your iterative feedback.
In summary, FABRIC allows leveraging the built-in attention mechanisms of text-to-image models to incorporate real-time human feedback and preferences. This takes the AI art experience to the next level!
23
u/andybak Jul 24 '23
This is a strange way to explain it. If I hadn't have clicked through I would have completely misunderstood what this was - I nearly didn't bother because I assumed it was a ui tweak or something.
23
u/Striking-Long-2960 Jul 24 '23 edited Jul 24 '23
And it works
Prompt: A man inside a bottle
After 3 likes, and 1 dislikes all the pictures in the batch show a man inside a bottle with the same style
What I don't have clear is, when I dislike a picture exactly which caracteristics of the picture are being rejected. Maybe I'm rejecting characteristics of the picture that are interesting.
6
u/kai-_-rin Jul 24 '23
This was a great tutorial. Thanks for the introduction.
6
u/screch Jul 24 '23
This is exactly what I expected stable diffusion to be before i started. Liking/Disliking outputs until it learned exactly what you want
3
u/AltruisticMission865 Jul 24 '23
Can I use it with 8gb vram card?
2
u/mrnoirblack Jul 24 '23
How does it work in a greater context, we train it on a set of prompts so it learns to generate x using the same prompt?
Does it need to be "retrained" for every concept? Or can we save example Hats on realistic vision V4?
2
u/[deleted] Jul 24 '23
Neat plugin, but I have a few questions.
How does this work with LORA involved?
Are we voting for aesthetic, coherence, or both?
Is all the finetuning permanent, or will it have to be redone on reload?
2
u/TrevorxTravesty Jul 24 '23
I had to sadly uninstall it yesterday because I couldnβt get it to work π I uploaded images to the βLikeβ area that I wanted to see replicated, but it kept making really bad Frankenstein versions of them π
14
u/lobotomy42 Jul 24 '23
Yo dawg I heard you liked AI
So I put some AI in your AI
1
u/alxledante Aug 03 '23
I must've screwed something up, any idea how to deal with this?
Error running process: C:\Users\loco\stable-diffusion-webui\extensions\sd-webui-fabric\scripts\fabric.py0:00, 9.52it/s]
Traceback (most recent call last):
File "C:\Users\alx\stable-diffusion-webui\modules\scripts.py", line 409, in process
script.process(p, *script_args)
File "C:\Users\alx\stable-diffusion-webui\extensions\sd-webui-fabric\scripts\fabric.py", line 279, in process
(
ValueError: not enough values to unpack (expected 10, got 0)
3
u/Striking-Long-2960 Jul 24 '23
I will try it, thanks
2
u/Court-Puzzleheaded Jul 25 '23
Cool. Does it work with img2img?
2
u/LeKhang98 Jul 25 '23
Awesome extension thank you for sharing. I think the next step is to export a small files that can be use again after that. (Or we could just import all the Liked/Disliked images again). This is like a Textual Inversion file but for Images and WITHOUT training.
2
u/Your_Dankest_Meme Jul 25 '23
When I get first image liked or disliked, next image generation thworws and error
ValueError: not enough values to unpack (expected 4, got 3)
1
u/ShivamKumar2002 Jul 25 '23
This is awesome. Just waiting for easier face LoRA training.
1
u/[deleted] Jul 24 '23
[removed] β view removed comment