Guest



Sign inSignup
  • Home
  • Dashboard
  • Tools
  • Store
  • Pricing

Welcome

HomeDashboardToolsStore
Use cases
Human Resources
Retail & E-commerce
Interior Design
Fashion AI
Creative Content Solutions
Sports & Fitness
GenAI Video Tools
PricingDocumentation
Guest



Sign inSignup

Task History

  • Runnings
  • Models
  • Trains

You don't have task yet.

Go to Tools

Welcome

  • Tools
  • lllyasviel/control_v11e_sd15_shuffle
Tools
Task History

lllyasviel/ control_v11e_sd15_shuffle

1052runs
0Comments

API Sample: lllyasviel/control_v11e_sd15_shuffle

You don't have any projects yet. To be able to use our api service effectively, please sign in/up and create a project.

Get your api key
  • curl
  • nodejs
  • csharp
  • php
  • swift
  • dart
  • kotlin
  • go
  • python

Prepare Authentication Signature

                          
  //Sign up Wiro dashboard and create project
  export YOUR_API_KEY="{{useSelectedProjectAPIKey}}"; 
  export YOUR_API_SECRET="XXXXXXXXX"; 

   //unix time or any random integer value
  export NONCE=$(date +%s);

  //hmac-SHA256 (YOUR_API_SECRET+Nonce) with YOUR_API_KEY
  export SIGNATURE="$(echo -n "${YOUR_API_SECRET}${NONCE}" | openssl dgst -sha256 -hmac "${YOUR_API_KEY}")";
      
                        

Create a New Folder - Make HTTP Post Request

Create a New Folder - Response

Upload a File to the Folder - Make HTTP Post Request

Upload a File to the Folder - Response

Run Command - Make HTTP Post Request

                          
  curl -X POST "{{apiUrl}}/Run/{{toolSlugOwner}}/{{toolSlugProject}}"  \
  -H "Content-Type: {{contentType}}" \
  -H "x-api-key: ${YOUR_API_KEY}" \
  -H "x-nonce: ${NONCE}" \
  -H "x-signature: ${SIGNATURE}" \
  -d '{{toolParameters}}';

      
                        

Run Command - Response

                          
  //response body
  {
      "errors": [],
      "taskid": "2221",
      "socketaccesstoken": "eDcCm5yyUfIvMFspTwww49OUfgXkQt",
      "result": true
  }
      
                        

Get Task Detail - Make HTTP Post Request

                          
  curl -X POST "{{apiUrl}}/Task/Detail"  \
  -H "Content-Type: {{contentType}}" \
  -H "x-api-key: ${YOUR_API_KEY}" \
  -H "x-nonce: ${NONCE}" \
  -H "x-signature: ${SIGNATURE}" \
  -d '{
    "tasktoken": 'eDcCm5yyUfIvMFspTwww49OUfgXkQt',
  }';

      
                        

Get Task Detail - Response

                          
  //response body
  {
    "total": "1",
    "errors": [],
    "tasklist": [
        {
            "id": "2221",
            "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd",
            "name": "",
            "socketaccesstoken": "eDcCm5yyUfIvMFspTwww49OUfgXkQt",
            "parameters": {
                "inputImage": "https://api.wiro.ai/v1/File/mCmUXgZLG1FNjjjwmbtPFr2LVJA112/inputImage-6060136.png"
            },
            "debugoutput": "",
            "debugerror": "",
            "starttime": "1734513809",
            "endtime": "1734513813",
            "elapsedseconds": "6.0000",
            "status": "task_postprocess_end",
            "cps": "0.000585000000",
            "totalcost": "0.003510000000",
            "guestid": null,
            "projectid": "699",
            "modelid": "598",
            "description": "",
            "basemodelid": "0",
            "runtype": "model",
            "modelfolderid": "",
            "modelfileid": "",
            "callbackurl": "",
            "marketplaceid": null,
            "createtime": "1734513807",
            "canceltime": "0",
            "assigntime": "1734513807",
            "accepttime": "1734513807",
            "preprocessstarttime": "1734513807",
            "preprocessendtime": "1734513807",
            "postprocessstarttime": "1734513813",
            "postprocessendtime": "1734513814",
            "pexit": "0",
            "categories": "["tool","image-to-image","quick-showcase","compare-landscape"]",
            "outputs": [
                {
                    "id": "6bc392c93856dfce3a7d1b4261e15af3",
                    "name": "0.png",
                    "contenttype": "image/png",
                    "parentid": "6c1833f39da71e6175bf292b18779baf",
                    "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd",
                    "size": "202472",
                    "addedtime": "1734513812",
                    "modifiedtime": "1734513812",
                    "accesskey": "dFKlMApaSgMeHKsJyaDeKrefcHahUK",
                    "foldercount": "0",
                    "filecount": "0",
                    "ispublic": 0,
                    "expiretime": null,
                    "url": "https://cdn1.wiro.ai/6a6af820-c5050aee-40bd7b83-a2e186c6-7f61f7da-3894e49c-fc0eeb66-9b500fe2/0.png"
                }
            ],
            "size": "202472"
        }
    ],
    "result": true
  }
      
                        

