1676894892
Official implementation of T2I-Adapter: Learning Adapters to Dig out More Controllable Ability for Text-to-Image Diffusion Models.
We propose T2I-Adapter, a simple and small (~70M parameters, ~300M storage space) network that can provide extra guidance to pre-trained text-to-image models while freezing the original large text-to-image models.
T2I-Adapter aligns internal knowledge in T2I models with external control signals. We can train various adapters according to different conditions, and achieve rich control and editing effects.
Put the downloaded models in the T2I-Adapter/models
folder.
sd-v1-4.ckpt
file.anything-v4.0-pruned.ckpt
file.After downloading, the folder structure should be like this:
pip install -r requirements.txt
experiments
folder.Anything v4.0
, please add --ckpt models/anything-v4.0-pruned.ckpt
in the following commands.python test_sketch.py --plms --auto_resume --prompt "A car with flying wings" --path_cond examples/sketch/car.png --ckpt models/sd-v1-4.ckpt --type_in sketch
python test_sketch.py --plms --auto_resume --prompt "A beautiful girl" --path_cond examples/anything_sketch/human.png --ckpt models/sd-v1-4.ckpt --type_in image
python test_sketch.py --plms --auto_resume --prompt "A beautiful girl" --path_cond examples/anything_sketch/human.png --ckpt models/anything-v4.0-pruned.ckpt --type_in image
Gradio Demo
You can use gradio to experience all these three functions at once. CPU is also supported by setting device to 'cpu'.
python gradio_sketch.py
python test_keypose.py --plms --auto_resume --prompt "A beautiful girl" --path_cond examples/keypose/iron.png --type_in pose
python test_keypose.py --plms --auto_resume --prompt "A beautiful girl" --path_cond examples/sketch/human.png --type_in image
python test_keypose.py --plms --auto_resume --prompt "A beautiful girl" --path_cond examples/sketch/human.png --ckpt models/anything-v4.0-pruned.ckpt --type_in image
Gradio Demo
You can use gradio to experience all these three functions at once. CPU is also supported by setting device to 'cpu'.
python gradio_keypose.py
python test_seg.py --plms --auto_resume --prompt "A black Honda motorcycle parked in front of a garage" --path_cond examples/seg/motor.png
python test_seg_sketch.py --plms --auto_resume --prompt "An all white kitchen with an electric stovetop" --path_cond examples/seg_sketch/mask.png --path_cond2 examples/seg_sketch/edge.png
python test_sketch_edit.py --plms --auto_resume --prompt "A white cat" --path_cond examples/edit_cat/edge_2.png --path_x0 examples/edit_cat/im.png --path_mask examples/edit_cat/mask.png
The following is the detailed structure of a Stable Diffusion model with the T2I-Adapter.
The corresponding edge maps are predicted by PiDiNet. The sketch T2I-Adapter can well generalize to other similar sketch types, for example, sketches from the Internet and user scribbles.
The keypose results predicted by the MMPose. With the keypose guidance, the keypose T2I-Adapter can also help to generate animals with the same keypose, for example, pandas and tigers.
Once the T2I-Adapter is trained, it can act as a plug-and-play module and can be seamlessly integrated into the finetuned diffusion models without re-training, for example, Anything-4.0.
When combined with the inpaiting mode of Stable Diffusion, we can realize local editing with user specific guidance.
Adapter can be used to enhance the SD ability to combine different concepts.
We can realize the sequential editing with the adapter guidance.
Stable Diffusion results guided with the segmentation and sketch adapters together.
Logo materials: adapter, lightbulb
⏬Download Models | 💻How to Test
Author: TencentARC
Source Code: https://github.com/TencentARC/T2I-Adapter
License: Apache-2.0 license
1676894892
Official implementation of T2I-Adapter: Learning Adapters to Dig out More Controllable Ability for Text-to-Image Diffusion Models.
We propose T2I-Adapter, a simple and small (~70M parameters, ~300M storage space) network that can provide extra guidance to pre-trained text-to-image models while freezing the original large text-to-image models.
T2I-Adapter aligns internal knowledge in T2I models with external control signals. We can train various adapters according to different conditions, and achieve rich control and editing effects.
Put the downloaded models in the T2I-Adapter/models
folder.
sd-v1-4.ckpt
file.anything-v4.0-pruned.ckpt
file.After downloading, the folder structure should be like this:
pip install -r requirements.txt
experiments
folder.Anything v4.0
, please add --ckpt models/anything-v4.0-pruned.ckpt
in the following commands.python test_sketch.py --plms --auto_resume --prompt "A car with flying wings" --path_cond examples/sketch/car.png --ckpt models/sd-v1-4.ckpt --type_in sketch
python test_sketch.py --plms --auto_resume --prompt "A beautiful girl" --path_cond examples/anything_sketch/human.png --ckpt models/sd-v1-4.ckpt --type_in image
python test_sketch.py --plms --auto_resume --prompt "A beautiful girl" --path_cond examples/anything_sketch/human.png --ckpt models/anything-v4.0-pruned.ckpt --type_in image
Gradio Demo
You can use gradio to experience all these three functions at once. CPU is also supported by setting device to 'cpu'.
python gradio_sketch.py
python test_keypose.py --plms --auto_resume --prompt "A beautiful girl" --path_cond examples/keypose/iron.png --type_in pose
python test_keypose.py --plms --auto_resume --prompt "A beautiful girl" --path_cond examples/sketch/human.png --type_in image
python test_keypose.py --plms --auto_resume --prompt "A beautiful girl" --path_cond examples/sketch/human.png --ckpt models/anything-v4.0-pruned.ckpt --type_in image
Gradio Demo
You can use gradio to experience all these three functions at once. CPU is also supported by setting device to 'cpu'.
python gradio_keypose.py
python test_seg.py --plms --auto_resume --prompt "A black Honda motorcycle parked in front of a garage" --path_cond examples/seg/motor.png
python test_seg_sketch.py --plms --auto_resume --prompt "An all white kitchen with an electric stovetop" --path_cond examples/seg_sketch/mask.png --path_cond2 examples/seg_sketch/edge.png
python test_sketch_edit.py --plms --auto_resume --prompt "A white cat" --path_cond examples/edit_cat/edge_2.png --path_x0 examples/edit_cat/im.png --path_mask examples/edit_cat/mask.png
The following is the detailed structure of a Stable Diffusion model with the T2I-Adapter.
The corresponding edge maps are predicted by PiDiNet. The sketch T2I-Adapter can well generalize to other similar sketch types, for example, sketches from the Internet and user scribbles.
The keypose results predicted by the MMPose. With the keypose guidance, the keypose T2I-Adapter can also help to generate animals with the same keypose, for example, pandas and tigers.
Once the T2I-Adapter is trained, it can act as a plug-and-play module and can be seamlessly integrated into the finetuned diffusion models without re-training, for example, Anything-4.0.
When combined with the inpaiting mode of Stable Diffusion, we can realize local editing with user specific guidance.
Adapter can be used to enhance the SD ability to combine different concepts.
We can realize the sequential editing with the adapter guidance.
Stable Diffusion results guided with the segmentation and sketch adapters together.
Logo materials: adapter, lightbulb
⏬Download Models | 💻How to Test
Author: TencentARC
Source Code: https://github.com/TencentARC/T2I-Adapter
License: Apache-2.0 license
1614244987
Getting dressed and undressed is a regular activity that can sometimes be difficult for seniors. But if they are suffering from arthritis pain, this normal activity can become one of the most challenging ones for them. No matter what form of arthritis they have, no pain should make them lose their independence. For that reason, we have put together a list of some simple dressing tips that can make dressing significantly easier for seniors with arthritis pain. Let us take a look at them.
Avoid tight clothes
Avoid choosing tighter clothes for your aging loved one with arthritis, especially if their range of motion is restricted by arthritis. Loose fit clothes can be easy to get into and take off, for that reason, choose clothes that are one size large from their usual size. You can also consider adaptive pants for seniors as they are easy to wear. This way, when they are having a tough day, they can easily take on and off these clothes without taking much help from other people.
Choose simple clothing
If your aging loved one is suffering from arthritis pain in their hands, operating zippers and small buttons can make dressing more difficult. The fasting of their clothing plays a major role in their dressing style. For that reason, it is better to choose adaptive clothing as it is specifically made for people with mobility issues. You can pick adaptive pants and sweaters for them as they do not have zippers but elastic, which makes dressing up and down much easier for your loved one with arthritis.
Add a metal ring
Clothes that come with zippers tend to be difficult to wear. Most clothes have a small ring that looks quite classy but for a senior with arthritis, the same zipper can become a nightmare for them as it may get difficult for them to hold the small zipper. For that reason, the best way to reduce their stress is to add a metal ring to the opening or you can also attach a long ribbon. This will make it easier for them to grasp and pull the zipper.
Choose clothes with magnet or velcro closing
Since buttons and zippers can make dressing challenging for your aging loved one, choosing clothes with magnets or velcro closing could be a great idea. This way, they won’t have to struggle and enjoy their independence. You can also consider buying adaptive pants for disabled seniors.
Arthritis pain can put a lot of strain on the physical as well as mental health of your loved one. Losing independence is one such thing that everyone loses. For that reason, choosing adaptive clothing for handicapped people can be the best course of action to take.
Author’s Bio – The author is a blogger. This article is about dressing tips for seniors with arthritis pain.
#adaptive pants for seniors #adaptive pants for disabled #adaptive clothing for handicapped
1597386039
NGINX is one of the most popular web servers in the world. Not only is NGINX a fast and reliable static web server, it is also used by a ton of developers as a reverse-proxy that sits in front of their APIs.
In this tutorial we will take a look at the NGINX Official Docker Image and how to use it. We’ll start by running a static web server locally then we’ll build a custom image to house our web server and the files it needs to serve. We’ll finish up by taking a look at creating a reverse-proxy server for a simple REST API and then how to share this image with your team.
To complete this tutorial, you will need the following:
#docker official images #nginx #official image
1614244787
USB to RS232 Serial adapters in Plastic, Cable, and Metal Chassis construction with LED Status Indicators and DB9 Male Ports and Terminal Wire Connections.
#usb to rs232 adapter #serial rs232 adapter
1624067081
REST implementation of Django authentication system. djoser library provides a set of Django Rest Framework views to handle basic actions such as registration, login, logout, password reset and account activation. It works with custom user model.
Instead of reusing Django code (e.g. PasswordResetForm), we reimplemented few things to fit better into Single Page App architecture.
Developed by SUNSCRAPERS with passion & patience.
To be able to run djoser you have to meet following requirements:
If you need to support other versions, please use djoser<2.
Simply install using pip
:
$ pip install djoser
And continue with the steps described at configuration guide.
…
#django #authentication #rest implementation of django authentication system for python #rest #django authentication system for python #rest implementation