MyShell 백서

MyShell

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 27쪽

uld be between 0 and 1. Use for face restoring</td><td>0</td><td>false</td></tr><tr><td>codeformer_visibility</td><td><code>number</code></td><td>Sets the visibility of CodeFormer, values should be between 0 and 1. Use for face restoring</td><td>0</td><td>false</td></tr><tr><td>codeformer_weight</td><td><code>number</code></td><td>Sets the weight of CodeFormer, values should be between 0 and 1. Use for face restoring</td><td>0</td><td>false</td></tr><tr><td>upscaling_resize_ratio</td><td><code>number</code></td><td>By how much to upscale the image, only used when resize_mode=0.</td><td>2</td><td>false</td></tr><tr><td>upscaling_resize_w</td><td><code>integer</code></td><td>Target width for the upscaler to hit. Only used when resize_mode=1.</td><td>512</td><td>false</td></tr><tr><td>upscaling_resize_h</td><td><code>integer</code></td><td>Target height for the upscaler to hit. Only used when resize_mode=1.</td><td>512</td><td>false</td></tr><tr><td>upscaler_1</td><td><code>string</code></td><td>The name of the main upscaler to use</td><td>ESRGAN_4x</td><td>false</td></tr><tr><td>upscaler_2</td><td><code>string</code></td><td>The name of the secondary upscaler to use. Set to 'None' for quick upscale. The result will be a fusion of two model, decided by `extras_upscaler_2_visibility`.</td><td>None</td><td>false</td></tr><tr><td>extras_upscaler_2_visibility</td><td><code>number</code></td><td>Sets the visibility of secondary upscaler, values should be between 0 and 1.</td><td>0</td><td>false</td></tr><tr><td>upscale_first</td><td><code>boolean</code></td><td>Should the upscaler run before restoring faces?</td><td>False</td><td>false</td></tr></tbody></table> **Output Parameters** | Name | Type | Description | File Type | | ---- | -------- | ------------------------------------------------------------------------------------------------------------ | --------- | | url | `string` | The url of generated image, stored in the cloud. Only temporarily effective, will be cleared in a few hours. | `image` | **Output Example** {% tabs %} {% tab title="success" %} {% code fullWidth="false" %} ```json { "url": "https://image.myshell.ai/image/chat/embed_obj/40295/20240423/29381f8ee23144a69e88a64fa8232fca.jpg" } ``` {% endcode %} {% endtab %} {% tab title="fail" %} {% code fullWidth="false" %} ```json throw a Http error. ``` {% endcode %} {% endtab %} {% endtabs %} ## Detailed Guidelines * **Upscale (SuperResolution)** * Main parameter: * `image` : The input image, can be a url or base64 sting. Any size * `resize_mode`: Sets the resize mode: 0 to upscale by upscaling\_resize amount, 1 to upscale up to upscaling\_resize\_h x upscaling\_resize\_w. * `upscaling_resize_ratio` : By how much to upscale the image, only used when resize\_mode=0. * `upscaling_resize_w & upscaling_resize_h`: Target width/height for the upscaler to hit. Only used when resize\_mode=1. Change the ratio of with/height will casuing a center crop of generated images * `upscaler_1` : The name of the main upscaler to use, choose `["None", "Lanczos", "Nearest", "ESRGAN_4x", "LDSR", "R-ESRGAN 4x+", "R-ESRGAN 4x+ Anime6B", "ScuNET GAN", "ScuNET PSNR", "SwinIR 4x"]` * `upscaler_2`: The name of the secondary upscaler to use. Set to 'None' to disable. The result will be a fusion of two model, decided by `extras_upscaler_2_visibility` * `extras_upscaler_2_visibility`: Sets the visibility of secondary upscaler, values should be between 0 and 1. The result will be `final = (1-α) image_a + α image_b` * Other functional parameter: * `gfpgan_visibility` : Sets the visibility of GFPGAN, values should be between 0 and 1. Use for face restoring. 0 for disabled. The result will be a fusion addition * `codeformer_visibility && codeformer_weight` : Sets the visibility and weight of CodeFormer, values should be between 0 and 1. Use for face restoring. The result will be a fusion addition * `upscale_first` : Should the upscaler run before restoring faces? default to False # Stable Diffusion with 6 fixed category Lazy version of Stabel Diffusion with Civitai. Generate images with rough 6 category. Free you from choosing model in civitai. You can freely control parameters such as prompt, size, etc ## Try it in the Widget Center Click this [url](https://app.myshell.ai/robot-workshop/widget/1779862424125534208) to try this widget and copy the Pro Config template. ## Usage Feeling too lazy to pick a model ID from Civitai? Give our pre-selected SD\&LORAS a try. Effortless version of Stable Diffusion with Civitai. Produce images across approximately 6 categories. Eliminates the need to select a model in Civitai. You have the freedom to adjust parameters like prompt, size, and more. **Input Parameters** <table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>category</td><td><code>string</code></td><td>Lazy to choose model id from civitai? try use our pre-picked sd&#x26;loras</td><td>Realistic &#x26; Photorealistic</td><td>true</td></tr><tr><td>prompt</td><td><code>string</code></td><td>The text prompt for image generation. Add lora? add `` to your prompt. `$id` is the series number and `$weight` is the lora weight you want (always set to 1.0). You can use multiple loras.</td><td></td><td>true</td></tr><tr><td>negative_prompt</td><td><code>string</code></td><td>The negative prompt for image generation.</td><td>(worst quality, low quality:1.4),(malformed hands:1.4),(poorly drawn hands:1.4),(mutated fingers:1.4),(extra limbs:1.35),(poorly drawn face:1.4),bad leg,strange leg, poor eyes, full screen of face</td><td>false</td></tr><tr><td>sampler</td><td><code>string</code></td><td>Sampler for diffusion model inference</td><td>DPM++ 2M Karras</td><td>false</td></tr><tr><td>height</td><td><code>integer</code></td><td>Height of the generated images</td><td>512</td><td>false</td></tr><tr><td>width</td><td><code>integer</code></td><td>Width of the generated images</td><td>512</td><td>false</td></tr><tr><td>steps</td><td><code>integer</code></td><td>Steps for sampler to step whle sampling</td><td>25</td><td>false</td></tr><tr><td>cfg_scale</td><td><code>number</code></td><td>Classifier Free Guidance Scale - how strongly the image should conform to prompt - lower values produce more creative results. Default to 7.</td><td>7.0</td><td>false</td></tr><tr><td>seed</td><td><code>integer</code></td><td>Random seed for generation process. -1 means random seed</td><td>-1</td><td>false</td></tr><tr><td>clip_skip</td><td><code>integer</code></td><td>Early stopping parameter for CLIP model; 1 is stop at last layer as usual, 2 is stop at penultimate layer, etc.</td><td>1</td><td>false</td></tr><tr><td>enable_hr</td><td><code>boolean</code></td><td>Enable the post-process high resolution. If it is set to false, please ignore the parameter with prefix `hr_`</td><td>False</td><td>false</td></tr><tr><td>hr_scale</td><td><code>integer</code></td><td>Improve the image quality by enlarging it in a way while maintains the original ratios. Default to 2. If `hr_height` or `hr_width` is set to a value other than zero, this parameter will not be applied.</td><td>2</td><td>false</td></tr><tr><td>hr_upscaler</td><td><code>string</code></td><td>The super resolution model used</td><td>ESRGAN_4x</td><td>false</td></tr><tr><td>hr_resize_x</td><td><code>integer</code></td><td>Resize width to, 0 means not defined. If x set to 0, and y is not 0, we will resize the length of image to y and change width accordingly. If x and y both not zero, use the max ratio max(hr_resize_x/image.width, hr_resize_y/image.height)</td><td>0</td><td>false</td></tr><tr><td>hr_resize_y</td><td><code>integer</code></td><td>Resize height to, 0 means not defined. If y set to 0, and x is not 0, we will resize the width of image to x and change width accordingly. If x and y both not zero, use the max ratio max(hr_resize_x/image.width, hr_resize_y/image.height)</td><td>0</td><td>false</td></tr><tr><td>hr_second_pass_steps</td><td><code>integer</code></td><td>Steps of sampling for second pass of diffusion model after hires. Set to 0 means the same steps as first pass.</td><td>0</td><td>false</td></tr><tr><td>hr_denoising_strength</td><td><code>number</code></td><td>Strength of image transfomation during hires transform. High means more influence during second pass sampling after hires</td><td>0.7</td><td>false</td></tr></tbody></table> **Output Parameters** | Name | Type | Description | File Type | | ---- | -------- | ------------------------------------------------------------------------------------------------------------ | --------- | | url | `string` | The url of generated image, stored in the cloud. Only temporarily effective, will be cleared in a few hours. | `image` | **Output Example** {% tabs %} {% tab title="success" %} {% code fullWidth="false" %} ```json { "url": "https://image.myshell.ai/image/chat/embed_obj/40295/20240423/d828b567573141a29bdb0f44a33936c1.jpg" } ``` {% endcode %} {% endtab %} {% tab title="fail" %} {% code fullWidth="false" %} ```json throw a Http error. ``` {% endcode %} {% endtab %} {% endtabs %} ## Detailed Guidelines * Unique Parameter: * `category` : Feeling too lazy to pick a model ID from Civitai? Give our pre-selected SD\&LORAS a try. * Choose from `["Anime", "Realistic & Photorealistic", "Landscape", "Fantasy & Illustration", "3D & Cartoon", "Cute & Fantasy Characters"]` # Stable Diffusion with Civitai Use Civitai Model id and Loras. Faster than previous myshell-visual; ## Try it in the Widget Center Click this [url](https://app.myshell.ai/robot-workshop/widget/1779862419876704256) to try this widget and copy the Pro Config template. ## Usage Based on your description (text prompt), generate image with various sizes and styles **Input Parameters** <table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>model</td><td><code>string</code></td><td>The model id from civitai (SD1.5, SDXL 1.0, PlaygroundV2). How to get it? Click on a model page on civitai, and copy the series number within the download link.</td><td>64094</td><td>true</td></tr><tr><td>prompt</td><td><code>string</code></td><td>The text prompt for image generation. Add lora? add &#x3C; lora:$id:$weight > to your prompt. `$id` is the series number and `$weight` is the lora weight you want (always set to 1.0). You can use multiple loras.</td><td></td><td>false</td></tr><tr><td>negative_prompt</td><td><code>string</code></td><td>The negative prompt for image generation.</td><td>(worst quality, low quality:1.4),(malformed hands:1.4),(poorly drawn hands:1.4),(mutated fingers:1.4),(extra limbs:1.35),(poorly drawn face:1.4),bad leg,strange leg, poor eyes, full screen of face</td><td>false</td></tr><tr><td>sampler</td><td><code>string</code></td><td>Sampler for diffusion model inference</td><td>DPM++ 2M</td><td>false</td></tr><tr><td>height</td><td><code>integer</code></td><td>Height of the generated images</td><td>512</td><td>false</td></tr><tr><td>width</td><td><code>integer</code></td><td>Width of the generated images</td><td>512</td><td>false</td></tr><tr><td>steps</td><td><code>integer</code></td><td>Steps for sampler to step whle sampling</td><td>25</td><td>false</td></tr><tr><td>cfg_scale</td><td><code>number</code></td><td>Classifier Free Guidance Scale - how strongly the image should conform to prompt - lower values produce more creative results. Default to 7.</td><td>7.0</td><td>false</td></tr><tr><td>seed</td><td><code>integer</code></td><td>Random seed for generation process. -1 means random seed</td><td>-1</td><td>false</td></tr><tr><td>clip_skip</td><td><code>integer</code></td><td>Early stopping parameter for CLIP model; 1 is stop at last layer as usual, 2 is stop at penultimate layer, etc.</td><td>1</td><td>false</td></tr></tbody></table> **Output Parameters** | Name | Type | Description | File Type | | ---- | -------- | ------------------------------------------------------------------------------------------------------------ | --------- | | url | `string` | The url of generated image, stored in the cloud. Only temporarily effective, will be cleared in a few hours. | `image` | **Output Example** {% tabs %} {% tab title="success" %} {% code fullWidth="false" %} ```json { "url": "https://image.myshell.ai/image/chat/embed_obj/40295/20240423/8cf3621c509f4235839f1014b3ff97a4.jpg" } ``` {% endcode %} {% endtab %} {% tab title="fail" %} {% code fullWidth="false" %} ```json throw a Http error. ``` {% endcode %} {% endtab %} {% endtabs %} ## Detailed Guidelines * Main parameter: * `model` * The model id from civitai (SD1.5, SDXL 1.0, PlaygroundV2). * `How to get it?` * Click on a model page on civitai, and copy the version ID from the page. <figure><img src="https://2975681513-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDtmZwLatyyBFLUK6P6Pj%2Fuploads%2Fgit-blob-602158ba0e0b39bc6e2b006ef51a2bc24359784c%2Fcivitai_model_id.png?alt=media" alt=""><figcaption></figcaption></figure> * Example: <https://civitai.com/models/10028?modelVersionId=64094> , use `model = 64094` for this model * `prompt` * The text prompt for image generation. * `Add lora?` * add `<lora:$id:$weight>` to your prompt. `$id` is the series number and `$weight` is the lora weight you want (always set to 1.0). You can use multiple loras. <figure><img src="https://2975681513-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDtmZwLatyyBFLUK6P6Pj%2Fuploads%2Fgit-blob-bf854ec1a21b80eec461c95ab53bd1a245f01e03%2Fcivitai_lora_id.png?alt=media" alt=""><figcaption></figcaption></figure> * Example: `<lora:426797:1> A young boy is seated on the ground.` * Here, we add `lora=426797` with weight 1 for this generation guided by text `A young boy is seated on the ground` * `height & width` * The resolution for your generated images. * We recommend to generate 512 \* 512 images with SD 1.5 and 1024 \* 1024 images with SDXL 1.0 * Other functional parameter: * `enable_hr`: Enable the post-process high resolution. If it is set to false, please ignore the parameter with prefix `hr_` * `hr_upscaler`: Model for first step super resolution: * Choose from `["None", "Lanczos", "Nearest", "ESRGAN_4x", "LDSR", "R-ESRGAN 4x+", "R-ESRGAN 4x+ Anime6B", "ScuNET GAN", "ScuNET PSNR", "SwinIR 4x"]` * `hr_scale` : Improve the image quality by enlarging it in a way while maintains the original ratios. Default to 2. * For example, when `enable_hr=True` and `hr_scale=2` , you generated image will be `(2*width, 2*height)` * If `hr_height` or `hr_width` is set to a value other than zero, this parameter will be ignored. * `hr_resize_x` and `hr_resize_y` : Resize width/height to. * 0 means not defined. If x set to 0, and y is not 0, we will resize the length of image to y and change width accordingly. Vice versa * For example, when `enable_hr=True` and `hr_resize_x=1024` , and you set the `width=512` to obtain an image with 512 pixels on width. Finally you will get a image with `(1024, 1024/512 * height)` * `hr_second_pass_steps`: Steps of sampling for second pass of diffusion model after hires. Set to 0 means the same steps as first pass. * Feel free to use 0 for most cases. * `hr_denoising_strength`: Strength of image transfomation during hires transform. High means more influence during second pass sampling after hires * The weighted sum will be computed based on the images after super-resolution and after the second inference * Set 0.7 for default. # Storydiffusion Create a comic using a reference image and a description. ## Try it in the Widget Center Click this [url](https://app.myshell.ai/robot-workshop/widget/1788418782877257728) to try this widget and copy the Pro Config template. ## Usage Create a comic using a reference image (optional) and a description. **Input Parameters** <table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>sd_model</td><td><code>string</code></td><td>Choose a model</td><td>Unstable</td><td>true</td></tr><tr><td>ref_image</td><td><code>string</code></td><td>Reference image for the character. leave it empty for no reference generation</td><td></td><td>false</td></tr><tr><td>character_description</td><td><code>string</code></td><td>General description of the character. If ref_image above is provided, making sure trigger word 'img' is included in you character description. Use any word for class before 'img'. such as: 'man img' or 'woman img' or 'policeman img'. Example: 'a photo of a man/woman img'. The phrase 'img' is the trigger word.</td><td>a policeman img, wearing a white shirt</td><td>true</td></tr><tr><td>negative_prompt</td><td><code>string</code></td><td>Describe things you do not want to see in the output. The negative prompt should NOT contain the trigger word.</td><td>bad anatomy, bad hands, missing fingers, extra fingers, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, three crus, fused feet, fused thigh, extra crus, ugly fingers, horn, cartoon, cg, 3d, unreal, animate, amputation, disconnected limbs</td><td>false</td></tr><tr><td>comic_description</td><td><code>string</code></td><td>Comic Description. Each frame is divided by a new line. Only the first 10 prompts are valid for demo speed! For comic_description NOT using ref_image: (1) Support Typesetting Style and Captioning. By default, the prompt is used as the caption for each image. If you need to change the caption, add a '#' at the end of each line. Only the part after the '#' will be added as a caption to the image. (2) The [NC] symbol is used as a flag to indicate that no characters should be present in the generated scene images. If you want do that, prepend the '[NC]' at the beginning of the line. Note that [NC] is not supported when ref_image is provided.</td><td>at home, read new paper #at home, The newspaper says there is a treasure house in the forest. on the road, near the forest [NC] The car on the road, near the forest #He drives to the forest in search of treasure. [NC]A tiger appeared in the forest, at night very frightened, open mouth, in the forest, at night running very fast, in the forest, at night [NC] A house in the forest, at night #Suddenly, he discovers the treasure house! in the house filled with treasure, laughing, at night #He is overjoyed inside the house.</td><td>true</td></tr><tr><td>style_name</td><td><code>string</code></td><td>Style template</td><td>Japanese Anime</td><td>false</td></tr><tr><td>comic_style</td><td><code>string</code></td><td>Select the comic style for the combined comic</td><td>Classic Comic Style</td><td>false</td></tr><tr><td>style_strength_ratio</td><td><code>integer</code></td><td>Style strength of Ref Image (%), only used if ref_image is provided</td><td>20</td><td>false</td></tr><tr><td>image_width</td><td><code>integer</code></td><td>Width of output image</td><td>768</td><td>false</td></tr><tr><td>image_height</td><td><code>integer</code></td><td>Height of output image</td><td>768</td><td>false</td></tr><tr><td>num_steps</td><td><code>integer</code></td><td>Number of sample steps</td><td>25</td><td>false</td></tr><tr><td>guidance_scale</td><td><code>number</code></td><td>Scale for classifier-free guidance</td><td>5</td><td>false</td></tr><tr><td>seed</td><td><code>integer</code></td><td>Random seed. Leave blank to randomize the seed</td><td></td><td>false</td></tr><tr><td>sa32_setting</td><td><code>number</code></td><td>The degree of Paired Attention at 32 x 32 self-attention layers</td><td>0.5</td><td>false</td></tr><tr><td>sa64_setting</td><td><code>number</code></td><td>The degree of Paired Attention at 64 x 64 self-attention layers</td><td>0.5</td><td>false</td></tr><tr><td>num_ids</td><td><code>integer<
프로젝트로 돌아가기