wordpress云建站系统,wordpress怎么安装插件,网上开店如何推广自己的网店,有没有专门做ppt的网站吗文章目录 序言步骤下载comfyUI配置大模型和vae下载依赖组件启动 生成图片解决办法 序言
由于stable diffusion web ui无法做到对流程进行控制#xff0c;只是点击个生成按钮后#xff0c;一切都交给AI来处理。但是用于生产生活是需要精细化对各个流程都要进行控制的。
故也… 文章目录 序言步骤下载comfyUI配置大模型和vae下载依赖组件启动 生成图片解决办法 序言
由于stable diffusion web ui无法做到对流程进行控制只是点击个生成按钮后一切都交给AI来处理。但是用于生产生活是需要精细化对各个流程都要进行控制的。
故也就有个今天的猪脚Comfyui
步骤
下载comfyui项目配置大模型和vae下载依赖组件启动
下载comfyUI
官网地址https://github.com/comfyanonymous/ComfyUI
将项目下载到自己喜欢的目录下下面是我的
yutaoyutao MINGW64 /e/openai/project
$ git clone https://github.com/comfyanonymous/ComfyUI.git配置大模型和vae
在ComfyUI\models\checkpoints中放大模型文件在ComfyUI\models\vae中放vae文件。
但是我们学stable diffusion基本都是从stable diffusion webui开始的所以我们其实不需要再额外的下载checkpoint和vae而是共用他们。
ComfyUI的作者提供了配置方法
修改extra_model_paths.yaml.example文件重命名为extra_model_paths.yaml打开文件将里面的base_path进行修改 以下是我的stable-diffusion-webui的路径
a111:base_path: E:\openai\project\stable-diffusion-webui保存退出。
下载依赖组件
在ComfyUI中调出命令行(将文件夹路径上敲cmd回车即可)中执行
E:\openai\project\ComfyUIpip install -r requirements.txt就会开始下载所需的依赖组件。
启动
命令python main.py
E:\openai\project\ComfyUIpython main.py浏览器访问地址http://127.0.0.1:8188 最左边因为我之前玩stable diffusion时候已经下载好了guofeng3大模型。所以load checkpoint 里面我显示的是guofeng3. 大模型我下载的是guofeng3。 放到models/checkpoints文件夹里例如E:\openai\project\ComfyUI\models\checkpoints。 生成图片
因为默认参数就可以生成一个花瓶点击右上角的Queue Prompt。
但是我的电脑总是不是那么顺利。
详细描述文章【ComfyUI】RuntimeError: CUDA error: operation not supported
报了如下错误
got prompt
model_type EPS
adm 0
making attention of type vanilla-pytorch with 512 in_channels
Working with z of shape (1, 4, 32, 32) 4096 dimensions.
making attention of type vanilla-pytorch with 512 in_channels
missing {cond_stage_model.text_projection, cond_stage_model.logit_scale}
left over keys: dict_keys([cond_stage_model.transformer.text_model.embeddings.position_ids, model_ema.decay, model_ema.num_updates])
loading new
loading new
loading in lowvram mode 1842.6899042129517
!!! Exception during processing !!!
Traceback (most recent call last):File E:\openai\project\ComfyUI\execution.py, line 152, in recursive_executeoutput_data, output_ui get_output_data(obj, input_data_all)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File E:\openai\project\ComfyUI\execution.py, line 82, in get_output_datareturn_values map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interruptTrue)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File E:\openai\project\ComfyUI\execution.py, line 75, in map_node_over_listresults.append(getattr(obj, func)(**slice_dict(input_data_all, i)))^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File E:\openai\project\ComfyUI\nodes.py, line 1236, in samplereturn common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoisedenoise)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File E:\openai\project\ComfyUI\nodes.py, line 1206, in common_ksamplersamples comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File E:\openai\project\ComfyUI\comfy\sample.py, line 81, in samplecomfy.model_management.load_models_gpu([model] models, comfy.model_management.batch_area_memory(noise.shape[0] * noise.shape[2] * noise.shape[3]) inference_memory)File E:\openai\project\ComfyUI\comfy\model_management.py, line 394, in load_models_gpucur_loaded_model loaded_model.model_load(lowvram_model_memory)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File E:\openai\project\ComfyUI\comfy\model_management.py, line 288, in model_loadaccelerate.dispatch_model(self.real_model, device_mapdevice_map, main_deviceself.device)File D:\Program Files\Python\Lib\site-packages\accelerate\big_modeling.py, line 391, in dispatch_modelattach_align_device_hook_on_blocks(File D:\Program Files\Python\Lib\site-packages\accelerate\hooks.py, line 532, in attach_align_device_hook_on_blocksadd_hook_to_module(module, hook)File D:\Program Files\Python\Lib\site-packages\accelerate\hooks.py, line 155, in add_hook_to_modulemodule hook.init_hook(module)^^^^^^^^^^^^^^^^^^^^^^File D:\Program Files\Python\Lib\site-packages\accelerate\hooks.py, line 253, in init_hookset_module_tensor_to_device(module, name, self.execution_device)File D:\Program Files\Python\Lib\site-packages\accelerate\utils\modeling.py, line 307, in set_module_tensor_to_devicenew_value old_value.to(device)^^^^^^^^^^^^^^^^^^^^
RuntimeError: CUDA error: operation not supported
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING1.
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.其实就是说我当前电脑的GPU或硬件并不支持当前CUDA中的某些操作。
解决办法
官方提供了两种解决策略。
方式一黑名单策略 加完后再重启。发现还是不行。
方式二启动时添加–disable-cuda-malloc
# 注意--disable-cuda-malloc
E:\openai\project\ComfyUIpython main.py --disable-cuda-malloc最后通过方式二得以解决。 参考地址
https://github.com/comfyanonymous/ComfyUI#manual-install-windows-linux
Stable Diffusion ComfyUI 入门感受