-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use StableDiffusionControl(XL)NetImg2ImgPipeline im Cond2ImPipe
- Loading branch information
Showing
2 changed files
with
84 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
""" | ||
first run promp2im.py | ||
this script expects https://huggingface.co/lllyasviel/control_v11p_sd15_softedge | ||
to be placed in ./models-cn/control_v11p_sd15_softedge | ||
modified versions of the input image will be placed in ./_projects/biolab/controlnet/ | ||
""" | ||
|
||
from multigen.prompting import Cfgen | ||
from multigen.sessions import GenSession | ||
from multigen.pipes import Im2ImPipe, CIm2ImPipe, ModelType | ||
|
||
|
||
model_dir = "./models-sd/" | ||
model_id = "icbinp" | ||
|
||
prompt = ["bioinformatics lab with flasks and exotic flowers", | ||
"happy vibrant", "green colors", "artwork", "high tech"] | ||
|
||
nprompt = "jpeg artifacts, blur, distortion, watermark, extra fingers, fewer fingers, lowres, bad hands, duplicate heads, bad anatomy" | ||
|
||
|
||
pipe = CIm2ImPipe(model_dir + model_id, model_type=ModelType.SD, ctypes=['soft']) | ||
pipe.setup("./_projects/biolab/00000.png", strength=0.6, steps=25) | ||
gs = GenSession("./_projects/biolab/controlnet/", pipe, Cfgen(prompt, nprompt)) | ||
gs.gen_sess(add_count=10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters