bubble.py-20180418

本文详细介绍了多种经典的排序算法,包括冒泡排序、选择排序、插入排序等,并提供了Python实现示例。通过这些示例,读者可以更好地理解每种排序算法的工作原理及应用场景。
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Mar 25 15:18:43 2018

@author: vicky
"""
#冒泡
def bubbleSort(l):
    for i in range(len(l)):
        for j in range(1, len(l) - i):
            if l[j - 1] > l[j]:
                l[j - 1], l[j] = l[j], l[j - 1]#相当于c++中的swap,如果分开写要引入一个中间值
    return l

unsorted_list = [6, 5, 3, 1, 8, 7, 2, 4]
print(bubbleSort(unsorted_list))

#冒泡优化:添加一个标记,在排序已完成时,停止排序。
def bubble_sort_flag(l):
    length = len(l)
    for index in range(length):
        flag = True #标志位
        for j in range(1, length - index):
            if l[j - 1] > l[j]:
                l[j - 1], l[j] = l[j], l[j - 1]
                flag = False
        if flag:
            return l # 没有发生交换,直接返回list
    return l
print(bubble_sort_flag(unsorted_list))

#选择排序
def selection_sort(l):
    n=len(l)
    for i in range (n):
        min = i
        for j in range(i+1,n):
            if l[j]<l[min]: 
                min=j #选出比min小的元素的序号,遍历得到最小值
                l[min],l[i]=l[i],l[min] #交换最小值和第i个值
    return l
print(selection_sort(unsorted_list))

#插入
def insert_sort(l):
    n = len(l)
    for i in range(1, n):
        if l[i] < l[i - 1]:# 后一个元素和前一个元素比较,如果比前一个小
            temp = l[i]# 将这个数取出
            index = i # 保存下标
            for j in range(i - 1, -1, -1): # 从后往前依次比较每个元素
                if l[j] > temp:# 和比取出元素大的元素交换
                    l[j + 1] = l[j] #往后移一个
                    index = j
                else:
                    break
            l[index] = temp # 插入元素
    return l
print(insert_sort(unsorted_list))

#希尔排序
def shell_sort(l):
    n = len(l)
    gap = round(n / 2) #初始步长
    while gap > 0:
        for i in range(gap, n):
            temp = l[i] #每个步长进行插入排序
            j = i
            while j>=gap and l[j-gap]>temp: #插入排序
                l[j] = l[j - gap]
                j -= gap
            l[j] = temp
        gap = round(gap / 2)# 得到新的步长
    return l
print(shell_sort(unsorted_list))

#堆排序
def heap_sort(l):
    # 创建最大堆
    for start in range((len(l) - 2) // 2, -1, -1):
        sift_down(l, start, len(l) - 1)

    # 堆排序
    for end in range(len(l) - 1, 0, -1):
        l[0], l[end] = l[end], l[0]
        sift_down(l, 0, end - 1)
    return l

# 最大堆调整
def sift_down(lst, start, end):
    root = start
    while True:
        child = 2 * root + 1
        if child > end:
            break
        if child + 1 <= end and lst[child] < lst[child + 1]:
            child += 1
        if lst[root] < lst[child]:
            lst[root], lst[child] = lst[child], lst[root]
            root = child
        else:
            break
print(heap_sort(unsorted_list))

#归并排序:把两个已经排列好的序列合并为一个序列。以第一个list为基准,第二个向第一个插空
def merge_sort(list1,list2):
    length_list1=len(list1)
    length_list2=len(list2)
    list3=[]
    j=0
    for i in range(length_list1):
        while list2[j]<list1[i] and j<length_list2:
            list3.append(list2[j])
            j=j+1
        list3.append(list1[i])
    if j<(length_list2-1):
        for k in range(j,length_list2):
            list3.append(list2[k])
    return list3
#测试
list1=[1,3,5,10]
list2=[2,4,6,8,9,11,12,13,14]
print(merge_sort(list1,list2))

# 递归法
def merge_sort(l):
    # 认为长度不大于1的数列是有序的
    if len(l) <= 1:
        return l
    # 二分列表
    middle = len(l) // 2
    left = merge_sort(l[:middle])
    right = merge_sort(l[middle:])
    # 最后一次合并
    return merge(left, right)
# 合并
def merge(left, right):
    l,r=0,0
    result=[]
    while l<len(left) and r<len(right):
        if left[l] <right[r]:
            result.append(left[l])
            l+=1
        else:
            result.append(right[r])
            r +=1
        result+=left[l:]
        result+=right[r:]                
    return result

#快速排序
def quick_sort(l):
    low = []
    mid = []
    high = []
    if len(l) <= 1: # 递归出口
        return l
    else:
        base = list[0] # 将第一个值做为基准
        for i in l:
            if i < base:  # 将比急转小的值放到low数列
                low.append(i)
            elif i > base: # 将比基准大的值放到high数列
                high.append(i)
            else:  # 将和基准相同的值保存在基准数列
                mid.append(i)
        low = quick_sort(low) # 对low数列和high数列继续进行排序
        high = quick_sort(high)
        return low + mid + high

nums = [6,1,2,7,9,3,3,4,5,10,10,8]
print(quick_sort(nums))

#计数排序
def count_sort(l):
    min = 2147483647
    max = 0
    # 取得最大值和最小值
    for x in l:
        if x < min:
            min = x
        if x > max:
            max = x
    # 创建数组C
    count = [0] * (max - min +1)
    for index in l:
        count[index - min] += 1
    index = 0
    # 填值
    for a in range(max - min+1):
        for c in range(count[a]):
            l[index] = a + min
            index += 1
    return l

 

# ComfyUI Error Report ## Error Details - **Node ID:** 4 - **Node Type:** CheckpointLoaderSimple - **Exception Type:** RuntimeError - **Exception Message:** ERROR: Could not detect model type of: C:\Users\shanye\Documents\ComfyUI\models\checkpoints\Instamodel_1 Workflow + LoRA\Instamodel_1.safetensors ## Stack Trace ``` File "C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\execution.py", line 496, in execute output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\execution.py", line 315, in get_output_data return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\execution.py", line 289, in _async_map_node_over_list await process_inputs(input_dict, i) File "C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\execution.py", line 277, in process_inputs result = f(**inputs) ^^^^^^^^^^^ File "C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\nodes.py", line 578, in load_checkpoint out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\comfy\sd.py", line 1039, in load_checkpoint_guess_config raise RuntimeError("ERROR: Could not detect model type of: {}\n{}".format(ckpt_path, model_detection_error_hint(ckpt_path, sd))) ``` ## System Information - **ComfyUI Version:** 0.3.56 - **Arguments:** C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\main.py --user-directory C:\Users\shanye\Documents\ComfyUI\user --input-directory C:\Users\shanye\Documents\ComfyUI\input --output-directory C:\Users\shanye\Documents\ComfyUI\output --front-end-root C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\web_custom_versions\desktop_app --base-directory C:\Users\shanye\Documents\ComfyUI --extra-model-paths-config C:\Users\shanye\AppData\Roaming\ComfyUI\extra_models_config.yaml --log-stdout --listen 127.0.0.1 --port 8000 - **OS:** nt - **Python Version:** 3.12.11 (main, Aug 18 2025, 19:17:54) [MSC v.1944 64 bit (AMD64)] - **Embedded Python:** false - **PyTorch Version:** 2.8.0+cu129 ## Devices - **Name:** cuda:0 NVIDIA GeForce RTX 3060 Laptop GPU : cudaMallocAsync - **Type:** cuda - **VRAM Total:** 6441926656 - **VRAM Free:** 5370806272 - **Torch VRAM Total:** 0 - **Torch VRAM Free:** 0 ## Logs ``` 2025-09-04T11:13:39.610304 - Adding extra search path custom_nodes C:\Users\shanye\Documents\ComfyUI\custom_nodes 2025-09-04T11:13:39.610304 - Adding extra search path download_model_base C:\Users\shanye\Documents\ComfyUI\models 2025-09-04T11:13:39.610304 - Adding extra search path custom_nodes C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\custom_nodes 2025-09-04T11:13:39.610304 - Setting output directory to: C:\Users\shanye\Documents\ComfyUI\output 2025-09-04T11:13:39.610304 - Setting input directory to: C:\Users\shanye\Documents\ComfyUI\input 2025-09-04T11:13:39.610304 - Setting user directory to: C:\Users\shanye\Documents\ComfyUI\user 2025-09-04T11:13:40.313409 - [START] Security scan2025-09-04T11:13:40.313409 - 2025-09-04T11:13:41.675613 - [DONE] Security scan2025-09-04T11:13:41.675613 - 2025-09-04T11:13:41.775803 - ## ComfyUI-Manager: installing dependencies done.2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - ** ComfyUI startup time:2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - 2025-09-04 11:13:41.7752025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - ** Platform:2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - Windows2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - ** Python version:2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - 3.12.11 (main, Aug 18 2025, 19:17:54) [MSC v.1944 64 bit (AMD64)]2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - ** Python executable:2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - C:\Users\shanye\Documents\ComfyUI\.venv\Scripts\python.exe2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - ** ComfyUI Path:2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - ** ComfyUI Base Folder Path:2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - ** User directory:2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - C:\Users\shanye\Documents\ComfyUI\user2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - ** ComfyUI-Manager config path:2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - C:\Users\shanye\Documents\ComfyUI\user\default\ComfyUI-Manager\config.ini2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - ** Log path:2025-09-04T11:13:41.775803 - 2025-09-04T11:13:41.775803 - C:\Users\shanye\Documents\ComfyUI\user\comfyui.log2025-09-04T11:13:41.775803 - 2025-09-04T11:13:42.904189 - [ComfyUI-Manager] Skipped fixing the 'comfyui-frontend-package' dependency because the ComfyUI is outdated. 2025-09-04T11:13:42.904189 - Prestartup times for custom nodes: 2025-09-04T11:13:42.904189 - 3.3 seconds: C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\custom_nodes\ComfyUI-Manager 2025-09-04T11:13:42.904189 - 2025-09-04T11:13:44.103451 - Checkpoint files will always be loaded safely. 2025-09-04T11:13:44.181039 - Total VRAM 6144 MB, total RAM 16075 MB 2025-09-04T11:13:44.181039 - pytorch version: 2.8.0+cu129 2025-09-04T11:13:44.181039 - Set vram state to: NORMAL_VRAM 2025-09-04T11:13:44.181039 - Device: cuda:0 NVIDIA GeForce RTX 3060 Laptop GPU : cudaMallocAsync 2025-09-04T11:13:45.119456 - Using pytorch attention 2025-09-04T11:13:46.242679 - Python version: 3.12.11 (main, Aug 18 2025, 19:17:54) [MSC v.1944 64 bit (AMD64)] 2025-09-04T11:13:46.242679 - ComfyUI version: 0.3.56 2025-09-04T11:13:46.262300 - [Prompt Server] web root: C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\web_custom_versions\desktop_app 2025-09-04T11:13:47.026643 - ### Loading: ComfyUI-Manager (V3.36) 2025-09-04T11:13:47.026643 - [ComfyUI-Manager] network_mode: public 2025-09-04T11:13:47.036119 - ### ComfyUI Revision: UNKNOWN (The currently installed ComfyUI is not a Git repository) 2025-09-04T11:13:47.052419 - Import times for custom nodes: 2025-09-04T11:13:47.052928 - 0.0 seconds: C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\custom_nodes\websocket_image_save.py 2025-09-04T11:13:47.052928 - 0.0 seconds: C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\custom_nodes\ComfyUI-Manager 2025-09-04T11:13:47.052928 - 2025-09-04T11:13:47.292879 - Failed to initialize database. Please ensure you have installed the latest requirements. If the error persists, please report this as in future the database will be required: (sqlite3.OperationalError) unable to open database file (Background on this error at: https://sqlalche.me/e/20/e3q8) 2025-09-04T11:13:47.312519 - Starting server 2025-09-04T11:13:47.313524 - To see the GUI go to: http://127.0.0.1:8000 2025-09-04T11:13:47.628776 - [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json 2025-09-04T11:13:47.658220 - [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json 2025-09-04T11:13:47.797495 - [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/github-stats.json 2025-09-04T11:13:48.035699 - [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json 2025-09-04T11:13:48.082459 - [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json 2025-09-04T11:13:48.177134 - comfyui-frontend-package not found in requirements.txt 2025-09-04T11:13:48.447275 - comfyui-frontend-package not found in requirements.txt 2025-09-04T11:13:54.407289 - FETCH ComfyRegistry Data: 5/962025-09-04T11:13:54.407289 - 2025-09-04T11:14:01.787097 - FETCH ComfyRegistry Data: 10/962025-09-04T11:14:01.787097 - 2025-09-04T11:14:08.713963 - FETCH ComfyRegistry Data: 15/962025-09-04T11:14:08.713963 - 2025-09-04T11:14:15.351666 - FETCH ComfyRegistry Data: 20/962025-09-04T11:14:15.351666 - 2025-09-04T11:14:22.429376 - FETCH ComfyRegistry Data: 25/962025-09-04T11:14:22.429376 - 2025-09-04T11:14:29.356493 - FETCH ComfyRegistry Data: 30/962025-09-04T11:14:29.356493 - 2025-09-04T11:14:37.063216 - FETCH ComfyRegistry Data: 35/962025-09-04T11:14:37.063216 - 2025-09-04T11:14:44.307279 - FETCH ComfyRegistry Data: 40/962025-09-04T11:14:44.307279 - 2025-09-04T11:14:51.189416 - FETCH ComfyRegistry Data: 45/962025-09-04T11:14:51.189416 - 2025-09-04T11:14:57.943608 - got prompt 2025-09-04T11:14:57.961871 - Warning, This is not a checkpoint file, trying to load it as a diffusion model only. 2025-09-04T11:14:57.962863 - !!! Exception during processing !!! ERROR: Could not detect model type of: C:\Users\shanye\Documents\ComfyUI\models\checkpoints\Instamodel_1 Workflow + LoRA\Instamodel_1.safetensors 2025-09-04T11:14:57.964864 - Traceback (most recent call last): File "C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\execution.py", line 496, in execute output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\execution.py", line 315, in get_output_data return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\execution.py", line 289, in _async_map_node_over_list await process_inputs(input_dict, i) File "C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\execution.py", line 277, in process_inputs result = f(**inputs) ^^^^^^^^^^^ File "C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\nodes.py", line 578, in load_checkpoint out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\shanye\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\comfy\sd.py", line 1039, in load_checkpoint_guess_config raise RuntimeError("ERROR: Could not detect model type of: {}\n{}".format(ckpt_path, model_detection_error_hint(ckpt_path, sd))) RuntimeError: ERROR: Could not detect model type of: C:\Users\shanye\Documents\ComfyUI\models\checkpoints\Instamodel_1 Workflow + LoRA\Instamodel_1.safetensors 2025-09-04T11:14:57.966494 - Prompt executed in 0.02 seconds ``` ## Attached Workflow Please make sure that workflow does not contain any sensitive information such as API keys or passwords. ``` {"id":"415d3cd4-ff2f-432f-beed-1c037c7f683a","revision":0,"last_node_id":12,"last_link_id":11,"nodes":[{"id":8,"type":"VAEDecode","pos":[1206.800048828125,139.6000518798828],"size":[210,46],"flags":{},"order":5,"mode":0,"inputs":[{"localized_name":"Latent","name":"samples","type":"LATENT","link":7},{"localized_name":"vae","name":"vae","type":"VAE","link":8}],"outputs":[{"localized_name":"图像","name":"IMAGE","type":"IMAGE","slot_index":0,"links":[11]}],"properties":{"cnr_id":"comfy-core","ver":"0.3.56","Node name for S&R":"VAEDecode"},"widgets_values":[]},{"id":5,"type":"EmptyLatentImage","pos":[546.2001342773438,566.1336669921875],"size":[315,106],"flags":{},"order":0,"mode":0,"inputs":[{"localized_name":"宽度","name":"width","type":"INT","widget":{"name":"width"},"link":null},{"localized_name":"高度","name":"height","type":"INT","widget":{"name":"height"},"link":null},{"localized_name":"批量大小","name":"batch_size","type":"INT","widget":{"name":"batch_size"},"link":null}],"outputs":[{"localized_name":"Latent","name":"LATENT","type":"LATENT","slot_index":0,"links":[2]}],"properties":{"cnr_id":"comfy-core","ver":"0.3.56","Node name for S&R":"EmptyLatentImage"},"widgets_values":[960,1280,1]},{"id":7,"type":"CLIPTextEncode","pos":[404.3333740234375,331.6666564941406],"size":[425.27801513671875,180.6060791015625],"flags":{},"order":3,"mode":0,"inputs":[{"localized_name":"clip","name":"clip","type":"CLIP","link":5},{"localized_name":"文本","name":"text","type":"STRING","widget":{"name":"text"},"link":null}],"outputs":[{"localized_name":"条件","name":"CONDITIONING","type":"CONDITIONING","slot_index":0,"links":[6]}],"properties":{"cnr_id":"comfy-core","ver":"0.3.56","Node name for S&R":"CLIPTextEncode"},"widgets_values":["4koma, comic, censored, jpeg artifacts, blurry, lowres, worst quality, low quality, bad anatomy, bad hands, signature, watermark, text, logo, artist name, censored, patreon username, logo, flag, name tag, deformed, crazy eyes, bad eyes, squint, frown, extra fingers, fewer fingers, SmoothNegative_Hands-neg"]},{"id":6,"type":"CLIPTextEncode","pos":[399,121.33334350585938],"size":[422.84503173828125,164.31304931640625],"flags":{},"order":2,"mode":0,"inputs":[{"localized_name":"clip","name":"clip","type":"CLIP","link":3},{"localized_name":"文本","name":"text","type":"STRING","widget":{"name":"text"},"link":null}],"outputs":[{"localized_name":"条件","name":"CONDITIONING","type":"CONDITIONING","slot_index":0,"links":[4]}],"properties":{"cnr_id":"comfy-core","ver":"0.3.56","Node name for S&R":"CLIPTextEncode"},"widgets_values":["girl, graffiti artist, lean body, medium breasts, punk hairstyle, multicolored hair, blonde hair, bright pink hair, white hoodie, neon pink runes on hoodie, form fitting black pants, White sneakers, bubblegum bubble, leaning with her back on a wall, one foot on the wall, one foot on the ground, hands in pocket, punk atmosphere, neon lighting, masterpiece, Wall covered in graffiti, detailed, absurdres, cowboy shot"]},{"id":3,"type":"KSampler","pos":[865.6666870117188,131.99998474121094],"size":[315,262],"flags":{},"order":4,"mode":0,"inputs":[{"localized_name":"模型","name":"model","type":"MODEL","link":1},{"localized_name":"正面条件","name":"positive","type":"CONDITIONING","link":4},{"localized_name":"负面条件","name":"negative","type":"CONDITIONING","link":6},{"localized_name":"Latent图像","name":"latent_image","type":"LATENT","link":2},{"localized_name":"种子","name":"seed","type":"INT","widget":{"name":"seed"},"link":null},{"localized_name":"步数","name":"steps","type":"INT","widget":{"name":"steps"},"link":null},{"localized_name":"cfg","name":"cfg","type":"FLOAT","widget":{"name":"cfg"},"link":null},{"localized_name":"采样器名称","name":"sampler_name","type":"COMBO","widget":{"name":"sampler_name"},"link":null},{"localized_name":"调度器","name":"scheduler","type":"COMBO","widget":{"name":"scheduler"},"link":null},{"localized_name":"降噪","name":"denoise","type":"FLOAT","widget":{"name":"denoise"},"link":null}],"outputs":[{"localized_name":"Latent","name":"LATENT","type":"LATENT","slot_index":0,"links":[7]}],"properties":{"cnr_id":"comfy-core","ver":"0.3.56","Node name for S&R":"KSampler"},"widgets_values":[612215308838764,"randomize",24,7,"euler","beta",1]},{"id":4,"type":"CheckpointLoaderSimple","pos":[5.333343505859375,196.6666717529297],"size":[315,98],"flags":{},"order":1,"mode":0,"inputs":[{"localized_name":"Checkpoint名称","name":"ckpt_name","type":"COMBO","widget":{"name":"ckpt_name"},"link":null}],"outputs":[{"localized_name":"模型","name":"MODEL","type":"MODEL","slot_index":0,"links":[1]},{"localized_name":"CLIP","name":"CLIP","type":"CLIP","slot_index":1,"links":[3,5]},{"localized_name":"VAE","name":"VAE","type":"VAE","slot_index":2,"links":[8]}],"properties":{"cnr_id":"comfy-core","ver":"0.3.56","Node name for S&R":"CheckpointLoaderSimple","models":[{"name":"v1-5-pruned-emaonly-fp16.safetensors","url":"https://huggingface.co/Comfy-Org/stable-diffusion-v1-5-archive/resolve/main/v1-5-pruned-emaonly-fp16.safetensors?download=true","directory":"checkpoints"}]},"widgets_values":["Instamodel_1 Workflow + LoRA\\Instamodel_1.safetensors"]},{"id":11,"type":"SaveImage","pos":[1452.80029296875,141.66671752929688],"size":[210,270],"flags":{},"order":6,"mode":0,"inputs":[{"localized_name":"图片","name":"images","type":"IMAGE","link":11},{"localized_name":"文件名前缀","name":"filename_prefix","type":"STRING","widget":{"name":"filename_prefix"},"link":null}],"outputs":[],"properties":{"cnr_id":"comfy-core","ver":"0.3.56"},"widgets_values":["ComfyUI"]}],"links":[[1,4,0,3,0,"MODEL"],[2,5,0,3,3,"LATENT"],[3,4,1,6,0,"CLIP"],[4,6,0,3,1,"CONDITIONING"],[5,4,1,7,0,"CLIP"],[6,7,0,3,2,"CONDITIONING"],[7,3,0,8,0,"LATENT"],[8,4,2,8,1,"VAE"],[11,8,0,11,0,"IMAGE"]],"groups":[],"config":{},"extra":{"ds":{"scale":0.9090909090909094,"offset":[28.583954807873738,165.70971363866818]}},"version":0.4} ``` ## Additional Context (Please add any additional context or steps to reproduce the error here)
09-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值