Get Task Process Information and Results with Socket Connection

                          
<script type="text/javascript">
  window.addEventListener('load',function() {
    //Get socketAccessToken from task run response
    var SocketAccessToken = 'eDcCm5yyUfIvMFspTwww49OUfgXkQt';
    WebSocketConnect(SocketAccessToken);
  });

  //Connect socket with connection id and register task socket token
  async function WebSocketConnect(accessTokenFromAPI) {
    if ("WebSocket" in window) {
        var ws = new WebSocket("wss://socket.wiro.ai/v1");
        ws.onopen = function() {  
          //Register task socket token which has been obtained from task run API response
          ws.send('{"type": "task_info", "tasktoken": "' + accessTokenFromAPI + '"}'); 
        };

        ws.onmessage = function (evt) { 
          var msg = evt.data;

          try {
              var debugHtml = document.getElementById('debug');
              debugHtml.innerHTML = debugHtml.innerHTML + "\n" + msg;

              var msgJSON = JSON.parse(msg);
              console.log('msgJSON: ', msgJSON);

              if(msgJSON.type != undefined)
              {
                console.log('msgJSON.target: ',msgJSON.target);
                switch(msgJSON.type) {
                    case 'task_queue':
                      console.log('Your task has been waiting in the queue.');
                    break;
                    case 'task_accept':
                      console.log('Your task has been accepted by the worker.');
                    break;
                    case 'task_preprocess_start':
                      console.log('Your task preprocess has been started.');
                    break;
                    case 'task_preprocess_end':
                      console.log('Your task preprocess has been ended.');
                    break;
                    case 'task_assign':
                      console.log('Your task has been assigned GPU and waiting in the queue.');
                    break;
                    case 'task_start':
                      console.log('Your task has been started.');
                    break;
                    case 'task_output':
                      console.log('Your task has been started and printing output log.');
                      console.log('Log: ', msgJSON.message);
                    break;
                    case 'task_error':
                      console.log('Your task has been started and printing error log.');
                      console.log('Log: ', msgJSON.message);
                    break;
                   case 'task_output_full':
                      console.log('Your task has been completed and printing full output log.');
                    break;
                    case 'task_error_full':
                      console.log('Your task has been completed and printing full error log.');
                    break;
                    case 'task_end':
                      console.log('Your task has been completed.');
                    break;
                    case 'task_postprocess_start':
                      console.log('Your task postprocess has been started.');
                    break;
                    case 'task_postprocess_end':
                      console.log('Your task postprocess has been completed.');
                      console.log('Outputs: ', msgJSON.message);
                      //output files will add ui
                      msgJSON.message.forEach(function(currentValue, index, arr){
                          console.log(currentValue);
                          var filesHtml = document.getElementById('files');
                          filesHtml.innerHTML = filesHtml.innerHTML + '<img src="' + currentValue.url + '" style="height:300px;">'
                      });
                    break;
                }
              }
          } catch (e) {
            console.log('e: ', e);
            console.log('msg: ', msg);
          }
        };

        ws.onclose = function() { 
          alert("Connection is closed..."); 
        };
    } else {              
        alert("WebSocket NOT supported by your Browser!");
    }
  }
