Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc3a0e1003 | ||
|
|
e0e35a6dbe | ||
|
|
dbdfa8bf6a | ||
|
|
bba65f4716 | ||
|
|
4543286e77 | ||
|
|
95d2016a29 | ||
|
|
fdd3612394 | ||
|
|
5289016681 |
@@ -0,0 +1,8 @@
|
||||
0.2
|
||||
|
||||
* Added textbox to change model (must match downloaded model) and dropdown list to choose sampler
|
||||
* Renamed wrapper node to Txt2Img
|
||||
|
||||
0.1
|
||||
|
||||
* Functional Txt2Img
|
||||
@@ -11,7 +11,7 @@ import io
|
||||
import torch
|
||||
|
||||
|
||||
class DrawThingsWrapper:
|
||||
class DrawThingsTxt2Img:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@@ -21,11 +21,13 @@ class DrawThingsWrapper:
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"model": ("STRING", {"default": "flux_1_dev_q8p.ckpt"}),
|
||||
"prompt": ("STRING", {"default": ""}),
|
||||
"seed": ("INT", {"default": 42}),
|
||||
"width": ("INT", {"default": 512}),
|
||||
"height": ("INT", {"default": 512}),
|
||||
"guidance_scale": ("FLOAT", {"default": 3.5}),
|
||||
"sampler": (["UniPC","DPM++ 2M Karras","Euler Ancestral", "DPM++ SDE Karras", "PLMS", "DDIM", "LCM", "Euler A Substep", "DPM++ SDE Substep", "TCD", "DPM++ 2M Trailing", "Euler A Trailing", "DPM++ SDE Trailing", "DDIM Trailing", "DPM++ 2M AYS", "Euler A AYS", "DPM++ SDE AYS"], {"default": "Euler A Trailing"}),
|
||||
"steps": ("INT", {"default": 20}),
|
||||
}
|
||||
}
|
||||
@@ -34,16 +36,18 @@ class DrawThingsWrapper:
|
||||
RETURN_NAMES = ("generated_image",)
|
||||
FUNCTION = "generate_image"
|
||||
|
||||
def generate_image(self, prompt, seed, width, height, guidance_scale, steps):
|
||||
def generate_image(self, model, prompt, seed, width, height, guidance_scale, sampler, steps):
|
||||
# Call the Draw Things API
|
||||
api_url = "http://127.0.0.1:7860/sdapi/v1/txt2img"
|
||||
|
||||
payload = {
|
||||
"model": model,
|
||||
"prompt": prompt,
|
||||
"seed": seed,
|
||||
"width": width,
|
||||
"height": height,
|
||||
"guidance_scale": guidance_scale,
|
||||
"sampler": sampler,
|
||||
"steps": steps,
|
||||
}
|
||||
|
||||
@@ -68,6 +72,6 @@ class DrawThingsWrapper:
|
||||
return (torch.stack(images),)
|
||||
|
||||
|
||||
NODE_CLASS_MAPPINGS = {"DrawThingsWrapper": DrawThingsWrapper}
|
||||
NODE_CLASS_MAPPINGS = {"DrawThingsTxt2Img": DrawThingsTxt2Img}
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {"DrawThingsWrapper": "Draw Things Wrapper"}
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {"DrawThingsTxt2Img": "Draw Things Txt2Img"}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[project]
|
||||
name = "comfyui-drawthingswrapper"
|
||||
description = "These nodes provide a wrapper for calling Draw Things image generations from ComfyUI. The Draw Things app has been optimized for Apple hardware and runs roughly x3 faster than ComfyUI generations. But ComfyUI is a flexible and powerful tool, and has some features - like queuing and face swapping - that haven't been implemented in Draw Things."
|
||||
version = "1.0.0"
|
||||
license = {file = "LICENSE"}
|
||||
dependencies = ["numpy", "PIL", "requests", "torch"]
|
||||
|
||||
[project.urls]
|
||||
Repository = "https://github.com/JosephThomasParker/ComfyUI-DrawThingsWrapper"
|
||||
# Used by Comfy Registry https://comfyregistry.org
|
||||
|
||||
[tool.comfy]
|
||||
PublisherId = "seosamh"
|
||||
DisplayName = "ComfyUI-DrawThingsWrapper"
|
||||
Icon = ""
|
||||
Reference in New Issue
Block a user