aboutLine drawing transferEarlier, I shared with you two ways to implement text-generated graphs and image-generated graphs.
The first two methods are implementedBuilding picturesMost of them are not very good at transferring line drawings. Today I will share my personal practice on transferring line drawings of architectural pictures. If you have good ideas for implementation, you can leave a message or add WeChat for private communication.
1. The Wensheng diagram uses the large model RealisticVisionV2.0
When we converted the line drawing of the picture in the first article, we used ReVAnimated for the big model. I tried to change the big model to RealisticVisionV2.0. When other parameters are configured exactly the same, the effect of the architectural picture is much better, mainly because the lines are very natural and obvious. The current picture clarity still needs to be improved. Let's take a look at the effect of using RealisticVisionV2.0 to convert the picture to the line drawing.
It seems that more attempts are needed to achieve better results. Of course, you can try it yourself to see whether the effect of converting real-life pictures to line drawings is better after changing to RealisticVisionV2.0.
The above production method is still lacking in the effect of transferring the line drawing of the picture, mainly because the lines are too thin and the overall picture is white.
2. Method of converting architectural pictures into line drawings
Let’s first take a look at the effect of converting architectural pictures into line drawings.
Overall, the lines of the picture are quite obvious. Let’s take a look at the production method.
[Step 1]: Selection of large model
It is recommended to use: Essential Model for Realism | RealisticVisionV2.0.
Model download address (you can also get the network disk address at the end of the article)
LiblibAI:https://www.liblib.art/modelinfo/8210b3f729fba1ec171698f73eb6f5e3
【Step 2】:Writing prompt words
Positive prompt words
Prompt:BondyStudio,monochrome,greyscale,Dotted line,line shadow,exquisite,clean white background,masterpiece,best quality,fine detail,8K,UHD,wallpaper
Prompt word: BondyStudio, monochrome, grayscale, dotted lines, line shadows, exquisite, clean white background, masterpiece, best quality, fine details, 8K, UHD, wallpaper
Reverse prompt word
negative
Related parameter settings
- Sampler: Euler a
- Sampling iteration number: 60
- Image width and height: 512*768 (same as the original image to be transferred)
- Prompt word guidance coefficient (CFG): 5
【Step 3】:Setting up the Loar model
Here we use a LORA model mainly used for architecture to line draft:
lora1: Photo to Line Drawing - Line Drawing Model
LiblibAI: https://www.liblib.art/modelinfo/4eb802a26fbd1715f148d770be470c61
The author of this lora model is trained mainly to produce architectural line drawings, and supports 2 modes.
- One is the exquisite line draft mode. The keywords are: "BondyStudio, monochrome, greyscale, Dotted line, line shadow, exquisite." The recommended sampling steps are more than 60 steps and the Lora weight is about 0.75. You can test it yourself.
- The other is the conceptual line draft mode, the keywords are: "archline, sketch, perspective,
- monochrome, greyscale, white background,” the recommended sampling step is about 40 steps. It is recommended that the control model of cotrolnet should be Scribble/sketch, and the preprocessor should be scribble-xdog mode.
The trigger word is sketch or exquisite
Here we produce a delicate line drawing, and we set the weight to 0.75.
[Step 4]: ControlNet settings
The relevant parameter settings are as follows:
- Control Type: Select "Lineart"
- Preprocessor: lineart_realistic
- Model: control_v11p_sd15_lineart
- Control weight: 0.65
【Step 5】Image generation
Click the [Generate] button and let’s take a look at the final generated image effect.
3. Architectural picture to sketch effect
The loar model above: photo to line drawing - line drawing model, can also support line drawing sketches. Let's experience it. Here we need to modify 2 configurations.
Positive prompt words:
Prompt:archline,sketch,perspective,monochrome,greyscale,white background,masterpiece,best quality,fine detail,8K,UHD,wallpaper,
Prompt word: arch lines, sketch, perspective, monochrome, grayscale, white background, masterpiece, best quality, fine details, 8K, UHD, wallpaper
ControlNet Settings:
The relevant parameter settings are as follows:
- Control Type: Select "Scribble/sketch"
- Preprocessor: scribble-xdog
- Model: control_v11p_sd15_scribble
- Control weight: 1
Let's take a look at the generated image.
4. Related instructions
Today I will introduce the line drawing transfer of architectural pictures. If used on a real-life model, the effect will not be very good, so I will not post the comparison picture here. If you are interested, you can try it yourself.
Okay, that’s all for today’s sharing. I hope that what I shared today will be helpful to you.
The model is placed in the network disk, and those who are interested can take it!
https://pan.quark.cn/s/b3df771404e2