Comments (6)
Definitely yes. That is a good point. A simple way is to give a lower mask alignment strength, which let the models generate the region outside of the mask more freely. Another way is to give pixel-wise control scales instead of a single scalar.
from editanything.
@ikuinen thank you for your quick reply! I tried lower mask alignment strength, and it is not very optimal - it sometimes will grow extra legs, while not diversifying the background much.
Another way is to give pixel-wise control scales instead of a single scalar.
Can you elaborate on this approach? Which parameter should I supply? 🙏
from editanything.
Thanks for your interest. The mask alignment strength is a control scalar, while I think you could use a heatmap-like control scale. The value in region of dog could be one. The area around the dog could be lower and the rest could be zero. Just a simple idea and haven't tried yet. This may be a further feature that can be added into EditAnything.
from editanything.
@ikuinen Thank you for your insight - I would like to experiment your approach, but I didn't locate a way to provide a heatmap as you described.
In StableDiffusionControlNetInpaintPipeline
, __call__
: I think control_net_conditioning_scale
is a float
or List[float]
, and the alignment_ratio
looks like a Optional[float]
.
Could you give a code pointer of how this is achieved? Much thanks!
from editanything.
Hi~@DJBen, you could checkout the dev
branch. I have implemented a version to control the scale in pixel-wise style, named controlnet_conditioning_scale_map
. By simply setting a higher scale around the dog while zero scale for the rest, the problem could be solved in a way.
Prompt: "a dog in beach, photorealistic, best quality, extremely detailed"
Original image | Mask | Inpainted image | Control scale map |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
from editanything.
That is amazing. You are awesome. I'll try it at my earliest convenience.
from editanything.
Related Issues (20)
- sam2image.py can run on the gui,but when i click run,the html is always circling, and there is no log in the script HOT 1
- Filenotfound error HOT 1
- AttributeError: module 'keras.backend' has no attribute 'is_tensor' HOT 2
- serializer = serializing.COMPONENT_MAPPING[type]() KeyError: 'dataset' HOT 1
- 我部署时怎么提示app.py和editany_lora等文件里好多代码都是错的 HOT 1
- Colors for SAM mask based ControlNet during training
- How to install this project in a1111 sd webui?
- App.py run error
- fix demo HOT 2
- why should generate the mask again? HOT 1
- Unable to reproduce the dog's head example when using the same example image
- Replace pytorch 2.1+cu12.1 is ok? I found now version is 1.13, is too low
- Are we going to support SDXL-Turbo? HOT 2
- Weights creation HOT 3
- Has the author of this repository given up? HOT 3
- Which scripts if for Haircut editing? HOT 2
- ValueError at runtime HOT 2
- What is TEXT_ENCODER_TARGET_MODULES in utils/train_dreambooth_lora_inpaint.py HOT 1
- Why there is no strength parameter for StableDiffusionInpaintPipleline? HOT 3
- How to train text encoder for dreambooth inpaint lora?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from editanything.