Control Lora with refiner

#21
by moon47usaco - opened

I want to give the same CN guidance to the refiner that I do to the base model.

I get the fallowing error when applying the example workflow to the refiner.

Error occurred when executing KSamplerAdvanced:

'ModuleList' object has no attribute '4'

File "S:\Ai\Repos\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "S:\Ai\Repos\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "S:\Ai\Repos\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "S:\Ai\Repos\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1241, in sample
return common_ksampler(model, noise_seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise, disable_noise=disable_noise, start_step=start_at_step, last_step=end_at_step, force_full_denoise=force_full_denoise)
File "S:\Ai\Repos\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1177, in common_ksampler
samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
File "S:\Ai\Repos\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\hacky.py", line 9, in informative_sample
return original_sample(*args, **kwargs)
File "S:\Ai\Repos\ComfyUI_windows_portable\ComfyUI\comfy\sample.py", line 95, in sample
samples = sampler.sample(noise, positive_copy, negative_copy, cfg=cfg, latent_image=latent_image, start_step=start_step, last_step=last_step, force_full_denoise=force_full_denoise, denoise_mask=noise_mask, sigmas=sigmas, callback=callback, disable_pbar=disable_pbar, seed=seed)
File "S:\Ai\Repos\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 637, in sample
pre_run_control(self.model_wrap, negative + positive)
File "S:\Ai\Repos\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 481, in pre_run_control
x[1]['control'].pre_run(model.inner_model.inner_model, percent_to_timestep_function)
File "S:\Ai\Repos\ComfyUI_windows_portable\ComfyUI\comfy\controlnet.py", line 273, in pre_run
comfy.utils.set_attr(self.control_model, k, self.control_weights[k].to(dtype).to(comfy.model_management.get_torch_device()))
File "S:\Ai\Repos\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 243, in set_attr
obj = getattr(obj, name)
File "S:\Ai\Repos\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1614, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(

I found the same issue. The way that I fixed it is by deleting the KSampler that was erroring and creating a brand new one but starting from dragging out a connection from the VAE Encode : LATENT output.

Hope that works for you

I tried dragging out a new KSampler(Advanced) from the latent out of the KSampler(Advanced) that is connected to the base model and CN. I reconnected the same connections with the same error... =[
Workflow in attached, if you can make that work that would be great, I'm stumped.
ComfyUI_temp_noojc_00002_.png

I found the same issue. The way that I fixed it is by deleting the KSampler that was erroring and creating a brand new one but starting from dragging out a connection from the VAE Encode : LATENT output.

Hope that works for you

Could you please send you workflow?

The image has metadata.
Just save and drop on UI
or text:
https://github.com/moon47usaco/SD-data/blob/main/cn-refiner-test-01.json

Suppose you were asking JonnyW... =]

The image has metadata.
Just save and drop on UI
or text:
https://github.com/moon47usaco/SD-data/blob/main/cn-refiner-test-01.json

Suppose you were asking JonnyW... =]

Thank you .I think refiner model doesnt work with controlnet, can be only used with xl base model.none of worklows adds controlnet contidion to refiner model

A complication with SDXL that makes me want to stick to 1.5 models... =[

A complication with SDXL that makes me want to stick to 1.5 models... =[

SD 1.5 quality is not enough for me . Do you use SD for interior design?

Sign up or log in to comment