Coder Social home page Coder Social logo

Comments (2)

rbbrdckybk avatar rbbrdckybk commented on May 26, 2024

That's odd, I must have introduced an issue at some point. I haven't used ADetailer for txt2img in standard .prompts files since implementation so I'm actually not even 100% sure it ever worked properly, now that I think about it (I do all of my ADetailer work in batch via process .prompts files). Will look into it, but it may take a bit as I'm currently traveling!

In the meantime, if you generate images normally without ADetailer, and then set aside images that need ADetailer face/hand/whatever replacement, you can use something like this .prompts file to process them all at once (this should definitely work for you as I've been using ADetailer via process files several times a week):

[config]

!MODE = process
!ADETAILER_USE = yes

# change these to suit your needs
!ADETAILER_STRENGTH = 0.50
!ADETAILER_SAMPLER = Heun
!ADETAILER_STEPS = 60
!ADETAILER_SCALE = 7
!ADETAILER_MODEL = face_yolov8n.pt

# change these to suit your needs
!ADETAILER_NEG_PROMPT = (hands), cartoon, cgi, render, illustration, painting, drawing
!ADETAILER_PROMPT = photo portrait of a man, very detailed skin, studio photography, masterpiece

# change to whatever model(s) you want to use
!ADETAILER_CKPT_FILE = deliberate
!OVERRIDE_CKPT_FILE = deliberate

!INPUT_IMAGE = # put the directory containing input images here
!OUTPUT_DIR = # put your output directory here

# output filename will be original name plus ADetailer strength specified above
!FILENAME = <input-img>-<ad-strength>

# uncomment & put the name of another .prompts file here to execute it automatically when finished
#!NEXT_PROMPT_FILE = 


[prompts]

go

from dream-factory.

rbbrdckybk avatar rbbrdckybk commented on May 26, 2024

Had a chance to play with this today, and while ADetailer is definitely working, there is a strange bug with txt2img requests in the ADetailer extension itself. Any txt2img job that utilizes ADetailer executed via the API from Dream Factory will actually get executed twice - unfortunately this needs to be fixed by the people maintaining the ADetailer extension; the API request from Dream Factory is correct.

My test .prompts file is below - I generate a standard txt2img image without ADetailer, and then ask for the same image with ADetailer enabled to replace the face (from a young woman's face to an old one). I end up with 3 images from Dream Factory, when I should obviously only get 2.

I'm running the latest version of everything (Dream Factory, Auto1111, and the ADetailer extension).

Dream Factory output from the .prompts file below:

Standard txt2img image:
txt2img-20240205-214624

1st ADetailer image (this matches what I get if I run this job directly via the Auto1111 UI):
adetailer-20240205-214655-0

2nd ADetailer image (appears to be the same ADetailer job run against the image above):
adetailer-20240205-214655

My .prompts file:

[config]

!MODE = standard
!REPEAT = no

!WIDTH = 512
!HEIGHT = 512

!SAMPLER = DPM++ 2M Karras
!STEPS = 20
!SCALE = 7.5
!CLIP_SKIP = 1
!HIGHRES_FIX = no

!CKPT_FILE = deliberate_v3
!ADETAILER_STRENGTH = 0.50
!ADETAILER_MODEL = face_yolov8n.pt

!NEG_PROMPT = (deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers:1.4), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation, tattoo, watermark, text, anime, illustration, sketch, 3d, vector art, cartoon, painting

!SEED = 42


[prompts]


!ADETAILER_USE = no
!FILENAME = txt2img-<date>-<time>
portrait of a young woman wizard, magical robes, holding staff, fantasy character artwork, dnd character, action lines


!ADETAILER_USE = yes
!ADETAILER_PROMPT = photo portrait of an old woman, very detailed skin, studio photography, masterpiece
!FILENAME = adetailer-<date>-<time>
portrait of a young woman wizard, magical robes, holding staff, fantasy character artwork, dnd character, action lines

from dream-factory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.