</script>
      
                        

Prepare UI Elements Inside Body Tag

                          
  <div id="files"></div>
  <pre id="debug"></pre>
      
                        

Choose an image that will re-generate

Choose an image URL that will re-generate

Preprocess type for ControlNet

Tell us about any details you want to generate

control_v11e_sd15_shuffle scale:

Specify things to not see in the output

Your request will cost $0.0006 per second.

(Total cost varies depending on the request’s execution time.)
1700683223 Report This Model






Controlnet - v1.1 - shuffle Version


Controlnet v1.1 was released in lllyasviel/ControlNet-v1-1 by Lvmin Zhang.
This checkpoint is a conversion of the original checkpoint into diffusers format.
It can be used in combination with Stable Diffusion, such as runwayml/stable-diffusion-v1-5.
For more details, please also have a look at the 🧨 Diffusers docs.
ControlNet is a neural network structure to control diffusion models by adding extra conditions.

This checkpoint corresponds to the ControlNet conditioned on shuffle images.





Model Details



Developed by: Lvmin Zhang, Maneesh Agrawala

Model type: Diffusion-based text-to-image generation model

Language(s): English

License: The CreativeML OpenRAIL M license is an Open RAIL M license, adapted from the work that BigScience and the RAIL Initiative are jointly carrying in the area of responsible AI licensing. See also the article about the BLOOM Open RAIL license on which our license is based.

Resources for more information: GitHub Repository, Paper.

Cite as:
@misc{zhang2023adding,
title={Adding Conditional Control to Text-to-Image Diffusion Models},
author={Lvmin Zhang and Maneesh Agrawala},
year={2023},
eprint={2302.05543},
archivePrefix={arXiv},
primaryClass={cs.CV}
}







Introduction


Controlnet was proposed in Adding Conditional Control to Text-to-Image Diffusion Models by
Lvmin Zhang, Maneesh Agrawala.
The abstract reads as follows:
We present a neural network structure, ControlNet, to control pretrained large diffusion models to support additional input conditions.
The ControlNet learns task-specific conditions in an end-to-end way, and the learning is robust even when the training dataset is small (< 50k).
Moreover, training a ControlNet is as fast as fine-tuning a diffusion model, and the model can be trained on a personal devices.
Alternatively, if powerful computation clusters are available, the model can scale to large amounts (millions to billions) of data.
We report that large diffusion models like Stable Diffusion can be augmented with ControlNets to enable conditional inputs like edge maps, segmentation maps, keypoints, etc.
This may enrich the methods to control large diffusion models and further facilitate related applications.





Example


It is recommended to use the checkpoint with Stable Diffusion v1-5 as the checkpoint
has been trained on it.
Experimentally, the checkpoint can be used with other diffusion models such as dreamboothed stable diffusion.
Note: If you want to process an image to create the auxiliary conditioning, external dependencies are required as shown below:

Install https://github.com/patrickvonplaten/controlnet_aux

$ pip install controlnet_aux==0.3.0


Let's install diffusers and related packages:

IMPORTANT: Make sure that you have diffusers.__version__ >= 0.16.0.dev0 installed!
$ pip install git+https://github.com/huggingface/diffusers.git transformers accelerate


Run code:

import torch
import os
from huggingface_hub import HfApi
from pathlib import Path
from diffusers.utils import load_image
from PIL import Image
import numpy as np
from controlnet_aux import ContentShuffleDetector

from diffusers import (
ControlNetModel,
StableDiffusionControlNetPipeline,
UniPCMultistepScheduler,
)

checkpoint = "lllyasviel/control_v11e_sd15_shuffle"

image = load_image(
"https://huggingface.co/lllyasviel/control_v11e_sd15_shuffle/resolve/main/images/input.png"
)

prompt = "New York"
processor = ContentShuffleDetector()

control_image = processor(image)
control_image.save("./images/control.png")

controlnet = ControlNetModel.from_pretrained(checkpoint, torch_dtype=torch.float16)
pipe = StableDiffusionControlNetPipeline.from_pretrained(
"runwayml/stable-diffusion-v1-5", controlnet=controlnet, torch_dtype=torch.float16
)

pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
pipe.enable_model_cpu_offload()

generator = torch.manual_seed(33)
image = pipe(prompt, num_inference_steps=30, generator=generator, image=control_image).images[0]

image.save('images/image_out.png')









Other released checkpoints v1-1


The authors released 14 different checkpoints, each trained with Stable Diffusion v1-5
on a different type of conditioning:



Model Name
Control Image Overview
Condition Image
Control Image Example
Generated Image Example



lllyasviel/control_v11p_sd15_canny
Trained with canny edge detection
A monochrome image with white edges on a black background.




lllyasviel/control_v11e_sd15_ip2p
Trained with pixel to pixel instruction
No condition .




lllyasviel/control_v11p_sd15_inpaint
Trained with image inpainting
No condition.




lllyasviel/control_v11p_sd15_mlsd
Trained with multi-level line segment detection
An image with annotated line segments.




lllyasviel/control_v11f1p_sd15_depth
Trained with depth estimation
An image with depth information, usually represented as a grayscale image.




lllyasviel/control_v11p_sd15_normalbae
Trained with surface normal estimation
An image with surface normal information, usually represented as a color-coded image.




lllyasviel/control_v11p_sd15_seg
Trained with image segmentation
An image with segmented regions, usually represented as a color-coded image.




lllyasviel/control_v11p_sd15_lineart
Trained with line art generation
An image with line art, usually black lines on a white background.




lllyasviel/control_v11p_sd15s2_lineart_anime
Trained with anime line art generation
An image with anime-style line art.




lllyasviel/control_v11p_sd15_openpose
Trained with human pose estimation
An image with human poses, usually represented as a set of keypoints or skeletons.




lllyasviel/control_v11p_sd15_scribble
Trained with scribble-based image generation
An image with scribbles, usually random or user-drawn strokes.




lllyasviel/control_v11p_sd15_softedge
Trained with soft edge image generation
An image with soft edges, usually to create a more painterly or artistic effect.




lllyasviel/control_v11e_sd15_shuffle
Trained with image shuffling
An image with shuffled patches or regions.




lllyasviel/control_v11f1e_sd15_tile
Trained with image tiling
A blurry image or part of an image .











More information


For more information, please also have a look at the Diffusers ControlNet Blog Post and have a look at the official docs.

Tools

View All

We couldn't find any matching results.

lllyasviel/sd-controlnet-hed

ControlNet is a neural network structure to control diffusion models by adding extra conditions.
Run time: 15 seconds
2851 runs
0

thibaud/controlnet-openpose-sdxl-1.0

SDXL ControlNet is a neural network structure to control diffusion models by adding extra conditions.
Run time: 15 seconds
1732 runs
0

lllyasviel/control_v11e_sd15_shuffle

ControlNet is a neural network structure to control diffusion models by adding extra conditions.
Run time: 15 seconds
1265 runs
0

diffusers/controlnet-depth-sdxl-1.0

SDXL ControlNet is a neural network structure to control diffusion models by adding extra conditions.
Run time: 15 seconds
1094 runs
0

diffusers/controlnet-canny-sdxl-1.0

SDXL ControlNet is a neural network structure to control diffusion models by adding extra conditions.
Run time: 15 seconds
1879 runs
0

lllyasviel/control_v11f1e_sd15_tile

ControlNet is a neural network structure to control diffusion models by adding extra conditions.
Run time: 15 seconds
2314 runs
0

Select Language

Logo of nvidia programLogo of nvidia program
Wiro AI brings machine learning easily accessible to all in the cloud.
  • WIRO
  • About
  • Careers
  • Contact
  • Language Language
  • Product
  • Tools
  • Pricing
  • Roadmap
  • Changelog
  • Status
  • Documentation
  • Introduction
  • Start Your First Project
  • Example Projects

2023 © Wiro.ai | Terms of Service & Privacy Policy